Joint distribution from marginals of exponential

during an exercise on Martingales I came across the following request: let $X_n \sim \mathcal{E}(n)$ be a sequence of independent random variables, so the pdf is $F_{X_n}= 1 - \exp(-nt)$. Let $S_0 = 0, S_n = X_1+\ldots+X_n$, compute successively: $$f_{S_1,S_2}(s,t) \text{ for } t\geq s \geq 0, f_{S_2}(t) \text{ for } t\geq 0 \text{ and } \mathbb{E}(S_1 | S_2)$$

I tried doing the following: $f_{x_1,x_2} = 2 e^{-x_1}\cdot e^{-2x_2} = 2 e^{-x_1-2x_2}$ . The transformation should be $s_1 = x_1, s_2=x_2+x_1\implies x_2 = s_2-s_1$. The determinant of the Jacobian is $2$, which leads me to : $$f_{s_1,s_2}(s,t)= 4\cdot e^{-2t+s}$$ But then, how do I derive the marginal? When I integrate by $ds$ I get $+\infty$...did I do something wrong?

Your formula for $f_{s_1,s_2} (s,t)$ is valid only for $s\leq t$ since $s_1 \leq s_2$. $f_{s_1,s_2} (s,t)=0$ for $s>t$. Now you don't end up with a divergent integral, right?
• I understand the reasoning and intuitively I can also see that it works, but when I switch to the integration, is this the correct way of doing it: $f_{s_2}(t) = 4\cdot e^{-2t} \int_0^t e^s ds = 4(e^t-e^{-2t})?$. Thanks for the answer! – user1868607 Jun 26 '18 at 9:06
• It is $4(e^{-t} -e^{-2t})$. – Kavi Rama Murthy Jun 26 '18 at 9:23