|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution edu.uah.math.distributions.NegativeBinomialDistribution edu.uah.math.distributions.GeometricDistribution
public class GeometricDistribution
This class models the geometric distribution with a given success probability. This distribution models the trial number of the first success in a sequence of Bernoulli trials.
Field Summary |
---|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class edu.uah.math.distributions.NegativeBinomialDistribution |
---|
getDensity, getMaxDensity, getMean, getMGF, getPGF, getProbability, getSuccesses, getVariance, setProbability, simulate |
Methods inherited from class edu.uah.math.distributions.Distribution |
---|
getCDF, getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GeometricDistribution(double p)
p
- the success probabilitypublic GeometricDistribution()
Method Detail |
---|
public double getFactorialMoment(int k)
k
- the order
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |