BootstrapCI

class coba.results.BootstrapCI

Calculate a statistic and its Bootstrap CI.

Constructors

__init__(confidence: float, statistic: Callable[[Sequence[float]], float]) None

Instantiate a BootstrapCI.

Parameters:
  • confidence – The desired confidence level of the interval. Should be in [0,1).

  • statistic – A callable which returns a point estimate given a sample.

Methods

point(sample: Sequence[float]) float

Calculate point estimate of a statistic.

Parameters:

sample – Sample to calculate a statistic for.

Returns:

A point estimate of a statistic.

point_interval(sample: Sequence[float]) Tuple[float, Tuple[float, float]]

Calculate a point estimate and a confidence interval.

Parameters:

sample – Sample to calculate a statistic and its confidence interval.

Returns:

A point estimate of a statistic along with a hi/lo confidence interval.

The lo and hi values should be the size of the plotted error bars.