# Expected value of the maximum function

If we have $n$ i.i.d random variables $X_{1}, \ldots , X_{n}$ each having the distribution with density \begin{cases} \theta^{-1} & 0 < x \leq \theta \\ 0 & \text{otherwise} \end{cases} Where $\theta > 0$ is a parameter. I would like to be able to find the mean and variance of the following random variable. $$W= \frac{n+1}{n} \max(X_{1}, \ldots , X_{n})$$ Help would be greatly appreciated thanks :)

• I presume you meant $0<x\leqslant\theta$? – Math1000 Nov 2 '17 at 22:01
• edited, thanks :) – Matt Nov 2 '17 at 22:02

Here is a different approach. Looking at a simplification, consider the alternative for n=2: $$U_2 = \max(X_1,X_2)$$ and its pdf can be found as: $$f_2(u) = \int_0^u f(u,x_2)\,dx_2 + \int_0^u f(x_1,u)\,dx_1={2\over \theta}\int_0^u {1\over \theta}\,dx=2{u\over \theta^2}$$ for $0<u\le\theta$ and $f(u)=0$ otherwise. Generalizing for arbitrary $n$, $$f_n(u) = n \int_0^u ... \int_0^u f(u,x_2,...,x_n)\,dx_2\,...\,dx_n=n{u^{n-1}\over\theta^n}$$ You can now calculate the mean and variance of $U$ and it is a simple matter to use those to calculate the mean and variance for $W$. You'll find that $W$ is an unbiased estimator for $\theta$.
• This isn't an application maginalization (note that the upper bound of the integral is not $\theta$). Look at the $n=2$ case for simplicity, and calculate the probability density for $x_1$ to take on the value $u$ for the case that $x_1$ is the larger of the two. Then there is the case that $x_2$ is the larger. Add those two densities. – Dean Nov 3 '17 at 0:05