|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjhplot.math.num.pdf.DiscreteDistribution
jhplot.math.num.pdf.NegativeBinomial
public class NegativeBinomial
The Negative Binomial distribution.
References:
| Constructor Summary | |
|---|---|
NegativeBinomial()
Default constructor. |
|
NegativeBinomial(int r,
double p)
Create a distribution with the given number of successes and probability of success. |
|
| Method Summary | |
|---|---|
double |
cumulativeProbability(int x)
The CDF for this distribution. |
double |
getMean()
Get mean value. |
int |
getNumberOfSuccesses()
Access the number of successes. |
double |
getProbabilityOfSuccess()
Access probability of success. |
double |
getVariance()
Get mean value. |
int |
inverseCumulativeProbability(double p)
The inverse CDF for this distribution. |
double |
probability(int x)
The PMF for this distribution. |
void |
setNumberOfSuccesses(int r)
Modify the number of successes. |
void |
setProbabilityOfSuccess(double p)
Modify probability of success. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NegativeBinomial()
public NegativeBinomial(int r,
double p)
r - the number of successes.p - the probability of success.| Method Detail |
|---|
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 getNumberOfSuccesses()
public double getProbabilityOfSuccess()
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 setNumberOfSuccesses(int r)
r - the new number of successes value.public double getMean()
r - the new number of successes value.public double getVariance()
r - the new number of successes 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 | ||||||||