org.apache.commons.math3.stat.interval

## Interface BinomialConfidenceInterval

- All Known Implementing Classes:
    AgrestiCoullInterval, ClopperPearsonInterval, NormalApproximationInterval, WilsonScoreInterval

      public interface BinomialConfidenceInterval

  Abstract base class to generate confidence intervals for a binomial proportion.
  Since:
    3.3
  Version:
    $Id: BinomialConfidenceInterval.java 1560531 2014-01-22 22:00:37Z tn $
  See Also:
    Binomial proportion confidence interval (Wikipedia)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConfidenceInterval` | `createInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel)` Create a confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level.

- - ### Method Detail

    - #### createInterval

          ConfidenceInterval createInterval(int numberOfTrials,
                                          int numberOfSuccesses,
                                          double confidenceLevel)
                                            throws NotStrictlyPositiveException,
                                                   NotPositiveException,
                                                   NumberIsTooLargeException,
                                                   OutOfRangeException

      Create a confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level.

      Preconditions:

      - `numberOfTrials` must be positive
      - `numberOfSuccesses` may not exceed `numberOfTrials`
      - `confidenceLevel` must be strictly between 0 and 1 (exclusive)
      Parameters:
        `numberOfTrials` - number of trials
        `numberOfSuccesses` - number of successes
        `confidenceLevel` - desired probability that the true probability of success falls within the returned interval
      Returns:
        Confidence interval containing the probability of success with probability `confidenceLevel`
      Throws:
        `NotStrictlyPositiveException` - if `numberOfTrials <= 0`.
        `NotPositiveException` - if `numberOfSuccesses < 0`.
        `NumberIsTooLargeException` - if `numberOfSuccesses > numberOfTrials`.
        `OutOfRangeException` - if `confidenceLevel` is not in the interval `(0, 1)`.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.