I have been working on the following problem by using two approaches. They give different results and I do not find the mistake. I have random variables $X_1,\ldots,X_n$, which are uniformly distributed on $[0,\theta]$. I want to compute $E\left[ \sum_{i=1}^{n}X_i\mid T=t \right]$, where $T=max\{X_1,\ldots,X_n\}$.
Approach 1: Since $T=t$, one of $X_i$ is equal to $t$ and others are uniformly distributed on $[0,t]$. Thus, $E\left[ \sum_{i=1}^{n}X_i\mid T=t \right]=t+\frac{(n-1)t}{2}=\frac{(n+1)t}{2}$.
Approach 2: Note that since $P(T\leq t)=P(X_1\leq t,\ldots,X_n\leq t)=(\frac{t}{\theta})^n$, $f_T(t)=\frac{nt^{n-1}}{\theta^n}$. Similarly, since $P(T\leq t\mid X_i=x)=(\frac{t}{\theta})^{n-1}$, $f_{T\mid X_i}(t\mid x)=\frac{(n-1)t^{n-2}}{\theta^{n-1}}$, where $x\leq t$.
Then, $f_{X_i\mid T}(x\mid t)=\frac{f_{X_i}(x)f_{T\mid X_i}(t\mid x)}{f_T(t)}=\frac{\frac{1}{\theta}\frac{(n-1)t^{n-2}}{\theta^{n-1}}}{\frac{nt^{n-1}}{\theta^n}}=\frac{n-1}{nt}$. This implies that
$E[X_i\mid T=t]=\int_0^tx\frac{n-1}{nt}dx=\frac{(n-1)t}{2n}$. Therefore, $E\left[ \sum_{i=1}^{n}X_i\mid T=t \right]=\sum_{i=1}^nE[X_i\mid T=t]=\frac{(n-1)t}{2}$.
As you see, the results are different. In my opinion, the conditional density $f_{X_i\mid T}(x\mid t)$ is faulty since it does not sum up to 1. But, I do not understand why.