mcframework.stats_engine.ci_mean#

mcframework.stats_engine.ci_mean(x: ndarray, ctx) dict[str, float | str][source]#

Parametric CI for \(\mathbb{E}[X]\) using z/t critical values.

Let \(\bar X\) be the sample mean and \(SE = s/\sqrt{n_\text{eff}}\). The interval is

\[\bar X \pm c \cdot SE,\]

where \(c\) is selected by mcframework.utils.autocrit() according to ci_method and \(n_\text{eff}\).

Parameters:
xndarray

Input sample.

ctxStatsContext or Mapping

Configuration supplying at least n. Additional fields such as confidence, ddof, and ci_method refine the interval.

Returns:
dict[str, float | str]

Mapping with keys

confidence

Requested confidence level.

method

Resolved CI method ("z", "t", or "auto").

low / high

Lower and upper endpoints.

se / crit

Standard error and critical value when \(n_\text{eff} \ge 2\).