mcframework.stats_engine.markov_error_prob#

mcframework.stats_engine.markov_error_prob(x: ndarray, ctx: StatsContext) float[source]#

Markov bound on error probability for target \(\theta\).

Using the squared error of the sample mean, \(\mathrm{MSE}(\bar X) \approx \frac{s^2}{n} + \text{Bias}^2\), Markov gives

\[\Pr\!\left(\,|\bar X - \theta| \ge \varepsilon\,\right) \;\le\; \frac{\mathrm{MSE}}{\varepsilon^2}.\]
Parameters:
xndarray

Input sample.

ctxStatsContext or Mapping

Requires target and eps. The declared n influences the context but does not enter directly into the bound.

Returns:
float

Upper bound in \([0, 1]\).