$X_i \sim UNIF(-\theta ,\theta)$ , $\theta \gt 0$. There are $n$ observations and I'm asked to find the expectation of $X_{n:n}$
My work so far:
$$E[X_{n:n}] = \int_{-\theta}^\theta x f_{n:n} \, dx = \int_{-\theta}^\theta x\frac n{2\theta} \left( \frac{x+\theta}{2\theta} \right)^{n-1}\,dx $$
Then I substitute $y=x+\theta$ so that we have:
\begin{align} & = \frac n{2\theta} \int_0^{2\theta} (y-\theta)y^{n-1} (2\theta)^{n-1}dy \\ & = n(2\theta)^{-n} \int_0^{2\theta} y^n -\theta y^{n-1}dy \\ & = n(2\theta)^{-n} \left[ \frac1{n+1}y^{n+1}-\frac \theta ny^n \right]_{y=0}^{y=2\theta} \\ & = n(2\theta)^{-n} \left( \frac1{n+1}(2\theta)^{n+1}-\frac \theta n(2\theta)^n\right) \\ & = \frac {2n\theta}{n+1}-\theta \end{align}
This answer is obviously wrong as for large n and smaller $\theta$ the expected value will exceed the boundary of $\theta$. I hope someone can point me in the right direction to correct the mistakes I have made.
It appears that the answer is right I just didn't think it through.
Comment: Seems OK for $n = 5,\,\theta = 10.$ Here's a simulation in R with a million iterations. Simulated answer should be OK to about three significant digits. Can you find the PDF of the maximum? Does it match the histogram?