Calculating the expected value of the maximum of some RVs

expected valueprobabilityprobability theory

I am working on the following exercise:

Let $X_1,\ldots,X_n$ be a sample from a uniform distribution $U [0,\theta]$. Consider $$A_n = \frac{n+1}{n} \cdot \max\{X_1,\ldots,X_n\}.$$
Prove that $E(A_n) = \theta$.

I think we may just assume that our RVs are iid, otherwise I would really not know what to do.

W.L.O.G. we assume that the maximum RV is $X_n$. Now we calculate the CDF of $\max\{X_1,\ldots,X_n\}$ :

$$F_{X_n} = P(X_{n} \le x) = P(X_i \le x \text{ for all } i = 1,\ldots,n) = \prod_{i=1}^{n} P(X_i \le x) = x^n$$

And therefore the PDF is $f(x) = n x^{n-1}$.

Now the expected value is:

$$E(X) = \frac{n+1}{n} \int_0^\theta x \cdot n x^{n-1}\,\mathrm dx = \frac{n+1}{n} \cdot \frac{n \cdot\theta^{n+1}}{n+1} = \theta^{n+1}$$

This is obviously not $\theta$. What am I doing wrong?

Best Answer

If $X$ is uniformly distributes on $[0,\theta]$ then $P\{X\leq x\}=\frac x {\theta}$ (for $0 \leq x \leq \theta$) and not $x$ ; the density is $\frac 1 {\theta}$ on $(0,\theta)$. Once you make this correction you will get the right answer.