1
$\begingroup$

$\newcommand{\Var}{\mathrm{Var}}$ Consider $Z_i$ as a binary random variable with $\mathrm{Pr}[Z_i = 1] = \pi$. Also, consider $Y_i$ as:

$Y_i|Z_i = 0 \sim \mathrm{Poisson} (\lambda_0) $

$Y_i|Z_i = 1 \sim \mathrm{Poisson} (\lambda_1) $

My question is how we can find $\Var(Y_i)$.

Here is what I think I should do, but I've not had any success till now:

$\Var(Y_i) = E(\Var(Y_i|Z_i)) + \Var(E(Y_i|Z_i)) = E(\pi\cdot\lambda_1 + (1 - \pi)\cdot\lambda_0) + \Var(\pi\cdot\lambda_1 + (1 - \pi)\cdot\lambda_0) = \pi\cdot\lambda_1 + (1 - \pi)\cdot\lambda_0 + 0 $

What I've got above is different from what my instructor has in his lecture notes. He has: $\Var(Y_i) = \pi\cdot\lambda_1 + (1 - \pi)\cdot\lambda_0 + (\lambda_1 - \lambda_0)^2\cdot\pi\cdot(1 - \pi)$

I appreciate your help.

$\endgroup$

1 Answer 1

4
$\begingroup$

\begin{align} \textrm{Var}\left[Y\right] &= \textrm{E}\left[\textrm{Var}\left[Y\mid Z\right]\right]+\textrm{Var}\left[\textrm{E}\left[Y\mid Z\right]\right]\\ &= \textrm{E}\left[\left(1-Z\right)\lambda_0+Z\lambda_1\right]+\textrm{Var}\left[\left(1-Z\right)\lambda_0+Z\lambda_1\right]\\ &= \left(1-\pi\right)\lambda_0+\pi\lambda_1+\textrm{Var}\left[\lambda_0+Z\left(\lambda_1-\lambda_0\right)\right]\\ &= \left(1-\pi\right)\lambda_0+\pi\lambda_1+\left(\lambda_1-\lambda_0\right)^2\pi\left(1-\pi\right) \end{align}

Just a side note: If you ever use this law of total variance and find that your conditional expectation and variance do not depend on the random variable on which you've conditioned, something probably went wrong.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.