This is a problem from All of Statistics by Wasserman that I have been struggling with for a while.


Let $X \sim \text{Uniform}(0,1)$. Let $0<a<b<1$. Let \begin{equation} Y = \begin{cases} 1 & 0<x<b\\ 0 \end{cases} \end{equation} \begin{equation} Z = \begin{cases} 1 & a<x<1\\ 0 \end{cases} \end{equation}

a) Are $Y$, $Z$ independent? Why/Why not?

b) Find $E(Y|Z)$. Hint: What values $z$ can $Z$ take?


With help from the comments above, I believe I figured it out:

Using the fact that $X\sim\text{Uniform}(0,1)$,

$$P(Y=1,Z=1)=P(x\in(0,b)~\land x\in(a,1)) = b-a$$


$$P(Y=1)P(Z=1) = b(1-a) $$

This shows that $Y,Z$ are dependent.

For part (b), following the hint, we have

\begin{align} E(Y|Z=z) &= \sum_{y} y P(Y=y | Z = z) \\ &= \sum_{y} y P(Y=y,Z=z)/P(Z=z)\\ &= 0 + (1)P(Y=1,Z=z)/P(Z=z)\\ &= P(Y=1,Z=z)/P(Z=z)\\ \end{align}

Compute the probabilities $P(Y=1,Z=z)$ and $P(Z=z)$ for $Z=0,1$ to find \begin{align} E(Y|Z=z) = \begin{cases} \frac{b-a}{1-a} & z=1\\ 1 & z=0 \end{cases} \end{align}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.