# joint probability and conditional probability question

The number of workplace injuries, $N$, occuring in a factory on any given day is Poisson distributed with mean $\lambda$ . The parameter $\lambda$ is a random variable that is determined by the level of activity in the factory, and is uniformly distributed on the interval $[0,3]$. Calculate $Var[N]$.

The answer 2.25 and i saw the answer used the relationship of $Var[N]=E(Var(N|\lambda)+Var(E[N|\lambda])$ but I'm not sure why this conditional probability is needed to be applied. Hope someone can explain how I should approach this problem thanks!

• You are given the conditional probability that $N=n$ given that $\lambda$ has a specific real number value in $[0,3]$, and not the unconditional probability that $N=n$. – Dilip Sarwate May 9 '15 at 1:23

It's because the distribution of $N$ is given as Poison with parameters $\lambda$, but $\lambda$ is itself a random variable with (continuous) uniform distribution over interval $[0;3]$. So what you are actually given is the conditional distribution of $N\mid\lambda$, not the unconditional distribution $N$.

So you must use the Law of Total Variance

\begin{align} (N\mid \lambda) &\sim \mathcal{Pois}(\lambda) \\[2ex] \Lambda &\sim \mathcal{U}[0;3] \\[2ex] \mathsf{Var}(N) & = \mathsf E\Big(\mathsf{Var}\big(N\mid \lambda\big)\Big)+\mathsf {Var}\Big(\mathsf E\big(N\mid \lambda\big)\Big) \end{align}

The first thing you must do is evaluate the variance and expectation of a Poisson Distribution: $\mathsf {Var}(N\mid\lambda)$ and $\mathsf E(N\mid \lambda)$ (which will be in terms of the r.v. $\lambda$). The next thing will to evaluate the variance and expectation of those results.

Recall the tower rule:

$$\mathbb E[N] = \mathbb E[\mathbb E[N|\lambda]].$$

So \begin{align*} \mathrm{Var}(N) &= \mathbb E[N^2] - \mathbb E[N]^2\\ &= \mathbb E[\mathbb E[N^2|\lambda]] - \mathbb E[\mathbb E[N|\lambda]]^2\\ \end{align*} By linearity of conditional expectation, this is equal to $$\mathbb E[\mathrm{Var}(N)|\lambda] + \mathbb E[\mathbb E[N|\lambda]^2] - \mathbb E[\mathbb E[N|\lambda]]^2,$$ which is simply $$\mathbb E[\mathrm{Var}(N)|\lambda] + \mathrm{Var}(\mathbb E[N|\lambda]).$$