...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::jeffreys_interval — Jeffreys interval.

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

This is the Bayesian credible interval with a Jeffreys prior. Although it has a Bayesian derivation, it has good coverage. The interval boundaries are close to the Wilson interval. A special property of this interval is that it is equal-tailed; the probability of the true value to be above or below the interval is approximately equal.

To avoid coverage probability tending to zero when the fraction approaches 0 or 1, this implementation uses a modification described in section 4.1.2 of the paper by L.D. Brown, T.T. Cai, A. DasGupta, Statistical Science 16 (2001) 101-133, doi:10.1214/ss/1009213286.

`jeffreys_interval`

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

Construct Jeffreys 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`