2

I came across this very interesting question in a forum:

If both X and Y are independent and exponentially distributed with parameter $\lambda$, find $E[X^2|X+Y]$

Someone gave the solution and stated that $X|X+Y$ ~ Uniform$[0,X+Y]$. Why does the distribution change to uniform distribution in this case?

gunes
  • 49,700
  • 3
  • 39
  • 75
Dennis
  • 135
  • 3
  • 1
    Answered in more generality at https://stats.stackexchange.com/questions/252692/distribution-given-sum/252784#252784 – whuber Sep 08 '20 at 21:00

1 Answers1

3

Let $Z=X+Y$. $$f_{X|X+Y=z}(x)=\frac{f_{Z,X}(z,x)}{f_Z(z)}=\frac{f_{Y,X}(z-x,x)}{\lambda^2z e^{-\lambda z}}=\frac{\lambda e^{-\lambda (z-x)}\lambda e^{-\lambda x}}{\lambda^2z e^{-\lambda z}}=\frac{1}{z}$$

Assuming $z-x\geq 0$ and $x\geq 0$, which means $0\leq x\leq z$ and the PDF is $1/z$. This is $U[0,z]$, i.e. $U[0,X+Y]$.

Note: the variable change in joint PDFs requires a Jacobian multiplier, but it is $1$ in this case.

gunes
  • 49,700
  • 3
  • 39
  • 75
  • Thank you. Can you give more details on how to calculate E[X^2|X+Y]? I would like to see your way of solving it if you don't mind sharing. – Dennis Sep 09 '20 at 00:14
  • 1
    It's the second moment of uniform distribution where $a=0,b=z$: $z^2/3$ https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)#/Moments – gunes Sep 09 '20 at 08:17
  • @Dennis is the answer clear for you? – gunes Sep 15 '20 at 21:20
  • Thanks for the explanation. Now I understand the second moment part. But I am stuck at the transformation from f_{Z,X} (z,x) to f_{Y,X} (z-x, x). Z = X+Y, so shouldn't it be transformed to f_{Y,X} (x+y, x)? – Dennis Sep 18 '20 at 00:40
  • Think like this: $P(X=x,Z=z)=P(X=x,Y=z-x)$. So, $Y=x+y$ doesn't make sense. – gunes Sep 18 '20 at 07:28
  • https://www.youtube.com/watch?v=m8GDE_RKg9I this video discusses the change of variable of joint pdf. The formula is $f_{Y_1, Y_2} = F(W1(y_1, y_2), W2(y_1,y_2)) |J|$. In our case, we want to change from $Z, X$ to $Y, X$. X stays the same, and for Z, the transformation is Z=X+Y, so shouldn't z be replaced by x+y? – Dennis Sep 18 '20 at 11:33
  • Yeah, that’s what’s been applied under the hood. Note that in my note I commented that the Jacobian is 1 for this case. – gunes Sep 18 '20 at 11:34
  • @ gunes I understand the Jacobian part, but not the transformation part. I edited my comment above. Could you explain in more detail? Thanks – Dennis Sep 18 '20 at 11:47
  • @dennis Here $Y_1=Z, Y_2=X$, and we change from $Y,X$ to $Z,X$. That's why we ask for $f_{Z,X}(z,x)$. Here, $W_1$ is the inverse transform going from $(Z,X)$ to $Y$, which is $Z-X$. – gunes Sep 18 '20 at 15:41
  • Reading from left to right, it is the transformation from $Z, X$ to $Y, X$, no? And from the formula, we should express the old variables in terms of the new variables and substitute them into the expression. So $X$ is still $X$, and $Z$ (old variable) is $X+Y$ (both X and Y are new variables). I am a bit confused. Would be really appreciative if you could point out the flaws in the reasoning above. – Dennis Sep 18 '20 at 16:39
  • 1
    @dennis we want to write the joint pdf of $Z,X$ in terms of joint pdf of $Y,X$. So, here $f_{Z,X}$ is unknown and $f_{Y,X}$ is known, which means we transform $Y,X$ to $Z,X$ and try to find the joint dist. of transformed pair. – gunes Sep 18 '20 at 20:53
  • now I fully understand. Thanks for your detailed explanation! – Dennis Sep 19 '20 at 23:50