public class Hypergeometric extends DiscreteDistribution
The Hypergeometric distribution.
References:
| Constructor and Description |
|---|
Hypergeometric()
Default constructor.
|
Hypergeometric(int successes,
int failures,
int sample)
Create a distribution with the given number of failures, number of
successes, and sample size.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cumulativeProbability(int x)
The CDF for this distribution.
|
int |
getNumberOfFailures()
Access the number of failures.
|
int |
getNumberOfSuccesses()
Access the number of successes.
|
int |
getSampleSize()
Access the sample size.
|
int |
inverseCumulativeProbability(double p)
The inverse CDF for this distribution.
|
double |
probability(int x)
The PMF for this distribution.
|
void |
setNumberOfFailures(int n)
Modify the number of failures.
|
void |
setNumberOfSuccesses(int n)
Modify the number of successes.
|
void |
setSampleSize(int n)
Modify the sample size.
|
public Hypergeometric()
public Hypergeometric(int successes,
int failures,
int sample)
successes - the number of successes.failures - the number of failures.sample - the sample size.public double cumulativeProbability(int x)
throws NumericException
cumulativeProbability in class DiscreteDistributionx - the value at which the CDF is evaluated.NumericException - if the cumulative probability can not be
computed.public int getNumberOfFailures()
public int getNumberOfSuccesses()
public int getSampleSize()
public int inverseCumulativeProbability(double p)
throws NumericException
inverseCumulativeProbability in class DiscreteDistributionp - the cumulative probability.NumericException - if the inverse cumulative probability can not be
computed.public double probability(int x)
probability in class DiscreteDistributionx - the value at which the probability is evaluated.public void setNumberOfFailures(int n)
n - the new number of failures value.public void setNumberOfSuccesses(int n)
n - the new number of successes value.public void setSampleSize(int n)
n - the new sample size value.DMelt 2.0 © DataMelt by jWork.ORG