I am working on some problems we have solved in class. The task is to compute:
$E(\max_{i=1}^n X_i)$ for $X_i$ ~ U[0,1], 1$\leq$ i $\leq$n
The solution is as follows:
$P(\max_{i=1}^nX_i \leq z$) = P ($X_i\leq z, i = 1, ..., n$) = $\prod_{i=1}^n$ P ($X_i\leq z) = z^n$
which is the CDF $z=\max_{i=1}^n X_i$. The PDF of z is obtained by differentiation as $nx^{n-1}$. Hence:
E(z) = $\int_0^1z(nz^{n-1})dz = \int_0^1nz^{n}dz=\frac{n}{n+1}$
I understand the last step, the integration. However, I do not understand/get the logic behind the previous steps. Could someone provide a detailed explanation (suitable for people who struggle with math).
I'll try to add some details.
$P(\max_{i=1}^nX_i \leq z$) = P ($X_i\leq z, i = 1, ..., n$) = $\prod_{i=1}^n$ P ($X_i\leq z) = z^n$
$\to$ Here we use the fact that the maximum of a list of numbers is less than or equal to $z$ if and only if all these numbers are so. Then we use the independence of the RVs to obtain a product.
which is the CDF z=$max_{i=1}^n X_i$. The PDF of z is obtained by differentiation as $nx^{n-1}$. Hence:
$\to$ Here it would be more precise to add that the CDF is constant equal to $1$ for $z> 1$ and constant equal to $0$ for $z\leq 0$. The derivative is constant equal to $0$ on these intervals. Note that the CDF is not differentiable at $z=1$, which doesn't really matter.
E(z) = $\int_0^1z(nz^{-n-1})dz = \int_0^1z(nz^{n})dz=\frac{n}{n+1}$
$\to$ The reason why we integrate between $0$ and $1$ only is because the PDF is $0$ outside this interval.