|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.math.num.pdf.DiscreteDistribution
jhplot.math.num.pdf.Hypergeometric
public class Hypergeometric
The Hypergeometric distribution.
References:
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Hypergeometric()
public Hypergeometric(int successes, int failures, int sample)
successes
- the number of successes.failures
- the number of failures.sample
- the sample size.Method Detail |
---|
public double cumulativeProbability(int x) throws NumericException
cumulativeProbability
in class DiscreteDistribution
x
- 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 DiscreteDistribution
p
- the cumulative probability.
NumericException
- if the inverse cumulative probability can not be
computed.public double probability(int x)
probability
in class DiscreteDistribution
x
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |