Michael G. answered 12/29/24
Ivy League Tutor with 9+ Years Experience Tutoring Statistics
Hi Hannah!
(a)
We can solve this problem using the method of transformations.
For simplicity let's let X~f(x) and Y~g(y). The first thing to do is find the joint distribution of X and Y, which is just f(x)g(y) due to independence.
Next, we need to find an intermediate joint distribution. Let's consider Z = X+Y (our target distribution), and W = Y. If we knew the joint distribution of Z and W, we could simply integrate out W and be left with Z.
First we want to solve for X and Y in terms of Z and W:
X = Z-W
Y = W
Then we can find the joint distribution of Z and W by using the fact that due to the transformation of variables, the joint distribution of Z and W is simply the joint distribution of X and Y, analyzed at z and w, multiplied by the absolute value of the Jacobian. Therefore, the joint distribution of Z and W is:
f(z-w)g(w) * |J|
where |J| can be found by taking the determinant of the matrix of first-order partial derivatives.
(If you're unsure what this is--the ij-th entry in the matrix of first order derivatives is the partial derivative of the i^th variable that you started with, with respect to the j^th transformed variable. So the first row is the partial of x with respect to z, then the partial of x with respect to w. The next row is the partial of y with respect to z, and the partial of y with respect to w).
It turns out the absolute value of the Jacobian of this transformation is 1, so it can be disregarded.
Now that we have the joint distribution of Z and W, all that remains is to integrate out the W and we will be left with the density of Z.
(b)
For part (b), note that we now have an explicit definition for the pdf of X and Y. Because these are both Uniform(0,1), the density is equal to 1 inside of the closed interval from 0 to 1, and 0 elsewhere.
This means that Z goes from 0 to 2 (both X and Y go from 0 to 1, so their sum must go from 0 to 2).
To integrate out the w, we have to consider what its bounds are. Because Z is the sum of X and Y, if Z is less or equal to 1, Y can be no more than Z. But W and Y are the same, so for Z between 0 and 1, W is bounded above by Z and below by 0.
Therefore, the density of Z (when z is between 0 and 1) is the integral from 0 to z of 1*1*1 dw, which is just z.
We can play the same game when Z is between 1 and 2. Because X+Y=Z, if Z is bigger than 1, then Y must be between 0 and Z-X. Because Z is no more than 2 and Y=W, we have that w is between Z-1 and 1 whenever Z is between 1 and 2. We then take the integral from z-1 to 1 of 1*1*1 dw and find the density of Z (whenever Z is between 1 and 2) is just 2-z.
Therefore, if h(.) is the pdf of Z, then h(z) = z for z between 0 and 1 (inclusive), and 2-z for z between 1 and 2 (right-side inclusive).
This is the well-known triangular distribution!