For any function g:R→R and random variables X,Y, the "tower property" of conditional expectations is
E[g(X)]=E[E[g(X)∣Y]].
Provide a proof of this property when both X,Y are discrete.
Let U1,U2,… be a sequence of independent uniform U(0,1)-random variables. For x∈[0,1] find the expected number of Ui 's needed such that their sum exceeds x, that is, find E[N(x)] where
N(x)=min{n:i=1∑nUi>x}
[Hint: Write E[N(x)]=E[E[N(x)∣U1]].]