scope_rl.utils.estimate_confidence_interval_by_hoeffding#

scope_rl.utils.estimate_confidence_interval_by_hoeffding(samples, alpha=0.05, **kwargs)[source]#

Estimate the confidence interval by the Hoeffding’s inequality.

Note

The Hoeffding’s inequality provides high-probability bounds of the expectation \(\mu := \mathbb{E}[X], X \sim p(X)\) as follows.

\[|\hat{\mu} - \mu| \leq X_{\max} \sqrt{\frac{\log(1 / \alpha)}{2 n}},\]

which holds with probability \(1 - \alpha\) where \(n\) is the data size.

Parameters:
  • samples (array-like) – Samples.

  • alpha (float, default=0.05) – Significance level. The value should be within [0, 1).

Returns:

estimated_confidence_interval – Dictionary storing the estimated mean and upper-lower confidence bounds.

Return type:

dict