Let $\theta \in \mathbb{R}$ and $X_1, X_2,..., X_n$ be independent and identically distributed with density
\begin{equation} f(x; \theta) = I\left(|x-\theta| \leq \frac{1}{2}\right) \end{equation} as usual, denote the order statistics by $X_{(1)}<X_{(2)}<\cdots < X_{(n)}$. Letting $T_n = \frac{1}{2}(X_{(1)} + X_{(n)})$, compute $E(T_n - \theta)^2$
I know I can write this as $E(T_n - \theta)^2 = E(T_n^2) - \theta^2$, however, I don't know how to compute $E(T_n^2)$. I'm thinking I need $n$ nested integrals to take into account $X_2,...X_{n-1}$ as well even though we only care about the average of $X_1$ and $X_n$.
Distribution of the $X_i$'s is uniform on $\left(\theta-\frac12,\theta+\frac12\right)$, which is symmetric about $\theta$.
In other words, $X_i-\theta$ and $\theta-X_i$ have the same distribution for every $i=1,\ldots,n$:
$$X_i-\theta \stackrel{d}=\theta-X_i \quad,\,i=1,\ldots,n$$
This implies $X_{(1)}-\theta$ and $\theta-X_{(n)}$ have the same distribution:
$$X_{(1)}-\theta \stackrel{d}= \theta -X_{(n)}$$
Then
$$E_{\theta}\left[\frac12(X_{(1)}+X_{(n)})\right]=\theta\,,$$
so that $T_n$ is unbiased for $\theta$, and
$$\operatorname{Var}_{\theta}(X_{(1)})=\operatorname{Var}_{\theta}(X_{(n)})$$
Hence,
\begin{align} E_{\theta}(T_n-\theta)^2 &=\operatorname{Var}_{\theta}(T_n) \\&=\frac14 \left[\operatorname{Var}_{\theta}(X_{(1)})+\operatorname{Var}_{\theta}(X_{(n)})+2\operatorname{Cov}_{\theta}(X_{(1)},X_{(n)})\right] \\&=\frac12 \left[\operatorname{Var}_{\theta}(X_{(1)})+\operatorname{Cov}_{\theta}(X_{(1)},X_{(n)})\right] \\&=\frac12 \left[\operatorname{Var}(Y_{(1)})+\operatorname{Cov}(Y_{(1)},Y_{(n)})\right]\qquad, \,\small Y_i=X_i-\theta+\frac12\sim \text{Uniform}(0,1) \end{align}
Now $Y_i=X_i-\theta+\frac12 \stackrel{\text{i.i.d}}\sim \text{Uniform}(0,1)$ implies $Y_{(1)}=X_{(1)}-\theta+\frac12 \sim \text{Beta}(1,n)$.
And for the covariance, (or specifically $E\left[Y_{(1)}Y_{(n)}\right]$), you need the density of $(Y_{(1)},Y_{(n)})$:
$$f_{Y_{(1)},Y_{(n)}}(x,y)=n(n-1)(y-x)^{n-2}\mathbf1_{0<x<y<1}$$
Related:
Finding the correlation coefficient of ordered statistics
Correlation Coefficient of two Order Statistics