public class GeometricDistribution extends DiscreteDistribution
Meaning: | Probability for \(i\) failures prior to the first success in independent Bernoulli experiments with the parameter \(q(0 \le q \le 1)\) |
---|---|
Parameters: | success probability \(q(0 < q \le 1)\) With mean parameter \(m : q = \frac{1}{1+m}\) |
Distribution: | \(P(X=i) = (1-q)^i \cdot q = (\frac{m}{m+1})^i \cdot \frac{1}{m+1} \mbox{for } i = 0,1,2,... \) |
Expected value: | \(E[X]=\frac{1-q}{q}=m \) |
Variance: | \(VAR[X]=\frac{1-q}{q^2} = m \cdot (m+1)\) |
Coefficient of variation: | \(c_T= \sqrt{ \frac{1}{1-q}} = \sqrt{ \frac{m+1}{m} } \ge 1\) |
Generating func.: | \(G(z)= \frac{q}{1-z(1-q)} = \frac{1}{m+1-zm} \) |
Parser example: |
[...].Distribution = Geometric
|
Modifier and Type | Field and Description |
---|---|
double |
geomet_q |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
GeometricDistribution(double mean) |
GeometricDistribution(double mean,
RandomNumberGenerator rng) |
Modifier and Type | Method and Description |
---|---|
static GeometricDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public GeometricDistribution(double mean, RandomNumberGenerator rng)
public GeometricDistribution(double mean)
public static GeometricDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
DiscreteDistribution
next
in class DiscreteDistribution