# Expected value of multiple random variables, uniform distribution

Suppose that the random variables $X_1,\dotsc,X_n$ form a random sample of size $n$ from the uniform distribution on the interval $\left[0, 1\right]$. Let $Y_1 = \min\left\{X_1,\dotsc,X_n\right\}$, and let $Y_n = \max\left\{X_1,\dotsc, X_n\right\}$. Find $\mathbb{E}\left[Y_1\right]$ and $\mathbb{E}\left[Y_n\right]$.

Going straight into it I tried taking $\mathbb{E}\left[X\right] = \int_a^b xf\left(x\right)\,\mathrm{d}x$, but with $y$, it turned out hideously wrong. I found the correct form for $y_\min$ to be $$\int_0^1yn\left(1-y\right)^{\left(n-1\right)}\,\mathrm{d}y$$ and the $y_\max$ to be $$\int_0^1yny^{\left(n-1\right)}\,\mathrm{d}y.$$

This looks very similar to $p^n$ and $\left(1-p\right)^n$. Are the exponents $\left(n-1\right)$ because of the range of values from $1$ to $n$? Also, I don't understand what the $n$ is doing being multiplied by the $\left(1-y\right)$ in $y_\min$ and $y_\max$.

If I could get some clarification on the form that would be great :3

Answer is $\mathbb{E}\left[Y_1\right] = \frac{1}{\left(n+1\right)}$ and $\mathbb{E}\left[Y_n\right] = \frac{n}{\left(n+1\right)}$ btw.

By symmetry, $E(Y_n)=1-E(Y_1)$. Furthermore, $$E(Y_1)=\int_0^\infty P(Y_1\geqslant y)\mathrm dy=\int_0^\infty P(\forall k\in[1,n],X_k\geqslant y)\mathrm dy,$$ hence $$E(Y_1)=\int_0^\infty P(X_1\geqslant y)^n\mathrm dy=\int_0^1(1-y)^n\mathrm dy=\frac1{n+1}.$$