Conditional expectation and total variance

Problem

Let ZBernoulli(1/2)Z \sim \operatorname{Bernoulli}(1/2). Conditional on Z=0Z=0, XX has mean 00 and variance 11; conditional on Z=1Z=1, XX has mean 22 and variance 33. Compute E[X]\mathbb{E}[X] and Var(X)\operatorname{Var}(X).

Reveal answer or reference solution

We have E[X]=1\mathbb{E}[X]=1. Also,

E[Var(XZ)]=1+32=2\mathbb{E}[\operatorname{Var}(X\mid Z)] = \frac{1+3}{2} = 2

and

Var(E[XZ])=1,\operatorname{Var}(\mathbb{E}[X\mid Z]) = 1,

because E[XZ]\mathbb{E}[X\mid Z] equals 00 or 22 with equal probability. Therefore, Var(X)=3\operatorname{Var}(X)=3.

Local history

Loading attempts saved in this browser…

    Appears in