# joint density function of two independent random variables

Suppose that $𝑋_1$ and $𝑋_2$ are independent and follow a uniform distribution over $[0, 1]$. Let $𝑌_1 = 𝑋_1 + 𝑋_2$, and $𝑌_2 = 𝑋_2 − 𝑋_1$.

a) Find the joint pdf $𝑓_{𝑌_1,𝑌_2} (𝑦_1, 𝑦_2)$ of $𝑌_1$ and $𝑌_2$.

b) Sketch the region 𝐷 = {(𝑦1, 𝑦2)} for $𝑓_{𝑌_1,𝑌_2}(𝑦_1, 𝑦_2) > 0$.

I just find that $$f(Y_1) = \begin{cases} y_1 & \text{for 0 < y_1 < 1} \\ 2-y_1 & \text{for 1 \le y_1 < 2} \\ 0 & \text{otherwise.} \end{cases}$$

$$f(Y_2) = \begin{cases} y_2+1 & \text{for -1 < y_2 < 0} \\ 1-y_2 & \text{for 0 \le y_2 < 1} \\ 0 & \text{otherwise.} \end{cases}$$

• @KennyLau No they are not. Fable has it correct. They have Triangle Distributions. – Graham Kemp May 5 '16 at 9:13

$$f_{Y_1,Y_2}(y_1,y_2)=\frac{1}{2}\mathbf{1}_{D}(y_1,y_2)$$ where $D$ is the square delimited by the points $(0,0),(1,1),(0,2),(-1,-1)$, which is the image of the unit square by the linear transformation $\phi(x_1,x_2)=\begin{pmatrix}x_1+x_2\\ x_2-x1\end{pmatrix}$.

To see this, let $h$ a non-negative measurable function. Then you can compute $E(h(Y_1,Y_2))$ using the substitution $\phi$. You'll see that the $\frac{1}{2}$ is the absolute value of the jacobian determinant of $\phi^{-1}$. You should obtain $$E[h(Y_1,Y_2)]=\frac{1}{2}\int\int h(y_1,y_2)\mathbf{1}_D(y_1,y_2)dy_1dy_2$$ which proves the result.

Because $~Y_1=X_1+X_2~,~ Y_2=X_2-X_1$

Then $~~~~~X_1=\dfrac{Y_1-Y_2}2~,~ X_2=\dfrac{Y_2+Y_1}2$

Therefore the Jacobian change of variable transformation is: \begin{align}f_{Y_1, Y_2}(y_1, y_2) ~=~& f_{X_1}\Big(\frac{y_1-y_2}2\Big)~f_{X_2}\Big(\frac{y_1+y_2}2\Big)\left\lVert\dfrac{\partial (\frac{y_1-y_2}2,\frac{y_1+y_2}2)}{\partial (y_1,y_2)}\right\rVert\\ ~=~& \boxed? \cdot\mathbf 1_{(y_1,y_2)\in\mathcal D}\end{align}

The support domain $\mathcal D$ is the transformation of the support of $X_1,X_2$, which is the square $\Box(0,0)(0,1)(1,1)(1,0)$.

\begin{align}\mathcal D~=~&\Diamond(0+0,0-0)(0+1,1-0)(1+1,1-1)(1+0,0-1)\\~=~&\Diamond(0,0)(1,1)(2,0)(1,{-1})\\~=~&\{(y_1,y_2)\in \boxed{?}\}\end{align}

Can you complete?

• the absolute value of the jacobian determinant is 1/2 – Fahle May 5 '16 at 10:46

Hint: The joint density of $(X_1, X_2)$ is easy to compute (product of marginal densities). Write the random vector $(Y_1,Y_2) = A (X_1,X_2)$ where $A$ is the matrix

$$\begin{array}{cc} 1 & 1 \\ 1 & -1 \\ \end{array}$$

Do you know how to compute the "transformed" joint density?

• The main trouble the OP is facing is how to deal with the domain of the PDF, not the value of the PDF on its domain, it seems, but your answer does not even mention this aspect. – Did May 5 '16 at 9:41
• I disagree on this point. The question asks point a) and b). The only step in the question regards solving a) and my hint was about solving a). Once done this, solving b) should be pretty straightforward. Besides "The main trouble the OP is facing is how to deal with the domain of the PDF" is not a fact (did he ask about only the domain?). I assumed he was facing the entire problem. – Gabriele Cacchioni May 5 '16 at 9:46
• Not stated by the OP, easily deducted from the context. Nota: my first comment is a suggestion to reach a better answer (a complete one, to begin with). If you read it as an attack, I am not interested. – Did May 5 '16 at 9:48
• Nope I was just explaining why I answered in that way. We're not fighting here, just adding knowledge. Now, being a pretty basic question, my intent was to give an hint, not a complete answer. – Gabriele Cacchioni May 5 '16 at 9:54
• This answer is okay in my view. I like hints, especially if they go along with an inviting question to the OP: "do you know how to...". Elaboration can follow later, if necessary. – drhab May 5 '16 at 10:11