mcframework.core.SimulationResult#
- class mcframework.core.SimulationResult[source]#
Bases:
objectContainer for the outcome of a Monte Carlo run.
- Attributes:
- results
numpy.ndarray Float array of raw simulation values of length
n_simulations.- n_simulations
int Number of simulations performed.
- execution_time
float Time taken to execute the simulations in seconds.
- mean
float Sample mean \(\bar X\).
- std
float Sample standard deviation with
ddof=1(default for NumPy’snumpy.std()).- percentiles
dict[int,float] Dictionary of computed percentiles, e.g.
{5: 0.05, 50: 0.50, 95: 0.95}.- stats
dict Additional statistics from the stats engine (e.g.
"ci_mean","skew", etc.).- metadata
dict Freeform metadata. Includes
"simulation_name","timestamp","seed_entropy","requested_percentiles", and"engine_defaults_used".
- results
Methods
Pretty, human-readable summary of the result.
- result_to_string(confidence: float = 0.95, method: str = 'auto') str[source]#
Pretty, human-readable summary of the result.
Prints the dictionary attributes in a readable format.
- Parameters:
- Returns:
strMultiline textual summary.
Notes
The parametric CI method for the mean is given by:
\[\bar{X} \pm c \frac{s}{\sqrt{n}}\]where \(c\) is either a z or t critical value depending on
method.
- classmethod __new__(*args, **kwargs)#