Two independent exponential variables conditioned on their sum (source code)

= Two independent exponential variables conditioned on their sum
{title2=$Y\mid(X+Y=u)\sim\operatorname{Unif}(0,u)$}

If $X,Y$ are <independent> <exponential random variables> with one common rate $\lambda>0$, put $U=X+Y$. The <change of variables for probability densities> $(x,y)=(u-y,y)$ gives $f_{U,Y}(u,y)=\lambda^2e^{-\lambda u}$ on $0<y<u$. Its <marginal density> is $\lambda^2u e^{-\lambda u}$, so the <conditional probability density> of $Y$ given $U=u>0$ is $1/u$ on $(0,u)$. This is the shape-$(1,1)$ case of <beta-gamma independence>. In particular $Y/U$ is uniform on $(0,1)$ and <independent> of $U$. Equality of the rates is essential: different rates leave an exponential tilt across the conditional interval.