Solved – Variance of compound distributions

beta distributiondistributionspoisson distribution

I am stuck at solving analytically the variance (or standard deviation) of a combination of poisson distribution and Beta-Distribution (or more exactly, PERT distribution). The background is that for a risk analysis I have a frequency of occurences and min value, normal value and max value of the damage if it occurs. The approximation for the sd of the damage is
(max value – min value)/6 and the sd of the frequency is simply sqrt(frequency). How do I get the right wheighting to get the mixed sd?

I thought I could mix a wheighting for the mean of the damage and the probability of no damage, and add the sd of the damage, but this does not give the right answer.

Re: jbowmans answer:

I think that solution would be a good first approximation, but numerical simulation makes me doubt that this would be an unbiased estimator. My results seem to indicate a consistent 3% underestimation of the observed standard deviation.

> diffSD = (resVar^0.5 - resVarDet^0.5)/resVarDet^0.5
> 
> summary(diffSD)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
0.006816 0.024870 0.028800 0.028860 0.032840 0.052650 

with

alpha = 1
beta = 1

loops = 10000
reps = 100000
resVar = rep(0, loops)

for (i in 1:loops)
{
  events = rpois(reps, lambda)
  #damage = rPERT(reps, minVal, mlVal, maxVal)
  damage = rbeta(reps, shape1=alpha, shape2=beta)
  resVar[i] = var(events*damage)
}

#resVarDet = varDet(lambda, meanPert(minVal, mlVal, maxVal), sdPert(minVal, maxVal))
resVarDet = varDet(lambda, meanBeta(alpha, beta), varBeta(alpha, beta)^0.5)

using the functions

meanBeta = function(alpha, beta)
{
  res = alpha/(alpha + beta)
  return(res)
}

varBeta = function(alpha, beta)
{
  res = (alpha * beta)/ ((alpha + beta)^2*(alpha + beta + 1))
  return (res)
}

varDet = function(lambda, mu, sigma)
{
  res = lambda * (mu^2 + sigma^2)
  return(res)
}

Best Answer

I'll first re-frame your question in more mathematical terms. You have a variable, label it $Y$, such that:

$Y = \sum_{i=1}^N X_i$

where:

$ N \sim \text{Poisson}(\lambda)$

$X_i \text{ i.i.d. some dist'n } f \text{ with mean }\mu \text{ and variance }\sigma^2$

and $N$ is independent of the $X_i$. In this case,

$\text{E}(Y) = \lambda \mu$

$\text{Var}(Y) = \lambda (\mu^2 + \sigma^2)$

The last line is a special case of the more general expression:

$\text{Var}(Y) = \mu_N \sigma^2_x + \sigma^2_N \mu^2_x$

which comes about as $\mu_N = \sigma^2_N = \lambda$.

Related Question