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!
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]). $$