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