|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.doodleproject.numerics4j.statistics.distribution.DiscreteDistribution net.sf.doodleproject.numerics4j.statistics.distribution.BinomialDistribution
public class BinomialDistribution
The Binomial distribution.
References:
Constructor Summary | |
---|---|
BinomialDistribution()
Default constructor. |
|
BinomialDistribution(int n,
double p)
Create a distribution with the given number of trials and probability of success. |
Method Summary | |
---|---|
double |
cumulativeProbability(int x)
The CDF for this distribution. |
int |
getNumberOfTrials()
Access the number of trials. |
double |
getProbabilityOfSuccess()
Access probability of success. |
int |
inverseCumulativeProbability(double p)
The inverse CDF for this distribution. |
double |
probability(int x)
The PMF for this distribution. |
void |
setNumberOfTrials(int n)
Modify the number of trials. |
void |
setProbabilityOfSuccess(double p)
Modify probability of success. |
Methods inherited from class net.sf.doodleproject.numerics4j.statistics.distribution.DiscreteDistribution |
---|
findInverseCumulativeProbability, simpleCumulativeProbability |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinomialDistribution()
public BinomialDistribution(int n, double p)
n
- the number of trials.p
- the probability of success.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 getNumberOfTrials()
public double getProbabilityOfSuccess()
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 setNumberOfTrials(int n)
n
- the new number of trials value.public void setProbabilityOfSuccess(double p)
p
- the new probability of success value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |