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 wald_interval

boost::histogram::utility::wald_interval — Wald interval or normal approximation interval.

Synopsis

// In header: <boost/histogram/fwd.hpp>

template<typename ValueType> 
class wald_interval :
  public boost::histogram::utility::binomial_proportion_interval< ValueType >
{
public:
  // construct/copy/destruct
  explicit wald_interval(deviation = deviation{1.0}) noexcept;

  // public member functions
  interval_type operator()(value_type, value_type) const noexcept;
};

Description

The Wald interval is a symmetric interval. It is simple to compute, but has poor statistical properties and is universally rejected by statisticians. It should always be replaced by another iternal, for example, the Wilson interval.

The Wald interval can be derived easily using the plug-in estimate of the variance for the binomial distribution, which is likely a reason for its omnipresence. Without further insight into statistical theory, it is not obvious that this derivation is flawed and that better alternatives exist.

The Wald interval undercovers on average. It is unsuitable when the sample size is small or when the fraction is close to 0 or 1. e. Its limits are not naturally bounded by 0 or 1. It produces empty intervals if the number of successes or failures is zero.

For a critique of the Wald interval, see (a selection):

L.D. Brown, T.T. Cai, A. DasGupta, Statistical Science 16 (2001) 101-133. R. D. Cousins, K. E. Hymes, J. Tucker, Nucl. Instrum. Meth. A 612 (2010) 388-398.

wald_interval public construct/copy/destruct

  1. explicit wald_interval(deviation d = deviation{1.0}) noexcept;
    Construct Wald interval computer.

    Parameters:

    d

    Number of standard deviations for the interval. The default value 1 corresponds to a confidence level of 68 %. Both deviation andconfidence_level objects can be used to initialize the interval.

wald_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