public class HypergeometricDistributionImpl extends AbstractIntegerDistribution implements HypergeometricDistribution, java.io.Serializable
HypergeometricDistribution.| Constructor and Description |
|---|
HypergeometricDistributionImpl(int populationSize,
int numberOfSuccesses,
int sampleSize)
Construct a new hypergeometric distribution with the given the population
size, the number of successes in the population, and the sample size.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cumulativeProbability(int x)
For this distribution, X, this method returns P(X ≤ x).
|
int |
getNumberOfSuccesses()
Access the number of successes.
|
double |
getNumericalVariance()
Returns the variance.
|
int |
getPopulationSize()
Access the population size.
|
int |
getSampleSize()
Access the sample size.
|
int |
getSupportLowerBound()
Returns the lower bound for the support for the distribution.
|
int |
getSupportUpperBound()
Returns the upper bound for the support of the distribution.
|
double |
probability(int x)
For this distribution, X, this method returns P(X = x).
|
void |
setNumberOfSuccesses(int num)
Deprecated.
as of 2.1 (class will become immutable in 3.0)
|
void |
setPopulationSize(int size)
Deprecated.
as of 2.1 (class will become immutable in 3.0)
|
void |
setSampleSize(int size)
Deprecated.
as of 2.1 (class will become immutable in 3.0)
|
double |
upperCumulativeProbability(int x)
For this distribution, X, this method returns P(X ≥ x).
|
cumulativeProbability, cumulativeProbability, cumulativeProbability, inverseCumulativeProbability, isSupportLowerBoundInclusive, isSupportUpperBoundInclusive, probability, reseedRandomGenerator, sample, sampleequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcumulativeProbability, inverseCumulativeProbabilityprobabilitycumulativeProbability, cumulativeProbabilitypublic HypergeometricDistributionImpl(int populationSize,
int numberOfSuccesses,
int sampleSize)
populationSize - the population size.numberOfSuccesses - number of successes in the population.sampleSize - the sample size.public double cumulativeProbability(int x)
cumulativeProbability in interface IntegerDistributioncumulativeProbability in class AbstractIntegerDistributionx - the value at which the PDF is evaluated.public int getNumberOfSuccesses()
getNumberOfSuccesses in interface HypergeometricDistributionpublic int getPopulationSize()
getPopulationSize in interface HypergeometricDistributionpublic int getSampleSize()
getSampleSize in interface HypergeometricDistributionpublic double probability(int x)
probability in interface IntegerDistributionx - the value at which the PMF is evaluated.@Deprecated public void setNumberOfSuccesses(int num)
setNumberOfSuccesses in interface HypergeometricDistributionnum - the new number of successes.java.lang.IllegalArgumentException - if num is negative.@Deprecated public void setPopulationSize(int size)
setPopulationSize in interface HypergeometricDistributionsize - the new population size.java.lang.IllegalArgumentException - if size is not positive.@Deprecated public void setSampleSize(int size)
setSampleSize in interface HypergeometricDistributionsize - the new sample size.java.lang.IllegalArgumentException - if size is negative.public double upperCumulativeProbability(int x)
x - the value at which the CDF is evaluated.public int getSupportLowerBound()
N,
number of successes m, and
sample size n,
the lower bound of the support is
max(0, n + m - N)public int getSupportUpperBound()
m and
sample size n,
the upper bound of the support is
min(m, n)public double getNumericalVariance()
N,
number of successes m, and
sample size n, the variance is
[ n * m * (N - n) * (N - m) ] / [ N^2 * (N - 1) ]Copyright © 2010 - 2023 Adobe. All Rights Reserved