Mean Squared Error Maximum uniform distribution Let $X_1,\ldots,X_n$ be Uniform Distributed Random variables on $[0,\theta]$ and let T be $\max\{X_1,\ldots,X_n\}$ an estimator for $\theta$. I derived that the $F_T(x)=(\frac{x}{\theta})^n$ for $0<x<\theta$. Then I calculated the expected value of $T$,
$$\operatorname{E}[T]=\int_0^\theta x\cdot\frac{nx^{n-1}}{\theta^n} \, dx=\frac n {n+1} \theta$$
and that
$$
\operatorname{Var}(T)=\int_0^\theta x^2 \frac{nx^{n-1}}{\theta^n} \, dx - \left(\frac n {n+1}\theta \right)^2 = \frac n {n+2}\theta^2 - \left(\frac n {n+1} \theta\right)^2=\frac{n\theta^2}{(n+2)(n+1)^2}.
$$
When I now determine the Mean Squared Error of $T$, I find:
$$\operatorname{MSE}(T)=\operatorname{Var}(T)-(\operatorname{E}[T]-\theta)^2 = \frac{n\theta^2}{(n+2)(n+1)^2} - \left(\frac n {n+1}\theta-\theta\right)^2 = \frac{-2\theta^2}{(n+1)^2(n+2)}$$
However, as $\theta>0$, the Mean Squared Error of $T$ is negative so I was wondering whether anything was wrong with this calculation. Could anyone help me please?
 A: Let $T$ be an estimator of $\theta$ and denote $E(T) = \mu.$ Then
$$\text{MSE} = E[(T-\tau)^2] = E[((T - \mu) + (\mu -\tau))^2]\\
= E[(T-\mu)^2] + 2(\mu - \tau)E(T - \mu) + (\mu - \tau)^2\\
= Var(T) + 0 + b_T^2(\tau)$$
Here is a simulation in R statistical software for $W = \max(X_1, \dots, X_n)$ as an estimator
of $\theta,$ where $X_i \stackrel{indep}{\sim} Unif(0,\theta),\ n=5,$ and 
$\theta=10.$  With a million iterations, quantities with original units
should be accurate to three places, and quantities with squared units
perhaps about two places. 
m = 10^6;  n = 5;  th = 10  
x = runif(m*n, 0, th)
DTA = matrix(x, nrow=m)
w = apply(DTA, 1, max)
mean(w);  var(w);  mean((w-th)^2)
## 8.3332              # aprx E(W) = 8.333
## 1.986969            # aprx Var(W) = 1.984
## 4.765187            # aprx MSE = 4.762

mu = n*th/(n+1); mu
## 8.333333            # exact E(W)
var.w = n*th^2/((n+2)*(n+1)^2); var.w
## 1.984127            # exact Var(W)
bias.sq = (mu - th)^2; bias.sq
## 2.777778            # exact squared bias
var.w + bias.sq
## 4.761905            # exact MSE

Except for your incorrect sign (mentioned in the comments), your computations are  compatible with simulation results.

Note: An unbiased estimator of $\theta$ is $2\bar X$, but it has a much larger variance ($4\theta^2/12n$), and hence a much larger MSE, than the maximum.
doub.avg = 2*rowMeans(DTA)
mean(doub.avg)
## 10.00068    # unbiased 
var(doub.avg)
## 6.687577    # relatively large var = MSE

The histograms below compare the properties of these two estimators.

