public class DiscreteTransformedDistribution extends DiscreteDistribution
Meaning: | Distribution of a discrete random variable \(X\), that results from a linear transformation \(X = aY + b\) of the random variable \(Y\) with a given discrete distribution ("base distribution"). |
---|---|
Parameters: |
|
Distribution: | \(P(X=i) = p_i = \begin{cases} q_j &\mbox{for } i=aj+b, j=0,1,... \\ 0 &\mbox{else} \end{cases}\) |
Expected value: | \(E[X] = a \cdot E[Y] +b\) |
Variance: | \(VAR[X]= a^2 \cdot VAR[Y]\) |
Coefficient of variation: | \(c_T = \frac{1}{\frac{1}{c_z} + \frac{b}{a \sqrt{VAR[Y]}}}\) |
Parser example: |
[...].Distribution = DiscreteTransformedDistribution
|
Modifier and Type | Field and Description |
---|---|
DiscreteDistribution |
baseDist |
int |
factor |
int |
offset |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
DiscreteTransformedDistribution(DiscreteDistribution baseDist) |
DiscreteTransformedDistribution(DiscreteDistribution baseDist,
int offset) |
DiscreteTransformedDistribution(DiscreteDistribution baseDist,
int offset,
int factor) |
Modifier and Type | Method and Description |
---|---|
static DiscreteTransformedDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public final DiscreteDistribution baseDist
public final int offset
public final int factor
public DiscreteTransformedDistribution(DiscreteDistribution baseDist, int offset, int factor)
public DiscreteTransformedDistribution(DiscreteDistribution baseDist, int offset)
public DiscreteTransformedDistribution(DiscreteDistribution baseDist)
public static DiscreteTransformedDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
DiscreteDistribution
next
in class DiscreteDistribution