# Concatenation of Distributions

I would like to calculate mean, variance, ... of a concatenation of distributions (is this the correct technical term?). For an easy example I am trying to calculate the mean of a PoissonDistribution where the position parameter is normally distributed. The following does not produce the desired result of m:

Mean[PoissonDistribution[NormalDistribution[m, 1]]]

• The general term is "hierarchical modeling". There are Frequentist and Bayesian approaches. Here's a link to a Bayesian definition: en.wikipedia.org/wiki/Bayesian_hierarchical_modeling. (Note that there are lots of other uses of the term "hierarchical modeling" so searching for that term will get you stuff that doesn't match what you want to do.) – JimB Sep 18 '20 at 16:22

You can use ParameterMixtureDistribution

Mean @ ParameterMixtureDistribution[PoissonDistribution[λ],
Distributed[ λ, NormalDistribution[m, 1]]]

Undefined


We need to use a distribution with positive support for the distribution of λ:

Mean @ ParameterMixtureDistribution[PoissonDistribution[λ],
Distributed[ λ, LogNormalDistribution[m, 1]]]

  E^(1/2 + m)

Mean @ ParameterMixtureDistribution[PoissonDistribution[λ],
Distributed[λ, ExponentialDistribution[τ]]]


-1 + (1 + τ)/τ

• Thank you very much, ParameterMixtureDistribution was exactly what I was looking for! – jitter Sep 18 '20 at 12:41
• @jitter, my pleasure. Thank you for the accept. And welcome to mma.se. – kglr Sep 18 '20 at 12:42