Compute $E(X\mid X+Y)$ for independent random variables $X$ and $Y$ with standard exponential distributions Being $X$ and $Y$ independent random variables distributed as $\mathrm{Exponential}(1)$ and let $T=X+Y$
Calculate $E(X|T)$.
This is my attempt at solving this:
Being $Z=\sum_{i=1}^{n}P_{i}$ where $P_{i}$~$\mathrm{Exp}(\lambda)$ then using it's MFG you have that $$M_{P_i}(t)=\frac{\lambda}{\lambda-t}$$
then $$M_{Z}(t)=M_{\sum{P_{i}}}(t)=(M_{P_{1}})...(M_{P_{n}})=(\frac{\lambda}{\lambda-t})^n$$ with this being the MFG of a $\mathrm{Gamma}$ distribution with parameters $(n,\lambda)$
With this result is easy to see that $T$~$\mathrm{Gamma}(2,1)$
Now $E[X|T]=\int xf_{X|T}(x|t)dx$
Then using Bayes' theorem we can make $$f_{X|T}(x|t)=\frac{f_{T|X}(t|x)f_{X}(x)}{f_{T}(t)}$$
then $$f_{T|X}(t|x)=Pr(T=t|X=x)$$ $$=Pr(X+Y=t|X=x)$$ $$=Pr(x+Y=t|X=x)$$ $$=Pr(Y=t-x)=f_{Y}(t-x)$$
Using this result we can now rearrenge $$f_{X|T}(x|t)=\frac{f_{Y}(t-x)f_{X}(x)}{f_{T}(t)}$$ $$=\frac{e^{-(t-x)}.e^{-x}}{\frac{te^{-t}}{\Gamma(2)}}$$ $$=\frac{1}{t}$$ then $$E[X|T]=\int (x)(\frac{1}{t})dx$$
And this where I got stuck because $1_{x\epsilon(0,\infty})$, I made this explanation step-by-step hoping that someone can se easily check where I went wrong. I would aprecciate a step-by-step answer, thanks.
 A: The distributions of $(X,T)$ and $(Y,T)$ coincide and conditional expectations depend only on joint distributions hence $E(X\mid T)=E(Y\mid T)$. Since $E(X\mid T)+E(Y\mid T)=E(T\mid T)=T$,  this proves that $$E(X\mid T)=\frac12T.$$
This argument applies to every i.i.d. integrable $(X,Y)$.

The pedibus approach in the specific case where $(X,Y)$ is i.i.d. standard exponential is to write $E(X\mid T)=u(T)$ where the function $u$ is defined by
$$
u(t)=\int_\mathbb Rxf_{X\mid T}(x\mid t)\mathrm dx,
$$
where $f_{X\mid T}$ denotes the conditional density of $X$ conditionally on $T$, hence
$$
f_{X\mid T}(x\mid t)=\frac{f_{X,T}(x,t)}{f_{T}(t)}.
$$
To go further, note that $T=X+Y$ and that $(X,Y)$ is independent hence
$$
f_{X,T}(x,t)=f_{X,Y}(x,t-x)=f_X(x)f_Y(t-x),
$$
thus,
$$
f_{X,T}(x,t)=\mathrm e^{-x}\,\mathbf 1_{x\gt0}\,\mathrm e^{-(t-x)}\,\mathbf 1_{t-x\gt0}=\mathrm e^{-t}\,\mathbf 1_{t\gt x\gt0},
$$
and that, by a standard computation,
$$
f_T(t)=t\,\mathrm e^{-t}\,\mathbf 1_{t\gt0},
$$
hence, for every $t\gt0$,
$$
f_{X\mid T}(x\mid t)=\frac1t\,\mathbf 1_{0\lt x\lt t},
$$
and finally,
$$
u(t)=\int_0^tx\,\frac1t\,\mathrm dx=\frac12t,
$$
as predicted by the direct, general, method above.
