mc_estadistico_1d
Run replicated Monte Carlo integration with statistical analysis on a math expression over [a,b], returning estimate distributions, confidence intervals, and an optional histogram.
Instructions
Replicated Monte Carlo experiment (M repetitions of N samples) with statistical analysis.
Args: func_str: Math expression in x. a, b: Integration limits (b > a). N: Samples per replication. M: Number of replications. nivel_confianza: Confidence level in (0, 1). seed: Optional RNG seed. precision: Rounding digits. plot: When True, also return a PNG histogram of the estimates.
Returns:
Dict with the distribution of estimates and confidence intervals.
With plot=True a list [dict, Image] is returned instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| M | No | ||
| N | No | ||
| a | Yes | ||
| b | Yes | ||
| plot | No | ||
| seed | No | ||
| func_str | Yes | ||
| precision | No | ||
| nivel_confianza | No |