Distribution of the product of two random variables

A product distribution is a probability distribution constructed as the distribution of the product of random variables having two other known distributions. Given two statistically independent random variables X and Y, the distribution of the random variable Z that is formed as the product $$Z = XY$$ is a product distribution.

The product distribution is the PDF of the product of sample values. This is not the same as the product of their PDFs yet the concepts are often ambiguously termed as in "product of Gaussians".

Algebra of random variables
The product is one type of algebra for random variables: Related to the product distribution are the ratio distribution, sum distribution (see List of convolutions of probability distributions) and difference distribution. More generally, one may talk of combinations of sums, differences, products and ratios.

Many of these distributions are described in Melvin D. Springer's book from 1979 The Algebra of Random Variables.

Derivation for independent random variables
If $$X $$ and $$Y $$ are two independent, continuous random variables, described by probability density functions $$f_X $$ and $$f_Y $$ then the probability density function of $$Z = XY$$ is


 * $$f_Z(z) = \int^\infty_{-\infty} f_X(x) f_Y( z/x)  \frac{1}{|x|}\, dx. $$

Proof
We first write the cumulative distribution function of $$Z $$ starting with its definition


 * $$\begin{align}

F_Z(z) & \, \stackrel{\text{def}}{=}\ \mathbb{P}(Z\leq z) \\ & = \mathbb{P}(XY\leq z) \\ & = \mathbb{P}(XY\leq z, X \geq 0) + \mathbb{P}(XY\leq z , X \leq 0)\\ & = \mathbb{P}(Y\leq z/X, X \geq 0) + \mathbb{P}(Y\geq z/X , X \leq 0)\\ & = \int^\infty_0 f_X(x) \int^{z/x}_{-\infty} f_Y(y)\,  dy \,dx +\int^0_{-\infty} f_X(x) \int^\infty_{z/x} f_Y(y)\,  dy \,dx \end{align} $$

We find the desired probability density function by taking the derivative of both sides with respect to $$z $$. Since on the right hand side,  $$z $$ appears only in the integration limits, the derivative is easily performed using the  fundamental theorem of calculus and the chain rule. (Note the negative sign that is needed when the variable occurs in the lower limit of the integration.)


 * $$\begin{align}

f_Z(z) & = \int^\infty_0 f_X(x) f_Y(z/x) \frac{1}{x}\,dx -\int^0_{-\infty} f_X(x) f_Y(z/x) \frac{1}{x} \,dx \\ & = \int^\infty_0 f_X(x) f_Y(z/x) \frac{1}{|x|}\,dx + \int_{-\infty}^0 f_X(x) f_Y(z/x) \frac{1}{|x|} \,dx \\ & = \int^\infty_{-\infty} f_X(x) f_Y(z/x)  \frac{1}{|x|}\, dx. \end{align} $$

where the absolute value is used to conveniently combine the two terms.

Alternate proof
A faster more compact proof begins with the same step of writing the cumulative distribution of $$Z $$ starting with its definition:


 * $$\begin{align}

F_Z(z) & \overset{\underset{\mathrm{def}}{}}{=} \ \ \mathbb{P}(Z\leq z) \\ & = \mathbb{P}(XY\leq z) \\ & = \int^\infty_{-\infty} \int^\infty_{-\infty} f_X(x) f_Y(y) u(z-xy) \, dy \,dx \end{align} $$

where $$u(\cdot)$$ is the Heaviside step function and serves to limit the region of integration to values of $$x$$ and $$y$$ satisfying $$xy\leq z$$.

We find the desired probability density function by taking the derivative of both sides with respect to $$z $$.


 * $$\begin{align}

f_Z(z) & = \int^\infty_{-\infty} \int^\infty_{-\infty} f_X(x) f_Y(y) \delta(z-xy) \, dy \,dx\\ & = \int^\infty_{-\infty} f_X(x) \left[\int^\infty_{-\infty} f_Y(y) \delta(z-xy) \,  dy \right]\,dx\\ & = \int^\infty_{-\infty} f_X(x) f_Y(z/x)  \frac{1}{|x|}\, dx. \end{align} $$

where we utilize the translation and scaling properties of the Dirac delta function $$\delta$$.

A more intuitive description of the procedure is illustrated in the figure below. The joint pdf $$ f_X(x) f_Y(y) $$ exists in the $$x$$-$$y$$ plane and an arc of constant $$z$$ value is shown as the shaded line. To find the marginal probability $$ f_Z(z) $$ on this arc, integrate over increments of area $$ dx\,dy \;f(x,y) $$ on this contour.



Starting with $$ y= \frac{z}{x} $$, we have $$ dy = -\frac{z}{x^2} \, dx = -\frac{y}{x} \, dx $$. So the probability increment is $$ \delta p = f(x,y) \,dx\,|dy| = f_X(x)f_Y(z/x) \frac {y}{|x|} \, dx \, dx $$. Since $$ z=yx $$ implies $$ dz=y\,dx $$, we can relate the probability increment to the $$z$$-increment, namely $$ \delta p = f_X(x)f_Y(z/x) \frac {1}{|x|} \, dx \, dz $$. Then integration over $$x$$, yields $$ f_Z(z)=\int f_X(x)f_Y(z/x) \frac {1}{|x| } \, dx $$.

A Bayesian interpretation
Let $$ X \sim f(x) $$ be a random sample drawn from probability distribution $$f_x(x)$$. Scaling $$X$$ by $$ \theta $$ generates a sample from scaled distribution $$ \theta X \sim \frac {1}{| \theta |} f_X \left ( \frac{x}{\theta} \right ) $$ which can be written as a conditional distribution $$ g_x(x| \theta)= \frac {1}{| \theta |} f_x \left ( \frac {x}{ \theta } \right )$$.

Letting $$ \theta $$ be a random variable with pdf $$ f_\theta ( \theta ) $$, the distribution of the scaled sample becomes $$ f_X ( \theta x ) = g_X(x\mid \theta) f_\theta (\theta)$$ and integrating out $$\theta $$ we get $$h_x(x) = \int_{-\infty}^\infty g_X(x| \theta) f_\theta (\theta) d\theta $$ so $$\theta X $$ is drawn from this distribution $$ \theta X \sim h_X(x) $$. However, substituting the definition of $$g$$ we also have $$h_X(x) = \int_{-\infty}^\infty \frac{1}{| \theta |} f_x \left ( \frac {x}{ \theta } \right ) f_\theta (\theta) \, d\theta$$ which has the same form as the product distribution above. Thus the Bayesian posterior distribution $$ h_X(x) $$ is the distribution of the product of the two independent random samples $$ \theta $$ and $$ X  $$.

For the case of one variable being discrete, let $$ \theta $$ have probability $$ P_i $$ at levels $$ \theta_i $$ with $$ \sum_i P_i = 1 $$. The conditional density is $$ f_X ( x \mid \theta_i ) = \frac {1}{| \theta_i |} f_x \left ( \frac{x}{ \theta_i} \right ) $$. Therefore $$ f_X ( \theta x ) =  \sum_i \frac {P_i}{| \theta_i |} f_X \left ( \frac{x}{ \theta_i} \right )$$.

Expectation of product of random variables
When two random variables are statistically independent, the expectation of their product is the product of their expectations. This can be proved from the law of total expectation:


 * $$\operatorname{E}(X Y) = \operatorname{E} ( \operatorname{E} (X Y \mid Y))$$

In the inner expression, $Y$ is a constant. Hence:
 * $$\operatorname{E} (X Y \mid Y) = Y\cdot \operatorname{E}[X\mid Y]$$


 * $$\operatorname{E}(X Y) = \operatorname{E} ( Y\cdot \operatorname{E}[X\mid Y])$$

This is true even if $X$ and $Y$ are statistically dependent in which case $$\operatorname{E}[X\mid Y]$$ is a function of $Y$. In the special case in which $X$ and $Y$ are statistically independent, it is a constant independent of $Y$. Hence:
 * $$\operatorname{E}(X Y) = \operatorname{E}( Y\cdot \operatorname{E}[X])$$
 * $$\operatorname{E}(X Y) = \operatorname{E}(X) \cdot \operatorname{E}(Y)$$

Variance of the product of independent random variables
Let $$ X, Y $$ be uncorrelated random variables with means $$ \mu_X, \mu_Y, $$ and variances $$ \sigma_X^2, \sigma_Y^2 $$. If, additionally, the random variables $$X^2$$ and $$Y^2$$ are uncorrelated, then the variance of the product XY is
 * $$ \operatorname{Var}(XY) = (\sigma_X^2 + \mu_X^2 )(\sigma_Y^2 + \mu_Y^2 ) -\mu_X^2 \mu_Y^2$$

In the case of the product of more than two variables, if $$ X_1 \cdots X_n, \;\; n>2 $$ are statistically independent then the variance of their product is


 * $$ \operatorname{Var}(X_1X_2\cdots X_n) = \prod_{i=1}^n (\sigma_i^2 + \mu_i^2 ) -\prod_{i=1}^n \mu_i^2$$

Characteristic function of product of random variables
Assume X, Y are independent random variables. The characteristic function of X is $$\varphi_X(t)$$, and the distribution of Y is known. Then from the law of total expectation, we have
 * $$\begin{align} \varphi_Z(t) & =\operatorname{E}(e^{itX Y})

\\ & = \operatorname{E} ( \operatorname{E} (e^{itX Y} \mid Y)) \\ & = \operatorname{E} ( \varphi_X(tY)) \end{align} $$ If the characteristic functions and distributions of both X and Y are known, then alternatively, $$\varphi_Z(t) = \operatorname{E}(\varphi_Y(tX))

$$ also holds.

Mellin transform
The Mellin transform of a distribution $$ f(x) $$ with support only on $$x \ge 0 $$ and having a random sample $$ X $$ is


 * $$ \mathcal{M}f(x) = \varphi(s)=\int_0^\infty x^{s-1} f(x) \, dx = \operatorname{E}[ X^{s-1}].$$

The inverse transform is


 * $$ \mathcal{M}^{-1}\varphi (s) = f(x)=\frac{1}{2 \pi i} \int_{c-i \infty}^{c+i \infty} x^{-s} \varphi(s)\, ds.$$

if $$ X \text{ and } Y $$ are two independent random samples from different distributions, then the Mellin transform of their product is equal to the product of their Mellin transforms:

\mathcal{M}_{XY}(s) = \mathcal{M}_X(s)\mathcal{M}_Y(s) $$

If s is restricted to integer values, a simpler result is


 * $$  \operatorname{E}[(XY)^n] =  \operatorname{E}[X^n] \; \operatorname{E}[Y^n]  $$

Thus the moments of the random product $$  XY $$ are the product of the corresponding moments of $$   X \text{ and }  Y$$ and this extends to non-integer moments, for example


 * $$  \operatorname{E}[ { (XY)^{1/p}}] =  \operatorname{E}[X^{1/p}] \; \operatorname{E}[ Y^{1/p}].  $$

The pdf of a function can be reconstructed from its moments using the saddlepoint approximation method.

A further result is that for independent X, Y
 * $$ \operatorname{E}[X^pY^q] = \operatorname{E}[X^p] \operatorname{E}[Y^q] $$

Gamma distribution example To illustrate how the product of moments yields a much simpler result than finding the moments of the distribution of the product, let $$ X,Y $$ be sampled from two Gamma distributions, $$ f_{Gamma}(x;\theta,1) = \Gamma(\theta)^{-1} x^{ \theta -1} e^{-x} $$ with parameters $$ \theta = \alpha, \beta $$ whose moments are
 * $$ \operatorname{E}[X^p] = \int_0^\infty x^p \Gamma (x, \theta)\,dx = \frac {\Gamma(\theta+p)}{\Gamma(\theta) }. $$

Multiplying the corresponding moments gives the Mellin transform result


 * $$ \operatorname{E}[(XY)^p] = \operatorname{E}[X^p] \; \operatorname{E}[Y^p] = \frac{ \Gamma(\alpha+p)}{\Gamma(\alpha)} \; \frac{ \Gamma(\beta+p)}{\Gamma(\beta)} $$

Independently, it is known that the product of two independent Gamma-distributed samples (~Gamma(&alpha;,1) and Gamma(&beta;,1)) has a K-distribution:
 * $$ f(z,\alpha,\beta) = 2 \Gamma(\alpha)^{-1} \Gamma(\beta)^{-1}z^{\frac{\alpha+\beta}{2}-1}K_{\alpha-\beta}(2\sqrt z) = \frac{1}{\alpha \beta}f_{K}\left(\frac{z}{\alpha \beta};1,\alpha,\beta\right), \; z\ge 0 $$

To find the moments of this, make the change of variable $$ y = 2 \sqrt z $$, simplifying similar integrals to:


 * $$ \int_0^\infty z^p K_\nu (2 \sqrt z) \, dz = 2^{-2p-1} \int_0^\infty y^{2p+1} K_\nu (y) \, dy $$

thus


 * $$ 2 \int_0^\infty z^{\frac{\alpha+\beta}{2}-1} K_{\alpha-\beta} (2 \sqrt z) \, dz =

2^{-(\alpha+\beta) - 2p+1} \int_0^\infty y^{(\alpha+\beta) + 2p -1} K_{\alpha-\beta}(y) \, dy $$

The definite integral
 * $$ \int_0^\infty y^\mu K_\nu (y) \,dy = 2^{\mu -1} \Gamma \left ( \frac{1+ \mu + \nu}{2} \right ) \Gamma \left (\frac{1+ \mu - \nu}{2} \right )$$ is well documented and we have finally


 * $$ \begin{align}

E[Z^p] & = \frac {2^{-(\alpha+\beta) - 2p+1} \; 2^{(\alpha+\beta) + 2p -1} }{\Gamma(\alpha) \; \Gamma(\beta)} \Gamma \left ( \frac{(\alpha+\beta+2p)+(\alpha-\beta)}{2} \right ) \Gamma \left( \frac{(\alpha+\beta+2p)-(\alpha-\beta)}{2} \right ) \\ \\ & = \frac{\Gamma( \alpha+ p) \, \Gamma(\beta + p)} {\Gamma(\alpha) \, \Gamma(\beta)} \end{align} $$

which, after some difficulty, has agreed with the moment product result above.

If X, Y are drawn independently from Gamma distributions with shape parameters $$ \alpha, \; \beta $$ then
 * $$ \operatorname{E}[X^pY^q] = \operatorname{E}[X^p] \; \operatorname{E}[Y^q] = \frac{ \Gamma(\alpha+p)}{\Gamma(\alpha)} \; \frac{ \Gamma(\beta+q)}{\Gamma(\beta)} $$

This type of result is universally true, since for bivariate independent variables $$ f_{X,Y}(x,y) = f_X(x) f_Y(y) $$ thus
 * $$\begin{align} \operatorname{E}[X^pY^q] & = \int_{x=-\infty}^\infty \int_{y=-\infty}^\infty x^p y^q f_{X,Y}(x,y) \, dy \, dx

\\ & = \int_{x=-\infty}^\infty x^p \Big [ \int_{y=-\infty}^\infty y^q f_Y(y)\, dy \Big ] f_X(x) \, dx \\ & =  \int_{x=-\infty}^\infty x^p  f_X(x) \, dx \int_{y=-\infty}^\infty y^q f_Y(y) \, dy \\ & = \operatorname{E}[X^p] \; \operatorname{E}[Y^q] \end{align} $$ or equivalently it is clear that $$ X^p \text{ and } Y^q $$ are independent variables.

Lognormal distributions
The distribution of the product of two random variables which have lognormal distributions is again lognormal. This is itself a special case of a more general set of results where the logarithm of the product can be written as the sum of the logarithms. Thus, in cases where a simple result can be found in the list of convolutions of probability distributions, where the distributions to be convolved are those of the logarithms of the components of the product, the result might be transformed to provide the distribution of the product. However this approach is only useful where the logarithms of the components of the product are in some standard families of distributions.

Uniformly distributed independent random variables
Let $$Z$$ be the product of two independent variables $$ Z= X_1 X_2 $$ each uniformly distributed on the interval [0,1], possibly the outcome of a copula transformation. As noted in "Lognormal Distributions" above, PDF convolution operations in the Log domain correspond to the product of sample values in the original domain. Thus, making the transformation $$ u=\ln (x) $$, such that $$ p_U(u) \, |du| = p_X(x) \, |dx| $$, each variate is distributed independently on u as
 * $$ p_U (u) =\frac{ p_X(x) }{ |du/dx|} = \frac {1}{x^{-1}} = e^u, \;\; -\infty < u \le 0 $$.

and the convolution of the two distributions is the autoconvolution


 * $$ c(y) = \int_{u=0}^y e^u e^{y-u} du = - \int_{u=y}^0 e^y du = -y e^y, \;\; -\infty < y \le 0 $$

Next retransform the variable to $$ z=e^y $$ yielding the distribution


 * $$ c_2(z) = c_Y(y)/|dz/dy| = \frac {-y e^y }{e^y} = -y = \ln (1/z) $$ on the interval [0,1]

For the product of multiple (> 2) independent samples the characteristic function route is favorable. If we define $$ \tilde{y} = -y $$ then $$ c(\tilde{y}) $$ above is a Gamma distribution of shape 1 and scale factor 1,  $$ c(\tilde{y}) = \tilde{y} e^{-\tilde{y}} $$ , and its known CF is $$ (1 - i t)^{-1} $$. Note that $$ |d\tilde{y}| = |dy| $$ so the Jacobian of the transformation is unity.

The convolution of $$n$$ independent samples from $$\tilde{Y} $$ therefore has CF $$ (1 - i t)^{-n} $$ which is known to be the CF of a Gamma distribution of shape $$n$$:
 * $$ c_n (\tilde{y}) = \Gamma(n)^{-1} \tilde{y}^{(n-1)} e^{-\tilde{y}} = \Gamma(n)^{-1} (-y)^{(n-1)} e^y $$.

Make the inverse transformation $$ z=e^y $$ to extract the PDF of the product of the n samples:
 * $$ f_n(z) = \frac {c_n(y)}{|dz/dy|} = \Gamma(n)^{-1} \Big (-\log z \Big )^{n-1} e^y / e^y = \frac{\Big (-\log z \Big )^{n-1} }{(n-1)! \;\;\;} \;\;\; 0 < z \le 1 $$

The following, more conventional, derivation from Stackexchange is consistent with this result. First of all, letting $$ Z_2 = X_1 X_2 $$ its CDF is


 * $$ \begin{align} F_{Z_2}(z) = \Pr \Big [ Z_2 \le z \Big ] & = \int_{x=0}^1 \Pr \Big [ X_2 \le \frac{z}{x} \Big ] f_{X_1} (x) \, dx

\\ & = \int_{x=0}^z 1 dx + \int_{x=z}^1 \frac{z}{x} \, dx \\ & = z - z\log z, \;\; 0 < z \le 1 \end{align} $$

The density of $$ z_2 \text{ is then } f(z_2) = -\log(z_2) $$

Multiplying by a third independent sample gives distribution function



\begin{align} F_{Z_3}(z) = \Pr \Big [Z_3 \le z \Big ] & = \int_{x=0}^1 \Pr \Big [ X_3 \le \frac{z}{x} \Big] f_{Z_2}(x) \, dx \\ & = -\int_{x=0}^z \log(x) \, dx - \int_{x=z}^1 \frac{z}{x} \log(x) \,dx \\ & = -z \Big (\log(z) - 1 \Big ) + \frac{1}{2}z \log^2 (z) \end{align} $$ Taking the derivative yields $$ f_{Z_3}(z) = \frac{1}{2} \log^2 (z), \;\; 0 < z \le 1. $$

The author of the note conjectures that, in general, $$ f_{Z_n}(z) = \frac{( - \log z )^{n-1} }{ (n-1)! \;\;\;}, \;\; 0 < z \le 1 $$

The figure illustrates the nature of the integrals above. The area of the selection within the unit square and below the line z = xy, represents the CDF of z. This divides into two parts. The first is for 0 < x < z where the increment of area in the vertical slot is just equal to dx. The second part lies below the xy line, has y-height z/x, and incremental area dx z/x.

Independent central-normal distributions
The product of two independent Normal samples follows a modified Bessel function. Let $$ x, y $$ be independent samples from a Normal(0,1) distribution and $$ z=xy $$. Then
 * $$ p_Z(z) = \frac {K_0(|z|)}{\pi}, \;\;\; -\infty < z < +\infty $$

The variance of this distribution could be determined, in principle, by a definite integral from Gradsheyn and Ryzhik,

\int_0^\infty x^\mu K_\nu (ax) \, dx = 2^{\mu - 1} a^{-\mu - 1} \Gamma \Big ( \frac{1 + \mu + \nu}{2} \Big ) \Gamma \Big ( \frac{1 + \mu - \nu}{2} \Big), \;\; a>0, \;\nu + 1 \pm \mu >0 $$ thus $$ \operatorname{E}[Z^2] = \int_{-\infty}^\infty \frac{z^2 K_0 (|z|)}{\pi} \, dz = \frac{4}{\pi} \; \Gamma^2 \Big (\frac{3}{2} \Big ) = 1 $$

A much simpler result, stated in a section above, is that the variance of the product of zero-mean independent samples is equal to the product of their variances. Since the variance of each Normal sample is one, the variance of the product is also one.

The product of two Gaussian samples is often confused with the product of two Gaussian PDFs. The latter simply results in a bivariate Gaussian distribution.

Correlated central-normal distributions
The product of correlated Normal samples case was recently addressed by Nadarajaha and Pogány. Let $$ X \text{, } Y $$ be zero mean, unit variance, normally distributed variates with correlation coefficient $$ \rho \text { and let } Z = XY $$

Then


 * $$ f_Z(z) = \frac{1}{\pi \sqrt{1-\rho^2} }\exp \left ( \frac{ \rho z}{  1 - \rho^2 } \right ) K_0 \left (  \frac{|z| }{  1 - \rho^2 }  \right ) $$

Mean and variance: For the mean we have $$ \operatorname{E}[Z] = \rho  $$ from the definition of correlation coefficient. The variance can be found by transforming from two unit variance zero mean uncorrelated variables U, V. Let
 * $$ X = U, \;\; Y = \rho U + \sqrt{(1-\rho^2)} V   $$

Then  X, Y are unit variance variables with correlation coefficient $$ \rho $$ and
 * $$ (XY)^2 = U^2 \bigg ( \rho U + \sqrt {(1-\rho^2)}V  \bigg )^2

=  U^2 \bigg (\rho^2 U^2 + 2\rho \sqrt{1-\rho^2}UV + (1-\rho^2) V^2 \bigg ) $$ Removing odd-power terms, whose expectations are obviously zero, we get
 * $$ \operatorname{E}[(XY)^2] = \rho^2\operatorname{E}[U^4] + (1-\rho^2)\operatorname{E}[U^2]\operatorname{E}[V^2]   =  3 \rho^2 +  (1-\rho^2) = 1 + 2 \rho^2 $$

Since $$ (\operatorname{E}[Z])^2 = \rho^2 $$ we have
 * $$ \operatorname{Var}(Z) = \operatorname{E}[Z^2] - (\operatorname{E}[Z])^2= 1 + 2 \rho^2 - \rho^2 = 1 + \rho^2$$

High correlation asymptote In the highly correlated case, $$ \rho \rightarrow 1 $$ the product converges on the square of one sample. In this case the $$ K_0 $$ asymptote is $$ K_0(x) \rightarrow \sqrt{\tfrac{\pi}{2x} } e^{-x} \text{ in the limit as } x = \frac {|z|}{1-\rho^2} \rightarrow \infty $$ and
 * $$\begin{align}

p(z)  & \rightarrow \frac{1}{\pi \sqrt{1-\rho^2} } \exp \left (\frac{\rho z}{1-\rho^2  } \right) \sqrt{\frac{\pi (1-\rho^2)}{2z} }  \exp\left (-\frac{|z|}{1-\rho^2} \right) \\ & = \frac{1}{\sqrt{2\pi z } } \exp \Bigg (\frac{ -|z| +\rho z}{(1-\rho)(1+\rho) } \Bigg) \\ & = \frac{1}{\sqrt{2\pi z } } \exp \Bigg (\frac{ -z }{1+\rho  } \Bigg),  \;\; z>0 \\ & \rightarrow \frac{1}{\Gamma(\tfrac{1}{2})\sqrt{2 z } } e^{-\tfrac{ z }{2 } }, \;\; \text { as }\rho \rightarrow 1 \\ \end{align} $$ which is a Chi-squared distribution with one degree of freedom.

Multiple correlated samples. Nadarajaha et al. further show that if $$ Z_1, Z_2,..Z_n \text{ are } n $$ iid random variables sampled from $$ f_Z(z) $$ and $$ \bar{Z} = \tfrac{1}{n} \sum Z_i $$ is their mean then
 * $$ f_\bar Z( z)= \frac {n^{n/2} 2^{-n/2}  }   {  \Gamma (\frac {n}{2} ) } |z|^{n/2-1 }

\exp \left( \frac{\beta-\gamma}{2}z \right) {W}_{0,\frac{1-n}{2}}(| z |), \;\; -\infty < z < \infty. $$ where W is the Whittaker function while $$ \beta = \frac{n}{1 - \rho}, \;\; \gamma = \frac{n}{1 + \rho} $$.

Using the identity $$ W_{0,\nu}(x)= \sqrt {\frac{x}{\pi}}K_\nu(x/2), \;\; x \ge 0 $$, see for example the DLMF compilation. eqn(13.13.9), this expression can be somewhat simplified to
 * $$ f_\bar z( z)= \frac {n^{n/2} 2^{-n/2}   }   {  \Gamma (\frac {n}{2} ) } |z|^{n/2-1 } \exp \left (\frac{\beta-\gamma}{2}z \right )  \sqrt{ \frac{  \beta+\gamma  }{\pi} |z| } \;

K_{ \frac {1-n}{2}} \left ( \frac{\beta+\gamma}{2} |z| \right ), \;\; -\infty < z < \infty. $$

The pdf gives the marginal distribution of a sample bivariate normal covariance, a result also shown in the Wishart Distribution article. The approximate distribution of a correlation coefficient can be found via the Fisher transformation.

Multiple non-central correlated samples. The distribution of the product of correlated non-central normal samples was derived by Cui et al. and takes the form of an infinite series of modified Bessel functions of the first kind.

Moments of product of correlated central normal samples

For a central normal distribution N(0,1) the moments are

\operatorname{E}[X^p] = \frac{1}{\sigma \sqrt{2\pi}}\int_{-\infty}^\infty x^p \exp (-\tfrac {x^2}{2\sigma^2}) \, dx= \begin{cases} 0 & \text{if }p\text{ is odd,} \\ \sigma^p (p-1)!! & \text{if }p\text{ is even.} \end{cases} $$ where $$n!!$$ denotes the double factorial.

If $$ X,Y \sim \text{Norm}(0,1) $$ are central correlated variables, the simplest bivariate case of the multivariate normal moment problem described by Kan, then



\operatorname{E}[X^pY^q] = \begin{cases} 0 & \text{if }p+q \text{ is odd,} \\ \frac {p!q!}{2^{\tfrac{p+q}{2} } }\sum_{k=0}^t \frac { (2\rho)^{2k} }{\Big(\frac{p}{2}- k \Big)! \; \Big(\frac{q}{2}- k \Big)! \;(2k)! } & \text{if } p \text{ and } q \text{ are even} \\ \frac {p!q!}{2^{\tfrac{p+q}{2} } }\sum_{k=0}^t \frac { (2\rho)^{2k+1} }{\Big(\frac{p-1}{2}- k \Big)! \; \Big(\frac{q-1}{2}- k \Big)! \; (2k+1)! } & \text{if } p \text{ and } q \text{ are odd} \end{cases} $$

where
 * $$ \rho $$ is the correlation coefficient and $$ t = \min([p,q]/2) $$

[needs checking]

Correlated non-central normal distributions
The distribution of the product of non-central correlated normal samples was derived by Cui et al. and takes the form of an infinite series.

These product distributions are somewhat comparable to the Wishart distribution. The latter is the joint distribution of the four elements (actually only three independent elements) of a sample covariance matrix. If $$ x_t, y_t $$ are samples from a bivariate time series then the $$ W = \sum_{t=1}^K \dbinom {x_t}{y_t} {\dbinom {x_t}{y_t} }^T $$ is a Wishart matrix with K degrees of freedom. The product distributions above are the unconditional distribution of the aggregate of K > 1 samples of $$ W_{2,1} $$.

Independent complex-valued central-normal distributions
Let $$ u_1, v_1, u_2, v_2 $$ be independent samples from a normal(0,1) distribution. Setting $$ z_1 = u_1 + i v_1 \text{ and } z_2 = u_2 + i v_2 \text{ then } z_1, z_2 $$ are independent zero-mean complex normal samples with circular symmetry. Their complex variances are $$ \operatorname{Var} |z_i| = 2.$$

The density functions of


 * $$ r_i \equiv |z_i| = (u_i^2 + v_i^2)^{\frac{1}{2}}, \;\;i=1,2 $$ are Rayleigh distributions defined as:
 * $$ f_r(r_i) = r_i e^{-r_i^2 / 2} \text{ of mean } \sqrt{\tfrac{\pi}{2}} \text{ and variance}

\frac{4-\pi}{2} $$

The variable $$ y_i \equiv r_i^2 $$ is clearly Chi-squared with two degrees of freedom and has PDF


 * $$ f_{y_i}(y_i) = \tfrac{1}{2} e^{-y_i/2} \text{ of mean value } 2 $$

Wells et al. show that the density function of $$ s \equiv |z_1 z_2| $$ is
 * $$ f_s (s) = s K_0(s), \;\; s \ge 0 $$

and the cumulative distribution function of $$ s $$ is
 * $$P(a) = \Pr [s \le a ] = \int_{s=0}^a s K_0(s) ds = 1 - a K_1(a) $$

Thus the polar representation of the product of two uncorrelated complex Gaussian samples is
 * $$ f_{s,\theta}(s,\theta) = f_s(s) p_\theta(\theta) \text{ where } p(\theta) \text{ is uniform on }[0,2\pi] $$.

The first and second moments of this distribution can be found from the integral in Normal Distributions above
 * $$ m_1 = \int_0^\infty s^2 K_0 (s) \, dx = 2 \Gamma^2 ( \tfrac{3}{2} ) = 2 (\tfrac {\sqrt \pi}{2})^2 = \frac{\pi}{2} $$
 * $$ m_2 = \int_0^\infty s^3 K_0 (s) \, dx = 2^2 \Gamma^2 ( \tfrac{4}{2} ) = 4

$$ Thus its variance is $$ \operatorname{Var} (s) = m_2 - m_1^2 = 4 - \frac{\pi^2}{4} $$.

Further, the density of $$ z \equiv s^2 = {|r_1 r_2|}^2 = {|r_1 |}^2 {| r_2|}^2 = y_1 y_2  $$  corresponds to the product of two independent Chi-square samples $$ y_i $$ each with two DoF. Writing these as scaled Gamma distributions $$ f_y(y_i) = \tfrac{1}{\theta \Gamma(1) } e^{-y_i/\theta } \text{ with } \theta = 2 $$ then, from the Gamma products below, the density of the product is
 * $$ f_Z(z) = \tfrac{1}{2} K_0(\sqrt{z}) \text{ with expectation } \operatorname{E}(z) = 4$$

Independent complex-valued noncentral normal distributions
The product of non-central independent complex Gaussians is described by O’Donoughue and Moura and forms a double infinite series of modified Bessel functions of the first and second types.

Gamma distributions
The product of two independent Gamma samples, $$ z = x_1 x_2 $$, defining $$ \Gamma(x;k_i,\theta_i) = \frac {x^{k_i-1}e^{-x/\theta_i}}{\Gamma(k_i) \theta_i^{k_i} } $$, follows


 * $$ \begin{align} p_Z(z) & = \frac {2}{\Gamma(k_1) \Gamma(k_2) }  \frac {  z ^{\frac {k_1 + k_2}{2 } -1} } { (\theta_1 \theta_2) ^{\frac {k_1 + k_2}{2 }} }

K_{k_1 -k_2 } \left( 2 \sqrt{ \frac {z}{\theta_1 \theta_2} } \right)   \\ \\ & = \frac {2}{\Gamma(k_1) \Gamma(k_2) } \frac {y^{\frac {k_1 + k_2}{2 }-1}} {\theta_1 \theta_2 } K_{k_1 -k_2 } \left(2 \sqrt y \right) \text { where } y = \frac {z}{\theta_1 \theta_2}\\ \end{align} $$

Beta distributions
Nagar et al. define a correlated bivariate beta distribution


 * $$ f(x,y) = \frac {x^{a-1}y^{b-1}(1-x)^{b+c-1}(1-y)^{a+c-1} } {B(a,b,c) (1-xy)^{a+b+c} }, \;\;\;0< x,y <1 $$

where
 * $$ B(a,b,c) = \frac {\Gamma(a) \Gamma(b) \Gamma(c)}{ \Gamma(a+b+c) } $$

Then the pdf of Z = XY is given by
 * $$ f_Z(z) = \frac {B(a+c,b+c) z^{a-1} (1-z)^{c-1} } {B(a,b,c) }

{_2F_1} (a+c,a+c; a+b+2c; 1-z), \;\;\; 0< z <1 $$

where $$ {_2F_1} $$ is the Gauss hypergeometric function defined by the Euler integral


 * $$ {_2F_1}(a,b,c,z) = \frac {\Gamma(c) }{\Gamma(a) \Gamma (c-a) }

\int_0^1 v^{a-1} (1-v)^{c-a-1} (1-vz)^{-b} \, dv $$

Note that multivariate distributions are not generally unique, apart from the Gaussian case, and there may be alternatives.

Uniform and gamma distributions
The distribution of the product of a random variable having a uniform distribution on (0,1) with a random variable having a gamma distribution with shape parameter equal to 2, is an exponential distribution. A more general case of this concerns the distribution of the product of a random variable having a beta distribution with a random variable having a gamma distribution: for some cases where the parameters of the two component distributions are related in a certain way, the result is again a gamma distribution but with a changed shape parameter.

The K-distribution is an example of a non-standard distribution that can be defined as a product distribution (where both components have a gamma distribution).

Gamma and Pareto distributions
The product of n Gamma and m Pareto independent samples was derived by Nadarajah.