monte_carlo
Sample scipy.stats distributions and evaluate a SymPy expression over those samples to run reproducible probabilistic simulations and compute percentiles or histograms.
Instructions
Sample distributions with scipy.stats and evaluate a sympy expression over the samples.
``variables`` maps each symbol used in ``expression`` to a dict whose ``dist``
entry names a scipy.stats distribution; the remaining entries are passed to
``dist.rvs`` as keyword arguments (``uniform`` additionally accepts
``low``/``high``). The same ``seed`` always reproduces the same output.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>",
"variables": "<variables>"
},
"name": "monte_carlo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| seed | No | ||
| filename | No | ||
| variables | Yes | ||
| expression | Yes | ||
| percentiles | No | ||
| save_histogram | No |