Conditional expectation and total variance

Problem

Let Z∼Bernoulli⁡(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⁡(X∣Z)]=1+32=2\mathbb{E}[\operatorname{Var}(X\mid Z)] = \frac{1+3}{2} = 2

and

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

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

Outcome

Previous attempts

Loading attempts saved in this browser…

    Appears in