public class GeometricDistribution extends NegativeBinomialDistribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
GeometricDistribution()
This default constructor creates a new geometric distribution with parameter 0.5
|
GeometricDistribution(double p)
This general constructor creates a new geometric distribution with
a specified success probabilitiy
|
Modifier and Type | Method and Description |
---|---|
double |
getFactorialMoment(int k)
This method computes the factorial moment of a specified order.
|
void |
setParameters(int k,
double p)
This method sets the negative binomial parameters, and ensures that the
number of successes is set at 1.
|
void |
setSuccesses(int k)
This method ensures that the number of successes is set at 1.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
getDensity, getMaxDensity, getMean, getMGF, getPGF, getProbability, getSuccesses, getVariance, setProbability, simulate
getCDF, getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain
public GeometricDistribution(double p)
p
- the success probabilitypublic GeometricDistribution()
public double getFactorialMoment(int k)
k
- the orderpublic void setSuccesses(int k)
setSuccesses
in class NegativeBinomialDistribution
k
- the number of successespublic void setParameters(int k, double p)
setParameters
in class NegativeBinomialDistribution
k
- the number of successesp
- the probability of successpublic java.lang.String toString()
toString
in class NegativeBinomialDistribution