Sunday, October 30, 2022

Product of Gaussian functions

product_of_gausssian_functions

Product of Gaussian functions

Main reference: Products and Convolutions of Gaussian Probability Density Functions

Contents:

  1. Product
  2. Inner product
  3. Kernel operator

Consider the the Gaussian-like function
g(x)=exp(xp)2w2g(x) = \exp{\frac{-(x-p)^2}{w^2}}
where pp and ww stand for position and (half) width of gg.

Note that, see e.g. MSE,
Rex2dx=π.\int_{\mathbb R} e^{-x^2}dx=\sqrt{\pi}.
Thus,
Rg(x)dx=wπ.\int_{\mathbb R} g(x)dx=w\sqrt{\pi}.

1. Product

Observation: The product of two Gaussian functions is again a scaled-Gaussian function. In particular, the scaling factor is also a Gaussian.

We have
A:=(xp1)2w12+(xp2)2w22=w12+w22w12w22(xw22p1+w12p2w12+w22)2+(p1p2)2w12+w22A:=\frac{(x-p_1)^2}{w_1^2}+\frac{(x-p_2)^2}{w_2^2}=\frac{w_1^2+w_2^2}{w_1^2w_2^2}(x-\frac{w_2^2p_1+w_1^2p_2}{w_1^2+w_2^2})^2+ \frac{(p_1-p_2)^2}{w_1^2+w_2^2}
Let p12p_{12} and w12w_{12} defined by the following relations

1w122=1w12+1w22 and p12w122=p1w12+p2w22\frac{1}{w_{12}^2}=\frac{1}{w_{1}^2}+\frac{1}{w_{2}^2} \text{ and } \frac{p_{12}}{w_{12}^2}=\frac{p_1}{w_{1}^2}+\frac{p_2}{w_{2}^2}

Thus,
g1(x)g2(x)=exp(A)=exp(p1p2)2w12+w22exp(xp12)2w122.g_1(x)g_2(x)=\exp(-A) = \exp\frac{-(p_1-p_{2})^2}{w_{1}^2+w_2^2} \exp\frac{-(x-p_{12})^2}{w_{12}^2}.

2. Inner product

g1,g2=xRg1(x)g2(x)dx=πw12exp(p1p2)2w12+w22.\langle g_1, g_2\rangle =\int_{x\in \mathbb R} g_1(x)g_2(x) dx = \sqrt{\pi} w_{12} \exp\frac{-(p_1-p_{2})^2}{w_{1}^2+w_2^2}.

Observations:

  1. Fix p1,w1p_1, w_1, let p2=pp_2=p, w2=ww_2=w be varying. Then this inner product is maximized if p=p1p=p_1 and 1w122\dfrac{1}{w_{12}^2} is minimized, i.e. ww is maximized.
  2. g2=wπ/2||g||^2 = w \sqrt{\pi/2} or 1g=2π4w1/2\dfrac{1}{||g||}=\sqrt[4]{\dfrac{2}{\pi}}w^{-1/2}

3. Kernel

Let t=(p,w)t=(p, w) and at(x)=gga_t(x)=\dfrac{g}{||g||}. Define
K(t1,t2)=xRat1(x)at2(x)dx=at1,at21.K(t_1, t_2) = \int_{x\in \mathbb{R}} a_{t_1}(x) a_{t_2}(x)dx=\langle a_{t_1}, a_{t_2}\rangle\leq 1.

Observation: The kernel KK achieves its maximum value being equal to 11 iff t1=t2t_1=t_2. Indeed,
K(t1,t2)=2πw11/2w21/2πw12exp(p1p2)2w12+w22.K(t_1, t_2) =\sqrt{\frac{2}{\pi}} w_1^{-1/2} w_2^{-1/2} \sqrt{\pi} w_{12} \exp\frac{-(p_1-p_{2})^2}{w_{1}^2+w_2^2}.
or
K(t1,t2)=2w1w2w12+w22exp(p1p2)2w12+w22.K(t_1, t_2) =\sqrt{\frac{2w_1w_2}{w_1^2+w_2^2}} \exp\frac{-(p_1-p_{2})^2}{w_{1}^2+w_2^2}.
which equals to 11 iff w1=w2w_1=w_2 and p1=p2p_1=p_2.

Popular Posts