I'm working through the problems in Wasserman's 'All of Statistics'. The chapter on expectations and conditional expectations ends with a (seemingly) easy problem:
Let $Y$ be the maximum of $n$ iid uniformly distributed rvs on $(0,1)$. What is $\mathbb{E}(Y)$?
I determined this using conditional expectations but having checked against answers on the site there must be a fault in my reasoning. Can someone please tell me where my fault was?
Suppose $n$ = 2, and the r.v.'s be $X_1, X_2$. For any draw, one will be the larger and one smaller. Let us denote them by $\max(X_1, X_2) = m$ And $\min(X_1, X_2) = l$ The problem should reduce to finding $ \mathbb{E}(m)$.
By the Law of Iterated Expectations, $\mathbb{E}(m) = \mathbb{E}(\mathbb{E}(m|l))$.
Which would be $$ \int_0^1 [\int_l^1 [m.f(m|l)] \text{d}m f(l)] \text{d}l$$
$f(m|l)$ should be $\frac 1 {1 - l}$.
$f(l)$ is simply the uniform pdf so is 1.
Therefore the expression to compute should be
$$ \int_0^1 [\int_l^1 [m.\frac 1 {1 - l}] \text{d}m] \text{d}l $$
$$ = \int_0^1 [\frac {m^2} {2(1-l)}]^1_l \text{d}l $$
$$ = \int_0^1 [\frac {1+l} 2] \text{d}l $$
$$ = [\frac {l} {2}+\frac {l^2} {4} ]_0^1 $$
$$ = \frac 3 4 $$
Furthermore one can generalise to $ 1 - \frac 1 {2^n}$.
This is incorrect, as has been demonstrated by numerous other excellent answers the solution should $ \frac n {n + 1}$.
What have I gotten wrong here?