...one of the most highly
regarded and expertly designed C++ library projects in the
world.

— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards

boost::histogram::utility::clopper_pearson_interval — Clopper-Pearson interval.

// In header: <boost/histogram/fwd.hpp> template<typename ValueType> class clopper_pearson_interval : public boost::histogram::utility::binomial_proportion_interval< ValueType > { public: // construct/copy/destruct explicit clopper_pearson_interval(confidence_level = deviation{1}) noexcept; // public member functions interval_type operator()(value_type, value_type) const noexcept; };

This is the classic frequentist interval obtained with the Neyman construction. It is therefore often called the 'exact' interval. It is guaranteed to have at least the requested confidence level for all values of the fraction.

The interval is wider than others that produce coverage closer to the expected confidence level over a random ensemble of factions. The Clopper-Pearson interval essentially always overcovers for such a random ensemble, which is undesirable in practice. The Clopper-Pearson interval is recommended when it is important to be conservative, but the Wilson interval should be preferred in most applications.

C. Clopper, E.S. Pearson (1934), Biometrika 26 (4): 404-413. doi:10.1093/biomet/26.4.404.

`clopper_pearson_interval`

public
construct/copy/destruct-
explicit clopper_pearson_interval(confidence_level cl = deviation{1}) noexcept;

Construct Clopper-Pearson interval computer.Parameters:

`cl`

Confidence level for the interval. The default value produces a confidence level of 68 % equivalent to one standard deviation. Both

`deviation`

and

objects can be used to initialize the interval.`confidence_level`