fit_distribution_to_data
Fit a chosen distribution family (e.g., Normal, Lognormal) to a data range in Excel and write the result to a target cell, with optional parameter uncertainty for improved risk modeling.
Instructions
ModelRisk: Fit a distribution family to a data range and write the result. 'family' is e.g. 'Normal', 'Lognormal', 'Beta', 'Gamma', 'Weibull' — the tool maps it to the catalogue function (VoseFit). Set uncertainty=True (the default) to include parameter uncertainty in the fitted distribution.
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": {
"workbook": "<workbook>",
"sheet": "<sheet>",
"target_cell": "<target_cell>",
"data_range": "<data_range>",
"family": "<family>"
},
"name": "fit_distribution_to_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | ||
| family | Yes | Distribution family, e.g. 'Normal'. | |
| dry_run | No | ||
| workbook | Yes | ||
| as_object | No | Write Vose<Family>FitObject(...) instead of the sampling Vose<Family>Fit(...). The OBJECT form is what compute_distribution / VoseMean / VosePercentile need to answer analytic questions about the fit; the sampling form is what a simulated model input needs. Default False (sampling). | |
| data_range | Yes | ||
| target_cell | Yes | ||
| uncertainty | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell | Yes | ||
| formula | Yes | ||
| written | Yes | ||
| previous_formula | No |