# Distribution

##### New Member
Hello, I having doubts on this issue

1) If X~Gamma(a,B) and Y~Beta(γ,B-γ), respectively with B>= 0 and γ>= 0, such that
γ <= B. Which distribution Z= XY?

I tried Jacobian, convolution integral, but I can not get anything

#### hlsmith

##### Omega Contributor
Is this theoretical or do you have data?

##### New Member
This is theoretical, I need to find the distribution of Z=XY.

#### BGM

##### TS Contributor
Both method require similar effort. For Jacobian way you need to first make up a variable, say $$W = Y$$ to pair up with $$Z = XY$$ as the original transformation is from $$\mathbb{R}^2 \to \mathbb{R}$$. Then you can proceed with the usual Jacobian in this $$\mathbb{R}^2 \to \mathbb{R}^2$$ transformation.

##### New Member
I did this BGM, but I can not get somewhere.
Did Z= XY and W = Y, calculated the Jacobian and find the fZ, W (z, w) (joint distribution),
but when I make a marginal, fz (z) distribution get caught.

Last edited:

##### New Member
What I make:
$$Z=XY$$ and $$W=Y$$ and solve I have $$Y=W , X=Z/W$$
so $$|J|=1/W$$ and,

$$f_X,_Y(x,y) = \frac{\beta^{\alpha}x^{\alpha-1}e^{- \beta x}}{\Gamma{(\alpha)}}* \frac{{\Gamma(\beta)}y^{\gamma-1}(1-y)^{\beta - \gamma-1}}{{\Gamma(\gamma)}{\Gamma(\beta - \gamma)}}*\frac{1}{y}$$

now
$$f_Z,_W(z,w)= \frac{\beta^{\alpha}\Gamma(\beta)}{\Gamma(\alpha)\Gamma(\gamma)\Gamma(\beta - \gamma)} *{(\frac{z}{w})}^{\alpha-1}*e^{- \beta (\frac{z}{w})}*w^{\gamma-1}*(1-w)^{\beta - \gamma-1}*\frac{1}{w}$$
so
$$f_Z(z)= \frac{\beta^{\alpha}\Gamma(\beta)}{\Gamma(\alpha)\Gamma(\gamma)\Gamma(\beta - \gamma)}* \int_{0}^{1}{(\frac{z}{w})}^{\alpha-1}*e^{- \beta (\frac{z}{w})}*w^{\gamma-1}*(1-w)^{\beta - \gamma-1}*\frac{1}{w}dw$$

The support of Beta distribution is [0,1] and W=Y~Beta.
Now I do not know how to continue.

#### BGM

##### TS Contributor
Ok just search the question a little bit and this is a well-known result. The problem is that there is a typo in the question:

Let $$X \sim \text{Gamma}(\alpha, \beta), Y \sim \text{Beta}(\gamma, \alpha - \gamma)$$ and they are independent. Then $$Z = XY \sim \text{Gamma}(\gamma, \beta)$$

The key fact here is that the sum of the two Beta's parameters need to equal to the shape parameter of the Gamma distribution. Otherwise there will be no nice result.

Continue your integration with some careful simplifications and a change of variable, then it will be done. I have just verified it once.

##### New Member
Ok just search the question a little bit and this is a well-known result. The problem is that there is a typo in the question:

Let $$X \sim \text{Gamma}(\alpha, \beta), Y \sim \text{Beta}(\gamma, \alpha - \gamma)$$ and they are independent. Then $$Z = XY \sim \text{Gamma}(\gamma, \beta)$$

The key fact here is that the sum of the two Beta's parameters need to equal to the shape parameter of the Gamma distribution. Otherwise there will be no nice result.

Continue your integration with some careful simplifications and a change of variable, then it will be done. I have just verified it once.
This guy tried to change what you said, but still can not solve. Do you have a solution?

#### BGM

##### TS Contributor
Yes as I said I have did it on rough paper completely (and already thrown away). Anyway you are in the correct direction for the convolution step and the remaining task is just a simple integrating process. It is not hard. It will be better to show which part you stuck at.

##### New Member
Ok, now the second part of exercise.
2)Find $$f_Z/_Y(Z/Y=y)$$ (conditional distribution)
I can not assume that Z and Y are independent right? What better way to find the conditional distribution.

#### BGM

##### TS Contributor
From the first part of the question you already obtain the joint pdf of $$Z, Y$$ in the calculation process. Then by definition you just need to divide it by the marginal pdf of $$Y$$ to obtain the conditional density.

Note that it will be also easy to see that

$$XY|Y = y$$ has the same distribution as $$yX \sim \text{Gamma} \left (\alpha, \frac {\beta} {y}\right)$$

as $$X,Y$$ are independent.