Need help determining PDF, please.
Given are two random variables X and Y for which the joint probability density function fX,Y (x, y) is given by:
fX,Y (x, y) = 0.5xy for 0 ≤ x ≤ y ≤ 2
fX,Y (x, y) = 0 otherwise.
Let Z = Y − X. Determine the probability density function fZ(z) for 0 ≤ z ≤ 2 and the expectation E(Z) of the random variable Z.
I was trying to solve this by using a double integral, and then taking the derivative to obtaint the PDF. But this did not seem to work. Is there a way to solve this using a double integral? If so what would the limits have to be? Could anyone please show me how to solve it I have been stuck for hours on this question.