Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class template jeffreys_interval

boost::histogram::utility::jeffreys_interval — Jeffreys interval.

Synopsis

// 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;
};

Description

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

  1. 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 andconfidence_level objects can be used to initialize the interval.

jeffreys_interval public member functions

  1. interval_type 
    operator()(value_type successes, value_type failures) const noexcept;
    Compute interval for given number of successes and failures.

    Parameters:

    failures

    Number of failed trials.

    successes

    Number of successful trials.


PrevUpHomeNext