ikr.simlib.distributions.continuous.transform

## Class NestedDistribution

• All Implemented Interfaces:
ReflectionConstructable, ReflectionConstructable3<SimNode,Parameters,RandomNumberGenerator>

public class NestedDistribution
extends ContinuousDistribution
Nested Distribution
Meaning: The nested distribution gives the distribution of a sum of random variables $$T_1, T_2, ..., T_N$$ that each are described by a continuous ("inner") distribution. The number of addends $$N$$ itself is a random variable with discrete ("outer") distribution. In literature, this distribution is also denoted as compound distribution. inner distribution with PDF $$g(t)$$ and DF $$G(t)$$ outer distribution $$p_i$$ $$P(T=t) = f(t) = \sum\limits_{n=0}^{\infty} p_n \cdot (g_1(t) \otimes ... \otimes g_n(t)) \mbox{ with } g_i(t) \equiv g(t) \forall i$$ $$E[T] = E[N] \cdot E[T_i]$$ $$VAR[T]= VAR[T_i] \cdot E[N] + VAR[N] \cdot (E[T_i])^2$$ $$c_T = \sqrt{\frac{c_{T_i}^2}{E[N]} + c_N^2}$$ $$\phi(s) = H(\Psi(s))$$ , if $$H(z)$$ represents the generating function of the external and $$\Psi(s)$$ the LST of the inner distribution.  [...].Distribution = NestedDistribution [...].Distribution.InnerDist = Constant [...].Distribution.InnerDist.Mean = 2.3 [...].Distribution.OuterDist = Geometric [...].Distribution.OuterDist.Mean = 9 
• ### Field Summary

Fields
Modifier and Type Field and Description
ContinuousDistribution innerDist
DiscreteDistribution outerDist
• ### Fields inherited from class ikr.simlib.distributions.Distribution

rng
• ### Fields inherited from interface ikr.simlib.parameters.reflection.ReflectionConstructable

CREATE_INSTANCE_METHOD_NAME
• ### Constructor Summary

Constructors
Constructor and Description
NestedDistribution(ContinuousDistribution innerDist, DiscreteDistribution outerDist)
• ### Method Summary

Methods
Modifier and Type Method and Description
static NestedDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
double next()
Create random numbers
• ### Methods inherited from class ikr.simlib.distributions.Distribution

getDefaultRNG, getRandomNumberGenerator, reset
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Field Detail

• #### innerDist

public final ContinuousDistribution innerDist
• #### outerDist

public final DiscreteDistribution outerDist
• ### Constructor Detail

• #### NestedDistribution

public NestedDistribution(ContinuousDistribution innerDist,
DiscreteDistribution outerDist)
• ### Method Detail

• #### createInstance

public static NestedDistribution createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
• #### next

public double next()
Description copied from class: ContinuousDistribution
Create random numbers
Specified by:
next in class ContinuousDistribution