4.6 Practice Problems

Problem 4.6.1. A fair die is rolled. If the result is \(N\), a fair coin is then tossed \(N\) times. Let \(H\) be the number of heads. Find \(E(H)\) and \(\Var (H)\).

Show solution

Solution. Given \(N=n\), \(H\sim \) BIN\(\left (n,\tfrac 12\right )\), so \[E\left (H\mid N\right ) = \frac {N}{2},\qquad \Var \left (H\mid N\right ) = \frac {N}{4}.\] For a fair die \(E(N) = 3.5\) and \(\Var (N) = \tfrac {35}{12}\). Hence \[E(H) = E\left [\frac {N}{2}\right ] = 1.75 ,\] and by the conditional variance formula, \[\Var (H) = E\left [\frac {N}{4}\right ] + \Var \left [\frac {N}{2}\right ] = \frac {3.5}{4} + \frac {1}{4}\cdot \frac {35}{12} = 0.875 + 0.7292 = 1.6042 .\] Both terms are needed: the first is the coin’s randomness, the second the die’s.

Problem 4.6.2. Let \(X\) and \(Y\) have joint density \(f(x,y) = 2\) on \(0<x<y<1\). Find \(E\left (X\mid Y=y\right )\) and verify that \(E\left [E\left (X\mid Y\right )\right ] = E(X)\).

Show solution

Solution. The marginal of \(Y\) is \(f_Y(y) = \int _0^{y}2\,dx = 2y\) on \((0,1)\), so the conditional density is \[f_{X\mid Y}(x\mid y) = \frac {2}{2y} = \frac {1}{y},\qquad 0<x<y,\] which is UNIF\((0,y)\). Hence \(E\left (X\mid Y=y\right ) = y/2\).

Now \(E(Y) = \int _0^{1}y\cdot 2y\,dy = \tfrac 23\), so \[E\left [E\left (X\mid Y\right )\right ] = E\left (\frac {Y}{2}\right ) = \frac 13 .\] Directly, \(f_X(x) = \int _x^{1}2\,dy = 2(1-x)\), giving \(E(X) = \int _0^{1}2x(1-x)\,dx = 1 - \tfrac 23 = \tfrac 13\). The two agree.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.