# How do I calculate conditional variance for a discrete problem?

Problem:

A manuscript is sent to a typing firm consisting of typists A,B, and C. If it is typed by A, then the number of errors made is a Poisson random variable with mean 2.6; if typed by B, then the number of errors is a Poisson random variable with mean 3; and if typed by C, then it is a Poisson random variable with mean 3.4. Let X denote the number of errors in the typed manuscript. Assume that each typist is equally likely to do the work.

Attempt:

\begin{aligned} &X \mid A \sim \operatorname{POI}(2.6) \\ &X \mid B \sim \operatorname{POI}(3) \\ &X \mid C \sim \operatorname{POI}(3.4) \end{aligned}

$$$$P(A)=P(B)=P(C)$$$$

I first calculate the expectation of $$X$$.

\begin{aligned} E(x) &=E(X \mid A) \cdot P(A)+E(X \mid B) \cdot P(B)+E(X \mid C) \cdot P(C) \\ &=2.6 \cdot 1 / 3+3 \cdot 1 / 3+3.4 \cdot 1 / 3 \\ &=1 / 3(2.6+3+3.4) \\ &=3 \end{aligned}

I know that the formula for conditional variance is:

$$$$\operatorname{Var}(X)=E(\operatorname{Var}(X \mid Y))+\operatorname{Var}(E[X \mid Y])$$$$

But I don't understand how to incorporate all the discrete events. My guess is to apply this formula for all the probabilities conditioned on $$A,B,C$$ and then take the (weighted) average, but this attempt is more based on a guess than sound mathematical thinking.

Could I please get feedback on this?

• I would use $E[X^2] = (E[X])^2 + Var(X)$ which you can easily find for each typist and so for the mixture Oct 24, 2022 at 16:09

You have used the Law of Total Expectation and the definition of expectation to evaluate: \begin{align}\mathsf E(X)&=\mathsf E(\mathsf E(X\mid Y))\\&=\big(\mathsf E(X\mid A)+\mathsf E(X\mid B)+\mathsf E(X\mid C)\big)/3\end{align}
\begin{align}\mathsf E(\mathsf{Var}(X\mid Y)) &= \big(\mathsf{Var}(X\mid A)+\mathsf{Var}(X\mid B)+\mathsf{Var}(X\mid C)\big)/3\\[3ex]\mathsf{Var}(\mathsf E(X\mid Y))&=\mathsf E(\mathsf E(X\mid Y)^2)-\mathsf E(\mathsf E(X\mid Y))^2\\[1ex]&=\big(\mathsf E(X\mid A)^2+\mathsf E(X\mid B)^2+\mathsf E(X\mid C)^2\big)/3-\mathsf E(X)^2\end{align}