I'm stuck on an exercise (it's not homework, but preparation for finals). It goes like this: $X_1, \dots, X_n$ are iid Exponential($\lambda$) (with parametrization $f(x)=\lambda e^{-\lambda x}$). What is the pdf $f(x_n|Y)$, where $Y=\sum_{i=1}^n X_i$? I know that $Y\sim Gamma(n, \lambda^{-1})$ with pdf $$ f(y)=\frac{\lambda^n}{\Gamma(n)}y^{n-1}e^{-y\lambda}. $$
So I have the marginals, but I'm not sure how to proceed. Maybe it's easier to get $f(y|X_n)$ and then multiply by the ratio of the marginals? Any help that puts me in the right direction is appreciated!
Edit: I think I solved it. Since all are iid, the joint is simply $f(x_n, t_{n-1})$ where $T_{k}=\sum_{i=1}^kX_i$. This comes from a product of convolutions. The joint of $(x_2, x_1)$ is just the product of the densities. The joint of $$ f(x_3, t_2)=f_{X_3}(x_3)f_{T_2}(t_3-x_3) $$ and so on. So finally $$ f(x_n, t_{n-1})=f_{X_n}(x_n)f_{T_{n-1}}(t_n-x_n). $$ The former is exponential, the latter is gamma, so the conditional is $$ f(x_n|T_n)=\frac{f_{X_n}(x_n)f_{T_{n-1}}(t_n-x_n)}{f_{T_n}(t_n)}. $$