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
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".
See main article: 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.[1]
If
X
Y
fX
fY
Z=XY
fZ(z)=
infty | |
\int | |
-infty |
fX(x)fY(z/x)
1 | |
|x| |
dx.
We first write the cumulative distribution function of
Z
\begin{align} FZ(z)&\stackrel{def
We find the desired probability density function by taking the derivative of both sides with respect to
z
z
\begin{align} fZ(z)&=
infty | |
\int | |
0 |
fX(x)fY(z/x)
1 | |
x |
dx
0 | |
-\int | |
-infty |
fX(x)fY(z/x)
1 | |
x |
dx\\ &=
infty | |
\int | |
0 |
fX(x)fY(z/x)
1 | |
|x| |
dx +
0 | |
\int | |
-infty |
fX(x)fY(z/x)
1 | |
|x| |
dx\\ &=
infty | |
\int | |
-infty |
fX(x)fY(z/x)
1 | |
|x| |
dx. \end{align}
where the absolute value is used to conveniently combine the two terms.[3]
A faster more compact proof begins with the same step of writing the cumulative distribution of
Z
\begin{align} FZ(z)&\overset{\underset{def
where
u( ⋅ )
x
y
xy\leqz
We find the desired probability density function by taking the derivative of both sides with respect to
z
\begin{align} fZ(z)&=
infty | |
\int | |
-infty |
infty | |
\int | |
-infty |
fX(x)fY(y)\delta(z-xy)dydx\\ &=
infty | |
\int | |
-infty |
fX(x)
infty | |
\left[\int | |
-infty |
fY(y)\delta(z-xy)dy\right]dx\\ &=
infty | |
\int | |
-infty |
fX(x)fY(z/x)
1 | |
|x| |
dx. \end{align}
\delta
A more intuitive description of the procedure is illustrated in the figure below. The joint pdf
fX(x)fY(y)
x
y
z
fZ(z)
dxdy f(x,y)
Starting with
y=
z | |
x |
dy=-
z | |
x2 |
dx=-
y | |
x |
dx
\deltap=f(x,y)dx|dy|=fX(x)fY(z/x)
y | |
|x| |
dxdx
z=yx
dz=ydx
z
\deltap=fX(x)fY(z/x)
1 | |
|x| |
dxdz
x
fZ(z)=\intfX(x)fY(z/x)
1 | |
|x| |
dx
Let
X\simf(x)
fx(x)
X
\theta
\thetaX\sim
1 | |
|\theta| |
fX\left(
x | |
\theta |
\right)
gx(x|\theta)=
1 | |
|\theta| |
fx\left(
x | |
\theta |
\right)
Letting
\theta
f\theta(\theta)
fX(\thetax)=gX(x\mid\theta)f\theta(\theta)
\theta
hx(x)=
infty | |
\int | |
-infty |
gX(x|\theta)f\theta(\theta)d\theta
\thetaX
\thetaX\simhX(x)
g
hX(x)=
infty | |
\int | |
-infty |
1 | |
|\theta| |
fx\left(
x | |
\theta |
\right)f\theta(\theta)d\theta
hX(x)
\theta
X
For the case of one variable being discrete, let
\theta
Pi
\thetai
\sumiPi=1
fX(x\mid\thetai)=
1 | |
|\thetai| |
fx\left(
x | |
\thetai |
\right)
fX(\thetax)=\sumi
Pi | |
|\thetai| |
fX\left(
x | |
\thetai |
\right)
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}(XY)=\operatorname{E}(\operatorname{E}(XY\midY))
\operatorname{E}(XY\midY)=Y ⋅ \operatorname{E}[X\midY]
\operatorname{E}(XY)=\operatorname{E}(Y ⋅ \operatorname{E}[X\midY])
\operatorname{E}[X\midY]
\operatorname{E}(XY)=\operatorname{E}(Y ⋅ \operatorname{E}[X])
\operatorname{E}(XY)=\operatorname{E}(X) ⋅ \operatorname{E}(Y)
Let
X,Y
\muX,\muY,
2, | |
\sigma | |
X |
2 | |
\sigma | |
Y |
X2
Y2
\operatorname{Var}(XY)=
2 | |
(\sigma | |
X |
+
2 | |
\mu | |
X |
2 | |
)(\sigma | |
Y |
+
2 | |
\mu | |
Y |
)
2 | |
-\mu | |
X |
2 | |
\mu | |
Y |
X1 … Xn, n>2
\operatorname{Var}(X1X2 … Xn)=
n | |
\prod | |
i=1 |
2 | |
(\sigma | |
i |
+
2 | |
\mu | |
i |
)
n | |
-\prod | |
i=1 |
2 | |
\mu | |
i |
Assume X, Y are independent random variables. The characteristic function of X is
\varphiX(t)
\begin{align}\varphiZ(t)&=\operatorname{E}(eitX)\ &=\operatorname{E}(\operatorname{E}(eitX\midY))\ &=\operatorname{E}(\varphiX(tY)) \end{align}
\varphiZ(t)=\operatorname{E}(\varphiY(tX))
The Mellin transform of a distribution
f(x)
x\ge0
X
l{M}f(x)=
infty | |
\varphi(s)=\int | |
0 |
xs-1f(x)dx=\operatorname{E}[Xs-1].
The inverse transform is
l{M}-1\varphi(s)=f(x)=
1 | |
2\pii |
c+iinfty | |
\int | |
c-iinfty |
x-s\varphi(s)ds.
if
XandY
l{M}XY(s)=l{M}X(s)l{M}Y(s)
If s is restricted to integer values, a simpler result is
\operatorname{E}[(XY)n]=\operatorname{E}[Xn] \operatorname{E}[Yn]
Thus the moments of the random product
XY
XandY
\operatorname{E}[{(XY)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}[XpYq]=\operatorname{E}[Xp]\operatorname{E}[Yq]
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
fGamma(x;\theta,1)=\Gamma(\theta)-1xe-x
\theta=\alpha,\beta
\operatorname{E}[Xp]=
infty | |
\int | |
0 |
xp\Gamma(x,\theta)dx=
\Gamma(\theta+p) | |
\Gamma(\theta) |
.
Multiplying the corresponding moments gives the Mellin transform result
\operatorname{E}[(XY)p]=\operatorname{E}[Xp] \operatorname{E}[Yp]=
\Gamma(\alpha+p) | |
\Gamma(\alpha) |
\Gamma(\beta+p) | |
\Gamma(\beta) |
Independently, it is known that the product of two independent Gamma-distributed samples (~Gamma(α,1) and Gamma(β,1)) has a K-distribution:
f(z,\alpha,\beta)=2\Gamma(\alpha)-1\Gamma(\beta)-1
| |||||
z |
K\alpha-\beta(2\sqrtz)=
1 | |
\alpha\beta |
fK\left(
z | |
\alpha\beta |
;1,\alpha,\beta\right), z\ge0
To find the moments of this, make the change of variable
y=2\sqrtz
infty | |
\int | |
0 |
zpK\nu(2\sqrtz)dz=2-2p-1
infty | |
\int | |
0 |
y2p+1K\nu(y)dy
thus
2
infty | |
\int | |
0 |
| |||||
z |
K\alpha-\beta(2\sqrtz)dz=2-(\alpha+\beta)
infty | |
\int | |
0 |
y(\alpha+\beta)K\alpha-\beta(y)dy
The definite integral
infty | |
\int | |
0 |
y\muK\nu(y)dy=2\mu\Gamma\left(
1+\mu+\nu | |
2 |
\right)\Gamma\left(
1+\mu-\nu | |
2 |
\right)
\begin{align} E[Zp]&=
2-(\alpha+\beta) 2(\alpha+\beta) | |
\Gamma(\alpha) \Gamma(\beta) |
\Gamma\left(
(\alpha+\beta+2p)+(\alpha-\beta) | |
2 |
\right)\Gamma\left(
(\alpha+\beta+2p)-(\alpha-\beta) | |
2 |
\right)\ \\ &=
\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
\operatorname{E}[XpYq]=\operatorname{E}[Xp] \operatorname{E}[Yq]=
\Gamma(\alpha+p) | |
\Gamma(\alpha) |
\Gamma(\beta+q) | |
\Gamma(\beta) |
fX,Y(x,y)=fX(x)fY(y)
\begin{align}\operatorname{E}[XpYq]&=
infty | |
\int | |
x=-infty |
infty | |
\int | |
y=-infty |
xpyqfX,Y(x,y)dydx\ &=
infty | |
\int | |
x=-infty |
xp [
infty | |
\int | |
y=-infty |
yqfY(y)dy ]fX(x)dx\ &=
infty | |
\int | |
x=-infty |
xpfX(x)dx
infty | |
\int | |
y=-infty |
yqfY(y)dy\ &=\operatorname{E}[Xp] \operatorname{E}[Yq] \end{align}
XpandYq
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.
Let
Z
Z=X1X2
u=ln(x)
pU(u)|du|=pX(x)|dx|
pU(u)=
pX(x) | |
|du/dx| |
=
1 | |
x-1 |
=eu, -infty<u\le0
c(y)=
y | |
\int | |
u=0 |
euey-udu=-
0 | |
\int | |
u=y |
eydu=-yey, -infty<y\le0
Next retransform the variable to
z=ey
c2(z)=cY(y)/|dz/dy|=
-yey | |
ey |
=-y=ln(1/z)
For the product of multiple (> 2) independent samples the characteristic function route is favorable. If we define
\tilde{y}=-y
c(\tilde{y})
c(\tilde{y})=\tilde{y}e-\tilde{y
(1-it)-1
|d\tilde{y}|=|dy|
The convolution of
n
\tilde{Y}
(1-it)-n
n
cn(\tilde{y})=\Gamma(n)-1\tilde{y}(n-1)e-\tilde{y
Make the inverse transformation
z=ey
fn(z)=
cn(y) | |
|dz/dy| |
=\Gamma(n)-1 (-logz )n-1ey/ey=
(-logz )n-1 | |
(n-1)! |
0<z\le1
The following, more conventional, derivation from Stackexchange[7] is consistent with this result.First of all, letting
Z2=X1X2
\begin{align}
F | |
Z2 |
(z)=\Pr [Z2\lez ]&=
1 | |
\int | |
x=0 |
\Pr [X2\le
z | |
x |
]
f | |
X1 |
(x)dx\ &=
z | |
\int | |
x=0 |
1dx+
1 | |
\int | |
x=z |
z | |
x |
dx \ &=z-zlogz, 0<z\le1 \end{align}
The density of
z2isthenf(z2)=-log(z2)
Multiplying by a third independent sample gives distribution function
\begin{align}
F | |
Z3 |
(z)=\Pr [Z3\lez ]&=
1 | |
\int | |
x=0 |
\Pr [X3\le
z | |
x |
]
f | |
Z2 |
(x)dx \ &=
z | |
-\int | |
x=0 |
log(x)dx-
1 | |
\int | |
x=z |
z | |
x |
log(x)dx \ &=-z (log(z)-1 )+
1 | |
2 |
zlog2(z)\end{align}
f | |
Z3 |
(z)=
1 | |
2 |
log2(z), 0<z\le1.
The author of the note conjectures that, in general,
f | |
Zn |
(z)=
(-logz)n-1 | |
(n-1)! |
, 0<z\le1
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.
The product of two independent Normal samples follows a modified Bessel function. Let
x,y
z=xy
pZ(z)=
K0(|z|) | |
\pi |
, -infty<z<+infty
infty | |
\int | |
0 |
x\muK\nu(ax)dx=2\mua-\mu\Gamma (
1+\mu+\nu | |
2 |
)\Gamma (
1+\mu-\nu | |
2 |
), a>0, \nu+1\pm\mu>0
\operatorname{E}[Z2]=
infty | |
\int | |
-infty |
z2K0(|z|) | |
\pi |
dz=
4 | |
\pi |
\Gamma2 (
3 | |
2 |
)=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.
The product of correlated Normal samples case was recently addressed by Nadarajaha and Pogány.[9] Let
X,Y
\rhoandletZ=XY
Then
fZ(z)=
1 | |
\pi\sqrt{1-\rho2 |
}\exp\left(
\rhoz | |
1-\rho2 |
\right)K0\left(
|z| | |
1-\rho2 |
\right)
Mean and variance: For the mean we have
\operatorname{E}[Z]=\rho
X=U, Y=\rhoU+\sqrt{(1-\rho2)}V
\rho
(XY)2=U2 (\rhoU+\sqrt{(1-\rho2)}V )2=U2 (\rho2U2+2\rho\sqrt{1-\rho2}UV+(1-\rho2)V2 )
\operatorname{E}[(XY)2]=\rho2\operatorname{E}[U4]+(1-\rho2)\operatorname{E}[U2]\operatorname{E}[V2]=3\rho2+(1-\rho2)=1+2\rho2
(\operatorname{E}[Z])2=\rho2
\operatorname{Var}(Z)=\operatorname{E}[Z2]-(\operatorname{E}[Z])2=1+2\rho2-\rho2=1+\rho2
High correlation asymptoteIn the highly correlated case,
\rho → 1
K0
K0(x) → \sqrt{\tfrac{\pi}{2x}}e-xinthelimitasx=
|z| | |
1-\rho2 |
→ infty
\begin{align} p(z)& →
1 | |
\pi\sqrt{1-\rho2 |
}\exp\left(
\rhoz | \right) \sqrt{ | |
1-\rho2 |
\pi(1-\rho2) | |
2z |
}\exp\left(-
|z| | |
1-\rho2 |
\right)\\ &=
1 | |
\sqrt{2\piz |
}\exp (
-|z|+\rhoz | |
(1-\rho)(1+\rho) |
)\\ &=
1 | |
\sqrt{2\piz |
}\exp (
-z | |
1+\rho |
), z>0\\ & →
1 | |
\Gamma(\tfrac{1 |
{2})\sqrt{2z}}e-\tfrac{{2}}, as\rho → 1\\ \end{align}
Multiple correlated samples. Nadarajaha et al. further show that if
Z1,Z2,..Znaren
fZ(z)
\bar{Z}=\tfrac{1}{n}\sumZi
f\barZ(z)=
nn/22-n/2 | |||||
|
|z|n/2-1\exp\left(
\beta-\gamma | |
2 |
z\right)
{W} | ||||
|
(|z|), -infty<z<infty.
\beta=
n | |
1-\rho |
, \gamma=
n | |
1+\rho |
Using the identity
W0,\nu(x)=\sqrt{
x | |
\pi |
f\barz(z)=
nn/22-n/2 | |||||
|
|z|n/2-1\exp\left(
\beta-\gamma | |
2 |
z\right)\sqrt{
\beta+\gamma | |
\pi |
|z|}
K | ||||||
|
\left(
\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.[11] 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}[Xp]=
1 | |
\sigma\sqrt{2\pi |
n!!
If
X,Y\simNorm(0,1)
\operatorname{E}[XpYq]= \begin{cases} 0&ifp+qisodd,\\
p!q! | |
2\tfrac{p+q{2 |
}
t | |
}\sum | |
k=0 |
(2\rho)2k | |||||||
|
&ifpandqareeven\\
p!q! | |
2\tfrac{p+q{2 |
}
t | |
}\sum | |
k=0 |
(2\rho)2k+1 | |||||||
|
&ifpandqareodd \end{cases}
where
\rho
t=min([p,q]/2)
The distribution of the product of non-central correlated normal samples was derived by Cui et al.[11] 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
xt,yt
W=
K | |
\sum | |
t=1 |
\dbinom{xt}{yt}{\dbinom{xt}{yt}}T
W2,1
Let
u1,v1,u2,v2
z1=u1+iv1andz2=u2+iv2thenz1,z2
\operatorname{Var}|zi|=2.
The density functions of
ri\equiv|zi|=
2 | |
(u | |
i |
+
2) | |
v | |
i |
| ||||
, i=1,2
fr(ri)=ri
| ||||||||||
e |
ofmean\sqrt{\tfrac{\pi}{2}}andvariance
4-\pi | |
2 |
The variable
yi\equiv
2 | |
r | |
i |
f | |
yi |
(yi)=\tfrac{1}{2}
-yi/2 | |
e |
ofmeanvalue2
Wells et al.[13] show that the density function of
s\equiv|z1z2|
fs(s)=sK0(s), s\ge0
and the cumulative distribution function of
s
P(a)=\Pr[s\lea]=
a | |
\int | |
s=0 |
sK0(s)ds=1-aK1(a)
fs,\theta(s,\theta)=fs(s)p\theta(\theta)wherep(\theta)isuniformon[0,2\pi]
The first and second moments of this distribution can be found from the integral in Normal Distributions above
m1=
infty | |
\int | |
0 |
s2K0(s)dx=2\Gamma2(\tfrac{3}{2})=2(\tfrac{\sqrt\pi}{2})2=
\pi | |
2 |
m2=
infty | |
\int | |
0 |
s3K0(s)dx=22\Gamma2(\tfrac{4}{2})=4
\operatorname{Var}(s)=m2-
2 | |
m | |
1 |
=4-
\pi2 | |
4 |
Further, the density of
z\equivs2={|r1
2 | |
r | |
2|} |
={|r1|}2{|
2 | |
r | |
2|} |
=y1y2
yi
fy(yi)=\tfrac{1}{\theta\Gamma(1)}
-yi/\theta | |
e |
with\theta=2
fZ(z)=\tfrac{1}{2}K0(\sqrt{z})withexpectation\operatorname{E}(z)=4
The product of non-central independent complex Gaussians is described by O’Donoughue and Moura[14] and forms a double infinite series of modified Bessel functions of the first and second types.
The product of two independent Gamma samples,
z=x1x2
\Gamma(x;ki,\thetai)=
| ||||||||||||
|
\begin{align}pZ(z)&=
2 | |
\Gamma(k1)\Gamma(k2) |
| |||||||||||
|
K | |
k1-k2 |
\left(2\sqrt{
z | |
\theta1\theta2 |
}\right)\ \\ &=
2 | |
\Gamma(k1)\Gamma(k2) |
| |||||||||
\theta1\theta2 |
K | |
k1-k2 |
\left(2\sqrty\right)wherey=
z | |
\theta1\theta2 |
\\ \end{align}
Nagar et al.[16] define a correlated bivariate beta distribution
f(x,y)=
xa-1yb-1(1-x)b+c-1(1-y)a+c-1 | |
B(a,b,c)(1-xy)a+b+c |
, 0<x,y<1
B(a,b,c)=
\Gamma(a)\Gamma(b)\Gamma(c) | |
\Gamma(a+b+c) |
Then the pdf of Z = XY is given by
fZ(z)=
B(a+c,b+c)za-1(1-z)c-1 | |
B(a,b,c) |
{2F1}(a+c,a+c;a+b+2c;1-z), 0<z<1
where
{2F1}
{2F1}(a,b,c,z)=
\Gamma(c) | |
\Gamma(a)\Gamma(c-a) |
1 | |
\int | |
0 |
va-1(1-v)c-a-1(1-vz)-bdv
Note that multivariate distributions are not generally unique, apart from the Gaussian case, and there may be alternatives.
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.[17] 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).
The product of n Gamma and m Pareto independent samples was derived by Nadarajah.[18]