# pdf of the product of two independent random variables, normal and chi-square

what is the pdf of the product of two independent random variables X and Y, if X and Y are independent?
X is normal distributed and Y is chi-square distributed.

Z = XY

if $X$ has normal distribution $$X\sim N(\mu_x,\sigma_x^2)$$
$$f_X(x)={1\over\sigma_x\sqrt{2\pi}}e^{-{1\over2}({x-\mu_x\over\sigma_x})^2}$$
and $Y$ has Chi-square distribution with $k$ degree of freedom
$$Y\sim \chi_k^2$$
$$f_Y(y)={y^{(k/2)-1}e^{-y/2}\over{2^{k/2}\Gamma({k\over2})}}u(y)$$
whre $u(y)$ is unit step function.

Now, what is the pdf of $Z$ if $X$ and $Y$ are independent?

One way to find the solution is to use Rohatgi’s well known result (1976,p.141)
if $f_{XY}(x,y)$ be the joint pdf of continuous RV’s $X$ and $Y$, the pdf of $Z$ is
$$f_Z(z) = \int_{-\infty}^{\infty}{{1\over|y|}f_{XY}({z\over y},y)dy}$$

since, $X$ and $Y$ are independent $f_{XY}(x,y)=f_X(x)f_Y(y)$
$$f_Z(z) = \int_{-\infty}^{\infty}{{1\over|y|}f_{X}({z\over y})f_{Y}(y)dy}$$
$$f_Z(z) = {1\over\sigma_x\sqrt{2\pi}}{1\over{2^{k/2}\Gamma({k\over2})}}\int_{0}^{\infty}{{1\over|y|}e^{-{1\over2}({{z\over y}-\mu_x\over\sigma_x})^2} {y^{(k/2)-1}e^{-y/2}}dy}$$
Where we face the problem of solving the integral $\int_{0}^{\infty}{{1\over|y|}e^{-{1\over2}({{z\over y}-\mu_x\over\sigma_x})^2} {y^{(k/2)-1}e^{-y/2}}dy}$. Can anyone help me with this problem.

is there any alternative way to solve this?

simplify the term in the integral to

$$T=e^{-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)} y^{k/2-2}$$

find the polynomial $$p(y)$$ such that

$$[p(y)e^{-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)}]’=p'(y)e^{-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)} + p(y) [-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)]’ e^{-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)} = T$$

which reduces to finding $$p(y)$$ such that

$$p'(y) + p(y) [-\frac{1}{2}((\frac{\frac{z}{y}-\mu_x}{\sigma_x} )^2 -y)]’ = y^{k/2-2}$$

or

$$p'(y) -\frac{1}{2} p(y) (\frac{z \mu_x }{\sigma_x^2} y^{-2} \frac{z^2}{\sigma_x^2} y^{-3} -1)= y^{k/2-2}$$

which can be done evaluating all powers of $$y$$ seperately

Above solution won’t work as it diverges.

Yet, some others have worked on this type of product.

## Using Fourrier transform:

Schoenecker, Steven, and Tod Luginbuhl. “Characteristic Functions of the Product of Two Gaussian Random Variables and the Product of a Gaussian and a Gamma Random Variable.” IEEE Signal Processing Letters 23.5 (2016): 644-647.
http://ieeexplore.ieee.org/document/7425177/#full-text-section

For the product $$Z=XY$$ with $$X \sim \mathcal{N}(0,1)$$ and $$Y \sim \Gamma(\alpha,\beta)$$ they obtained the characteristic function:

$$\varphi_{Z} = \frac{1}{\beta^\alpha }\vert t \vert^{-\alpha} exp \left( \frac{1}{4\beta^2t^2} \right) D_{-\alpha} \left( \frac{1}{\beta \vert t \vert } \right)$$

with $$D_\alpha$$ Whittaker’s function ( http://people.math.sfu.ca/~cbm/aands/page_686.htm )

## Using Mellin transform:

Springer and Thomson have described more generally the evaluation of products of beta, gamma and Gaussian distributed random variables.

Springer, M. D., and W. E. Thompson. “The distribution of products of beta, gamma and Gaussian random variables.” SIAM Journal on Applied Mathematics 18.4 (1970): 721-737.
http://epubs.siam.org/doi/10.1137/0118065

They use the Mellin integral transform. The Mellin transform of $$Z$$ is the product of the Mellin transforms of $$X$$ and $$Y$$ (see http://epubs.siam.org/doi/10.1137/0118065 or https://projecteuclid.org/euclid.aoms/1177730201). In the studied cases of products the reverse transform of this product can be expressed as a Meijer G-function for which they also provide and prove computational methods.

They did not analyze the product of a Gaussian and gamma distributed variable, although you might be able to use the same techniques. If I try to do this quickly then I believe it should be possible to obtain an H-function (https://en.wikipedia.org/wiki/Fox_H-function ) although I do not directly see the possibility to get a G-function or make other simplifications.

$$M\lbrace f_Y(x) \vert s \rbrace = 2^{s-1} \Gamma(\tfrac{1}{2}k+s-1)/\Gamma(\tfrac{1}{2}k)$$

and

$$M\lbrace f_X(x) \vert s \rbrace = \frac{1}{\pi}2^{(s-1)/2} \sigma^{s-1} \Gamma(s/2)$$

you get

$$M\lbrace f_Z(x) \vert s \rbrace = \frac{1}{\pi}2^{\frac{3}{2}(s-1)} \sigma^{s-1} \Gamma(s/2) \Gamma(\tfrac{1}{2}k+s-1)/\Gamma(\tfrac{1}{2}k)$$

and the distribution of $$Z$$ is:

$$f_Z(y) = \frac{1}{2 \pi i} \int_{c-i \infty}^{c+i \infty} y^{-s} M\lbrace f_Z(x) \vert s \rbrace ds$$

which looks to me (after a change of variables to eliminate the $$2^{\frac{3}{2}(s-1)}$$ term) as at least a H-function

what is still left is the puzzle to express this inverse Mellin transform as a G function. The occurrence of both $$s$$ and $$s/2$$ complicates this. In the separate case for a product of only Gaussian distributed variables the $$s/2$$ could be transformed into $$s$$ by substituting the variable $$x=w^2$$. But because of the terms of the chi-square distribution this does not work anymore. Maybe this is the reason why nobody has provided a solution for this case.