Problem:
Let $X \sim \operatorname{Uniform}(0,1)$.
Let $0 < a < b < 1$. Let
$$Y = \begin{cases} 1 & ,\text{ when } 0 < x < b \\ 0 & , \text{ otherwise} \end{cases}$$
and let
$$Z =\begin{cases} 1 &,\text{ when } a < x < 1\\ 0& ,\text{ otherwise} \end{cases}$$
(a) Are $Y$ and $Z$ independent? Why/Why not?
(b) Find $E(Y|Z)$. Now find $E(Y|Z=z)$.
Attempt:
Let $X$ equal the following:
if $X = a$; then $Y = 1$, $Z = 0$
if $X = b$; then $Y = 0$, $Z = 1$
if $X = \frac{a+b}{2}$; then $Y = 1$, $Z = 1$
Notes:
- I am stuck at this point and do not know where to proceed.
- Any advice on direction would be helpful.
- Question is from "All of Statistics" by Larry Wasserman [Chapter 3, Q22]
- I am also a novice at Math StackExchange: any advice on how to form a proper question would also be useful.
Guide:
Notice that $Y$ and $Z$ takes binary value.
To determine if they are independent, note that \begin{align} \mathbb{E}(YZ) &= P(a < X < b) \\ \mathbb{E}(Y) &= P( 0 < X < b) \\ \mathbb{E}(Z)&=P(a < X< 1) \end{align}
check whether $\mathbb{E}(YZ)$ is equal to $\mathbb{E}(Y)\mathbb{E}(Z)$.
Note that $\mathbb{E}(Y|Z=0)=\mathbb{E}(Y|0<X<a)=P(0<X<b|0<X<a)$