public class DistNegativeBinomial extends DistributionDiscrete implements java.io.Serializable
Compare this to Wikipedia's definition, where it is the number of successes before r failures.
CUMULATIVE_PROB_TOLERANCE| Constructor and Description |
|---|
DistNegativeBinomial(int n,
double p)
Create a negative binomial distribution instance.
|
| Modifier and Type | Method and Description |
|---|---|
Distribution |
createUnregisteredCopy()
Create an unregistered copy of this distribution.
|
int |
getN()
Get the distribution's n parameter (number of successes).
|
double |
getP()
Get the distribution's p parameter (probability of success).
|
void |
setN(int n)
Change (set) the n parameter of the distribution.
|
void |
setP(double p)
Change (set) the p parameter of the distribution.
|
java.lang.String |
toString()
Custom toString implementation.
|
sampleDouble, sampleIntcreateRegisteredCopygetSampler, registerAccessInfo, registerSamplerpublic DistNegativeBinomial(int n,
double p)
n - The n parameter (number of successes).p - The p parameter (probability of success per trial).public void setP(double p)
p - The new p parameter (probability of success).public double getP()
public void setN(int n)
n - The new n parameter (number of successes).public int getN()
public java.lang.String toString()
toString in class DistributionDiscrete"NegBin(8, 0.5)".public Distribution createUnregisteredCopy()
createUnregisteredCopy in class Distribution