Let $Y_1, Y_2,\ldots,Y_n$ denote a random sample from the uniform distrib... Help find finding $ \text{Var}\left[\hat{\theta}_{2}\right]$ Let $Y_1, Y_2,\ldots,Y_n$ denote a random sample from the uniform distribution on the interval $(θ, θ + 1)$. Let $$ \hat{\theta}_2 = Y_{(n)} - \frac{n}{n+1}$$ 
Find the efficiency of $θ^1$ relative to $θ^2$
We have $Y_i\sim\mathcal{U}(\theta,\theta+1)$ and CDF of $Y_i$ based on Wikipedia
$$
G_{Y_i}(y)=\Pr[Y_i\le y]=\frac{y-\theta}{\theta+1-\theta}=y-\theta.
$$
Here, $Y_{(n)}$ is $n$-th order statistics. Therefore, $Y_{(n)}=\max[Y_1,\ldots, Y_n]$. Note that $Y_{(n)}\le y$ equivalence to $Y_i\le y$ for $i=1,2,\ldots,n$. Hence, for $\theta< y<\theta+1$, the fact that $Y_1,Y_2,\ldots, Y_n$ are i.i.d. implies
$$
G_{Y_{(n)}}(y)=\Pr[Y_{(n)}\le y]=\Pr[Y_1\le y,Y_2\le y,\ldots, Y_n\le y]=(\Pr[Y_i\le y])^n=\left(y-\theta\right)^{n}.
$$
The PDF of $Y_{(n)}$ is
$$
g_{Y_{(n)}}(y)=\frac{d}{dy}G_{Y_{(n)}}(y)=\frac{d}{dy}(y-\theta)^n=n(y-\theta)^{n-1}.
$$
The expected value of $Y_{(n)}$ is
$$
\begin{align}
\text{E}\left[Y_{(n)}\right]&=\int_{y=\theta}^{\theta+1}yg_{Y_{(n)}}(y)\ dy\\
&=\int_{y=\theta}^{\theta+1}yn(y-\theta)^{n-1}\ dy\\
&=n\int_{y=\theta}^{\theta+1}y(y-\theta)^{n-1}\ dy.
\end{align}
$$
I have trouble finding  $$
\text{Var}\left[\hat{\theta}_{2}\right]=\text{Var}\left[Y_{(n)}-\frac{n}{n+1}\right]=\text{Var}\left[Y_{(n)}\right]=\text{E}\left[Y_{(n)}^2\right]-\left(\text{E}\left[Y_{(n)}\right]\right)^2.
$$
I found that
$$
\begin{align}
\text{E}\left[Y_{(n)}\right]&=n\left[\frac{y(y-\theta)^n}{n+1}-\frac{\theta(y-\theta)^n}{n(n+1)}\right]_{y=\theta}^{\theta+1}\\
&=\frac{n(\theta+1)}{n+1}+\frac{\theta}{n+1}\\
&=\theta+\frac{n}{n+1}.
\end{align}
$$
The way I calculate $E(Y_{(n)}^2)$ is the following:
$$E(Y_{(n)}^2) = ny^2(y-\theta)^{n-1} = n\left[\left.y^2\frac{(y-\theta)^n}{n} \right|_\theta^{\theta+1} - \frac{2}{n} \int_\theta^{\theta+1} y(y-\theta)^n  \,dy\right]$$
$$= \left.(\theta+1)^2 - 2\left(y\frac{(y-\theta)^{n+1}}{n+1} \right|_\theta^{\theta+1} - \int_\theta^{\theta+1} \frac{(y-\theta)^{n+1}}{n+1} dy\right) = (\theta+1)^2 -2 \left(\frac{\theta+1}{n+1} - \left.\frac{(y-\theta)^{n+2}}{(n+1)(n+2)}\right|_\theta^{\theta+1}\right)$$
$$= (\theta+1)^2- 2\frac{\theta +1}{n+1} - \frac{1}{(n+1)(n+2)}$$
Then I use $E(Y_{(n)}^2) - E(Y_{(n)})^2$, based on wolframalpha which gives me the following result ...please go here  ...which is different from the correct answer $\text {Var} [\hat{\theta}_2]= V(Y(n))=\frac{n}{(n+2)(n+1)^2}$....Could anyone please check why?
 A: Variance can be evaluated as follows
$$
\text{Var}\left[\hat{\theta}_{2}\right]=\text{Var}\left[Y_{(n)}-\frac{n}{n+1}\right]=\text{Var}\left[Y_{(n)}\right]=\text{E}\left[Y_{(n)}^2\right]-\left(\text{E}\left[Y_{(n)}\right]\right)^2.
$$
First, we calculate $\text{E}\left[Y_{(n)}^2\right]$. Using the result from here, we obtain
$$
\text{E}\left[Y_{(n)}^2\right]=n\int_{y=\theta}^{\theta+1}y^2(y-\theta)^{n-1}\ dy.
$$
Using IBP, let $u=y^2\Rightarrow du=2y\ dy$ and $dv=(y-\theta)^{n-1}\ dy\Rightarrow v=\dfrac{(y-\theta)^n}{n}$. Hence
$$
\begin{align}
n\int_{y=\theta}^{\theta+1}y^2(y-\theta)^{n-1}\ dy&=n\left[\left.\dfrac{y^2(y-\theta)^n}{n}\right|_{y=\theta}^{\theta+1}-\int_{y=\theta}^{\theta+1}\dfrac{(y-\theta)^n}{n} 2y\ dy\right]\\
&=(\theta+1)^2-2\int_{y=\theta}^{\theta+1}y(y-\theta)^{n}\ dy\;\;\;\Rightarrow\;\;\;\text{again we use IBP here.}\\
&=(\theta+1)^2-2\left[\left.\dfrac{y(y-\theta)^{n+1}}{n+1}\right|_{y=\theta}^{\theta+1}-\int_{y=\theta}^{\theta+1}\dfrac{(y-\theta)^{n+2}}{n+1} dy\right]\\
&=(\theta+1)^2-2\left[\dfrac{\theta+1}{n+1}-\left.\dfrac{(y-\theta)^{n+2}}{(n+1)(n+2)}\right|_{y=\theta}^{\theta+1}\right]\\
\text{E}\left[Y_{(n)}^2\right]&=(\theta+1)^2-\dfrac{2(\theta+1)}{n+1}+\dfrac{2}{(n+1)(n+2)}.
\end{align}
$$
You already have
$$
\text{E}\left[Y_{(n)}\right]=\theta+\frac{n}{n+1}.
$$
Thus
$$
\begin{align}
\text{Var}\left[\hat{\theta}_{2}\right]&=\text{E}\left[Y_{(n)}^2\right]-\left(\text{E}\left[Y_{(n)}\right]\right)^2\\
&=(\theta+1)^2-\dfrac{2(\theta+1)}{n+1}+\dfrac{2}{(n+1)(n+2)}-\left(\theta+\frac{n}{n+1}\right)^2\\
&=\theta^2+2\theta+1-\dfrac{2(\theta+1)}{n+1}+\dfrac{2}{(n+1)(n+2)}-\theta^2-\frac{2n\theta}{n+1}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{(2\theta+1)(n+1)-2(\theta+1)}{n+1}+\dfrac{2}{(n+1)(n+2)}-\frac{2n\theta}{n+1}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{2n\theta+2\theta+n+1-2\theta-2}{n+1}+\dfrac{2}{(n+1)(n+2)}-\frac{2n\theta}{n+1}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{2n\theta+n-1}{n+1}+\dfrac{2}{(n+1)(n+2)}-\frac{2n\theta}{n+1}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{n-1}{n+1}+\dfrac{2}{(n+1)(n+2)}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{(n-1)(n+1)+2}{(n+1)(n+2)}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{n(n+1)}{(n+1)(n+2)}-\frac{n^2}{(n+1)^2}\\
&=\dfrac{n}{n+2}-\frac{n^2}{(n+1)^2}\\
&=\frac{n(n+1)^2-n^2(n+2)}{(n+2)(n+1)^2}\\
&=\frac{n}{(n+2)(n+1)^2}.
\end{align}
$$
$$\\$$

$$\Large\color{blue}{\text{# }\mathbb{Q.E.D.}\text{ #}}$$
