Top Description Constructors Methods
org.apache.commons.math3.stat.interval

public Class AgrestiCoullInterval

extends Object
implements BinomialConfidenceInterval
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.stat.interval.BinomialConfidenceInterval
Imports
org.apache.commons.math3.distribution.NormalDistribution, org.apache.commons.math3.util.FastMath

Implements the Agresti-Coull method for creating a binomial proportion confidence interval.
Since
3.3
See Also
Agresti-Coull interval (Wikipedia)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ConfidenceInterval
createInterval(int
number of trials
numberOfTrials
,
int
number of successes
numberOfSuccesses
,
double
desired probability that the true probability of success falls within the returned interval
confidenceLevel
)

Implements org.apache.commons.math3.stat.interval.BinomialConfidenceInterval.createInterval.

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AgrestiCoullIntervalback to summary
public AgrestiCoullInterval()

Method Detail

createIntervalback to summary
public ConfidenceInterval createInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel)

Implements org.apache.commons.math3.stat.interval.BinomialConfidenceInterval.createInterval.

Doc from org.apache.commons.math3.stat.interval.BinomialConfidenceInterval.createInterval.

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:int

number of trials

numberOfSuccesses:int

number of successes

confidenceLevel:double

desired probability that the true probability of success falls within the returned interval

Returns:ConfidenceInterval

Confidence interval containing the probability of success with probability confidenceLevel