# Joint distribution of two functions of two random variables

1) Suppose I have two random variables $A > 0$ and $B > 0$ with joint p.d.f. $f_{A,B}(a,b)$, and two random variables $X = g_1(A,B)$ and $Y = g_2(A,B)$. What is the general procedure for determining the joint p.d.f. $f_{X,Y}(x,y)$ ?

2) More specifically, suppose that:

• $A$ and $B$ are i.i.d. with $A \sim \Gamma (k, m)$.
• $X = AB$
• $Y = A + B$

Clearly it this case $X$ takes a K distribution and $Y$ takes a Gamma distribution. Due to struggling with 1) above, I've unfortunately been unable to determine whether in this case a closed non-integral expression for the joint p.d.f. $f_{X,Y}(x,y|k,m)$ even exists, let alone what it is...

Any assistance / suggestions would be greatly appreciated.

-
There is a standard technique for these kinds of transformations that is described in various levels of detail in many (3rd and 4th year) college-level probability theory texts. Which one, if any, do you have easy access to? The method involves Jacobians since it is arises from a change of variables in a multidimensional integral. –  Dilip Sarwate Apr 27 '12 at 19:19
I thought there would be a standard technique, but since I'm only an engineer by training, I didn't get that far in my mathematics studies at university! Can you recommend any particular textbook that has an accessible treatment of this? –  Peter Brett Apr 27 '12 at 19:30
I've added the reference-request tag, because hey, good reference materials are always useful. –  Peter Brett Apr 27 '12 at 19:38

Let me first state the result: $$f_{X,Y|k,m}(x,y) = \frac{2}{\sqrt{y^2-4 x}} \frac{x^{k-1} e^{-\frac{y}{m}}}{(k-1)!^2 m^{2 k} } I(x>0,y>0,y^2 > 4 x)$$
The mapping $(A,B) \mapsto (A B, A+B)$ is unto. Specifically, for $$x= a b, y = a+b \implies a = \frac{1}{2} \left( y \pm \sqrt{y^2-4x}\right), b = \frac{1}{2} \left( y \mp \sqrt{y^2-4x}\right)$$ The Jacobians are easy to compute: $$J_{\pm} = \left| \begin{array}{cc} \frac{\partial a}{\partial x} & \frac{\partial a}{\partial y} \cr \frac{\partial b}{\partial x} & \frac{\partial b}{\partial y} \end{array} \right| = \left| \begin{array}{cc} \mp \frac{1}{\sqrt{y^2-4x}} & \pm \frac{a}{\sqrt{y^2-4x}} \cr \pm \frac{1}{\sqrt{y^2-4x}} & \mp\frac{b}{\sqrt{y^2-4x}}\end{array} \right| = \frac{b-a}{y^2- 4 x} = \mp \frac{1}{\sqrt{y^2-4x}}$$ We can now read off $f_{X,Y}(x,y)$ from the product measure for $(A,B)$: $$\begin{eqnarray} f_A(a) f_B(b) \mathrm{d} a \mathrm{d} b &=& \left( \frac{1}{\Gamma(k)} \frac{a^{k-1}}{m^k} \mathrm{e}^{-\frac{a}{m}} \mathbf{1}_{a>0} \right) \cdot \left( \frac{1}{\Gamma(k)} \frac{b^{k-1}}{m^k} \mathrm{e}^{-\frac{b}{m}} \mathbf{1}_{b>0} \right) \mathrm{d} a \mathrm{d} b \\ &=& \frac{(a b)^{k-1}}{\Gamma^2(k) m^{2k}} \mathrm{e}^{-\frac{a+b}{m}} \mathbf{1}_{a>0} \mathbf{1}_{b>0} \mathrm{d} a \mathrm{d} b \\ &=& \frac{x^{k-1}}{\Gamma^2(k) m^{2k}} \mathrm{e}^{-\frac{y}{m}} I(x>0,y>0,y^2>4x) \left(| J_+ | + | J_- | \right) \mathrm{d} x \mathrm{d} y \end{eqnarray}$$
Just to be clear: $\boldsymbol{1}_{condition}$ and $I(condition)$ are equivalent to Iverson brackets here? –  Peter Brett Apr 28 '12 at 7:40