# How to find the distribution of a function of multiple, not necessarily independent, random variables? [closed]

If $Y$ is a random variable defined as $Y=g(X_1,X_2)$, where $X_1$ and $X_2$ are two different random variables whose distributions are known (say with pdf's $f_{X_1}$ and $f_{X_2}$), how do we find the distribution of $Y$ (i.e. the pdf $f_Y$)?

Is there a general method to solve this problem? If there isn't, let us consider two specific cases which I am interested in.

a) $Y=X_1X_2$; $X_1$ and $X_2$ being independent random variables.

b) $Y=X_1X_2$; $X_1$ and $X_2$ being correlated random variables.

## closed as off-topic by Did, Travis, colormegone, dustin, graydadJan 22 '15 at 4:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, Travis, colormegone, dustin, graydad
If this question can be reworded to fit the rules in the help center, please edit the question.

The general method for solving is just to write it down and compute:

$$F_Y(y)=P(Y\le y)=P(g(X_1,X_2) \le y) = \int_{g(u,v) \le y} f_{X_1,X_2}(u,v)\; dv \, du$$

If $g(u,v)=u v$ (and assuming only positive values) then

$$F_Y(y) = \int_0^{\infty} \int_0^{y/u} f_{X_1,X_2}(u,v)\; dv du$$

If they are independent

$$F_Y(y) = \int_0^{\infty} f_{X_1}(u) \int_0^{y/u} f_{X_2}(v)\; dv \, du =\int_0^{\infty} f_{X_1}(u) \, F_{X_2}(y/u) \, du$$ and

$$f_Y(y) = \int_0^{\infty} \frac{1}{u}f_{X_1}(u) \, f_{X_2}(y/u) \, du$$