public class BinomialProportion extends Object
Modifier and Type | Method and Description |
---|---|
static ConfidenceInterval |
getAgrestiCoullInterval(int numberOfTrials,
double probabilityOfSuccess,
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, probability of success and
confidence level.
|
static ConfidenceInterval |
getClopperPearsonInterval(int numberOfTrials,
double probabilityOfSuccess,
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, probability of success and
confidence level.
|
static ConfidenceInterval |
getNormalApproximationInterval(int numberOfTrials,
double probabilityOfSuccess,
double confidenceLevel)
Create a binomial confidence interval using normal approximation
for the true probability of success of an unknown binomial distribution
with the given observed number of trials, probability of success and
confidence level.
|
static ConfidenceInterval |
getWilsonScoreInterval(int numberOfTrials,
double probabilityOfSuccess,
double confidenceLevel)
Create an Wilson score binomial confidence interval for the true
probability of success of an unknown binomial distribution with
the given observed number of trials, probability of success and
confidence level.
|
public static ConfidenceInterval getAgrestiCoullInterval(int numberOfTrials, double probabilityOfSuccess, double confidenceLevel) throws MathIllegalArgumentException
Preconditions:
numberOfTrials
must be positiveprobabilityOfSuccess
must be between 0 and 1 (inclusive)confidenceLevel
must be strictly between 0 and 1 (exclusive)numberOfTrials
- number of trialsprobabilityOfSuccess
- observed probability of successconfidenceLevel
- desired probability that the true probability of
success falls within the returned intervalconfidenceLevel
MathIllegalArgumentException
- if numberOfTrials <= 0
.MathIllegalArgumentException
- if probabilityOfSuccess
is not in the interval [0, 1].MathIllegalArgumentException
- if confidenceLevel
is not in the interval (0, 1).public static ConfidenceInterval getClopperPearsonInterval(int numberOfTrials, double probabilityOfSuccess, double confidenceLevel) throws MathIllegalArgumentException
Preconditions:
numberOfTrials
must be positiveprobabilityOfSuccess
must be between 0 and 1 (inclusive)confidenceLevel
must be strictly between 0 and 1 (exclusive)numberOfTrials
- number of trialsprobabilityOfSuccess
- observed probability of successconfidenceLevel
- desired probability that the true probability of
success falls within the returned intervalconfidenceLevel
MathIllegalArgumentException
- if numberOfTrials <= 0
.MathIllegalArgumentException
- if probabilityOfSuccess
is not in the interval [0, 1].MathIllegalArgumentException
- if confidenceLevel
is not in the interval (0, 1).public static ConfidenceInterval getNormalApproximationInterval(int numberOfTrials, double probabilityOfSuccess, double confidenceLevel) throws MathIllegalArgumentException
Preconditions:
numberOfTrials
must be positiveprobabilityOfSuccess
must be between 0 and 1 (inclusive)confidenceLevel
must be strictly between 0 and 1 (exclusive)numberOfTrials
- number of trialsprobabilityOfSuccess
- observed probability of successconfidenceLevel
- desired probability that the true probability of
success falls within the returned intervalconfidenceLevel
MathIllegalArgumentException
- if numberOfTrials <= 0
.MathIllegalArgumentException
- if probabilityOfSuccess
is not in the interval [0, 1].MathIllegalArgumentException
- if confidenceLevel
is not in the interval (0, 1).public static ConfidenceInterval getWilsonScoreInterval(int numberOfTrials, double probabilityOfSuccess, double confidenceLevel) throws MathIllegalArgumentException
Preconditions:
numberOfTrials
must be positiveprobabilityOfSuccess
must be between 0 and 1 (inclusive)confidenceLevel
must be strictly between 0 and 1 (exclusive)numberOfTrials
- number of trialsprobabilityOfSuccess
- observed probability of successconfidenceLevel
- desired probability that the true probability of
success falls within the returned intervalconfidenceLevel
MathIllegalArgumentException
- if numberOfTrials <= 0
.MathIllegalArgumentException
- if probabilityOfSuccess
is not in the interval [0, 1].MathIllegalArgumentException
- if confidenceLevel
is not in the interval (0, 1).Copyright © 2016–2019 Hipparchus.org. All rights reserved.