Why is this expectation true? Working with Rao-Blackwell, this came up:
$$E[2X_1 \mid \max(X_i) = t] = 2\left(\frac{1}{n}t + \frac{n-1}{n}\frac t 2\right)$$
Where X are uniform(0, $\theta$).
What are the intermediate steps? I'm not sure how to use the information in $max(x_i)$ here.
Thanks.
 A: If $\max(X_i) = t$ then one of the list of $\{X_i\}$ is equal to $t$ and the other $n-1$ are all less then $t$.  The chance that $X_1$ is that one variable is $\tfrac 1 n$.  If it is, the conditional expected value is $t$.  If it isn't the value is uniformly distributed on $[0, t)$, and the conditional expected value of that is $t/2$.  Double the answer because it's $\operatorname{E}[{\bf 2} X_i \mid \dots]$
$\begin{align}
\operatorname{E}[2X_1 \mid \max(X_i)=t]
& = 2\operatorname{E}[X_1 \mid \max(X_i)=t]
\\
& = 2\left(\frac 1 n \operatorname{E}[X_1 \mid X_1=t]+\frac {n-1} n \operatorname{E}[X_1 \mid X_1 \sim {\cal U}[0, t)]\right) 
\\
& = 2\left(\frac t n + \frac{(n-1)t}{2n}\right) 
\\
& = \left(\tfrac 1 n + 1\right)t
\end{align}$
A: In order to know that the Rao-Blackwell theorem is applicable, you have to know that $\max$ is sufficient, i.e. the conditional distribution of $X_1,\ldots,X_n$ given $\max$ does not depend on $\theta$.  The conditional distribution of anything given $\max$ is a function of $\max$.  Since $\mathbb E(2X_1)= \theta$, the law of total expectation implies $\mathbb E(\mathbb E(2X_1\mid \max))=\theta$, so $\mathbb E(2X_1\mid \max)$ is an unbiased estimator of $\theta$.  (The fact that it is a statistic, and thus available for use as an estimator, follows from the aforementioned lack of dependence on $\theta$.)  So ask yourself what function of $\max$ could be an unbiased estimator of $\theta$?  If there's only one such function, then that function must be $\mathbb E(2X_1\mid \max)$.
If you know $\mathbb E(\max)=n\theta/(n+1)$, the you know $(n+1)\max/n$ is an unbiased estimator of $\theta$.  Therefore $\mathbb E(2X_1\mid \max)$ must be $(n+1)\max/n$.
Provided, however, that no other function of $\max$ (that doesn't depend on $\theta$) has expected value $\theta$ regardless of the value of $\theta>0$.  If such another function exists, then the difference between that function and $(n+1)\max/n$ is an unbiased estimator of $0$. 
Let us consider how to show that the family of distributions of $\max$ indexed by $\theta$ admits no unbiased estimators of $0$.
$$
\Pr(\max<x)=\Pr(X_1<x\ \&\ \cdots\ \&\ X_n<x) = (\Pr(X_1<x))^n = \left(\frac x \theta \right)^n.
$$
Therefore
$$
f_\max(x) = \frac{d}{dx} \left(\frac x \theta\right)^n = \frac{nx^{n-1}}{\theta^n}\quad\text{ for } 0<x<\theta.
$$
Suppose $S(\max)$ is an unbiased estimator of $0$.  Then for all values of $\theta>0$,
$$
0=\mathbb E(S(\max)\mid\theta) = \int_0^\theta s(x) \frac{nx^{n-1}}{\theta^n}\,dx = \frac{n}{\theta^n}\int_0^\theta s(x) x^{n-1}\,dx.
$$
So for all values of $\theta>0$ we have
$$
0 = \int_0^\theta s(x) x^{n-1}\,dx.
$$
Thus
$$
0 = \frac{d}{d\theta} \int_0^\theta s(x) x^{n-1}\,dx = s(\theta)\theta^{n-1}.
$$
Dividing both sides by $\theta^{n-1}$ we get $s(\theta)=0$ for all $\theta>0$.
Thus the only unbiased estimator of $0$ based on $\max$ is the trivial one: $s(x)=0$.
