| Modifier and Type | Field and Description |
|---|---|
| private static final BinomialConfidenceInterval | AGRESTI_COULL
Singleton Agresti-Coull instance. |
| private static final BinomialConfidenceInterval | CLOPPER_PEARSON
Singleton Clopper-Pearson instance. |
| private static final BinomialConfidenceInterval | NORMAL_APPROXIMATION
Singleton NormalApproximation instance. |
| private static final BinomialConfidenceInterval | WILSON_SCORE
Singleton Wilson score instance. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | checkParameters(int
number of trials (must be positive) numberOfTrials, int number of successes (must not exceed numberOfTrials) numberOfSuccesses, double confidence level (must be strictly between 0 and 1) confidenceLevel)Verifies that parameters satisfy preconditions. |
| public static ConfidenceInterval | Returns: Confidence interval containing the probability of success with probabilityconfidenceLevelnumber of trials numberOfTrials, int number of successes numberOfSuccesses, double desired probability that the true probability of
success falls within the returned interval confidenceLevel)Create an Agresti-Coull binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level. |
| public static ConfidenceInterval | Returns: Confidence interval containing the probability of success with probabilityconfidenceLevelnumber of trials numberOfTrials, int number of successes numberOfSuccesses, double desired probability that the true probability of
success falls within the returned interval confidenceLevel)Create a Clopper-Pearson binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level. |
| public static ConfidenceInterval | Returns: Confidence interval containing the probability of success with probabilityconfidenceLevelnumber of trials numberOfTrials, int number of successes numberOfSuccesses, double desired probability that the true probability of
success falls within the interval confidenceLevel)Create a binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level using the Normal approximation to the binomial distribution. |
| public static ConfidenceInterval | Returns: Confidence interval containing the probability of success with probabilityconfidenceLevelnumber of trials numberOfTrials, int number of successes numberOfSuccesses, double desired probability that the true probability of
success falls within the returned interval confidenceLevel)Create a Wilson score binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level. |
| AGRESTI_COULL | back to summary |
|---|---|
| private static final BinomialConfidenceInterval AGRESTI_COULL Singleton Agresti-Coull instance. | |
| CLOPPER_PEARSON | back to summary |
|---|---|
| private static final BinomialConfidenceInterval CLOPPER_PEARSON Singleton Clopper-Pearson instance. | |
| NORMAL_APPROXIMATION | back to summary |
|---|---|
| private static final BinomialConfidenceInterval NORMAL_APPROXIMATION Singleton NormalApproximation instance. | |
| WILSON_SCORE | back to summary |
|---|---|
| private static final BinomialConfidenceInterval WILSON_SCORE Singleton Wilson score instance. | |
| IntervalUtils | back to summary |
|---|---|
| private IntervalUtils() Prevent instantiation. | |
| checkParameters | back to summary |
|---|---|
| pack-priv static void checkParameters(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) Verifies that parameters satisfy preconditions.
| |
| getAgrestiCoullInterval | back to summary |
|---|---|
| public static ConfidenceInterval getAgrestiCoullInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) Create an Agresti-Coull binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level.
| |
| getClopperPearsonInterval | back to summary |
|---|---|
| public static ConfidenceInterval getClopperPearsonInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) Create a Clopper-Pearson binomial 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:
| |
| getNormalApproximationInterval | back to summary |
|---|---|
| public static ConfidenceInterval getNormalApproximationInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) Create a binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level using the Normal approximation to the binomial distribution.
| |
| getWilsonScoreInterval | back to summary |
|---|---|
| public static ConfidenceInterval getWilsonScoreInterval(int numberOfTrials, int numberOfSuccesses, double confidenceLevel) Create a Wilson score binomial confidence interval for the true probability of success of an unknown binomial distribution with the given observed number of trials, successes and confidence level.
| |