Gaussian Integrals

Gaussian Integrals
Jan Larsen
Intelligent Signal Processing Group
Informatics and Mathematical Modelling
Technical University of Denmark
web: isp.imm.dtu.dk, email: [email protected]
Version 2, January 5, 2005
1 Product of Gaussians
Suppose that x ∈ Rd and
pi (x) ∼ N (ai , Ai ) =
1
|2πAi |
where xi = x − ai , i = 1, 2, · · · , M.
Consider the evaluation of integrals like
pi (x) dx,
|x|q x
−1
e− 2 xi Ai
1
1
2
|x|q
i
xi
pi (x) dx
(1)
(2)
i
The solutions can be obtained by using the fundamental proposition Eq. (6).
2 Fundamental Proposition
Define a common Gaussian density pc (x) ∼ N (c, C) with
xc = x − c
−1
xc = C
Ai xi
C =
i
i
1
A−1
i
(3)
(4)
−1
(5)
then
pc (x) =
1
|2πA | 2 1
·
pk (x) ·
exp (ai − aj ) B ij (ai − aj )
1
2
|2πC| 2
i>j
k
where
B ij = B ji = A−1
i
(6)
−1
A−1
k
A−1
j
(7)
(xi − xj ) B ij (xi − xj )
(8)
k
Proof
Consider writing
−1
x
xc =
c C
−1
x
i Ai xi −
i
i>j
The left hand side of (8) can cf. (4) and (5) be expressed as:
−1
−1
−1
xc =
x
A−1
A−1
x
c C
i Ai
j xj
k
ij
(9)
k
The right hand side of (8) can be rewritten as
x
B ij xi +
x
A−1
i
i B ij xj
i −
i
j=i
(10)
j=i
Comparison of (9) and (10) provides the relations:
B ij = A−1
i
A−1
i −
B ij = A−1
i
−1
A−1
k
k
j=i
A−1
j
(11)
A−1
i
(12)
−1
A−1
k
k
Equation (12) is true since
A−1
i −
A−1
i
j=i
−1
A−1
k
−1
A−1
j = Ai
k
A−1
i −
A−1
i
j
j
A−1
k
A−1
i
(13)
−1
A−1
k
A−1
j = 0
(14)
k
A−1
i
−1
k
−1
A−1
k
k
2
−1
A−1
j = Ai
(15)
j
−1
A−1
k
A−1
j = I
(16)
k
A−1
j =
j
A−1
k
(17)
k
3 General Cases
3.1 Integral of products
Since
pc (x) dx = 1 then by using (6)
1
|2πC| 2
1
I=
pk (x) dx = exp − (ai − aj ) B ij (ai − aj )
1 ·
2
2
|2πA |
i>j
k
(18)
4 Special Cases
4.1 Propagation of mean value
Consider the evaluation of
φj (x)p(x) dx where p(x) = N (u, S) and
φj (x) = exp[−(x − xj ) Λ−1 (x − xj )/2] = |2πΛ| 2 · N (xj , Λ)
1
In the case M = 2, cf. (5) and (7),
−1
−1 −1 −1
−1
A1 + A−1
A2 = A1 (A−1
= (A1 + A2 )−1
B 12 = A−1
1
2
1 + A2 )A2
−1 −1
C = A−1
1 + A2
According to (18) with a1 = xj , A1 = Λ, a2 = u, and A2 = S.
1
|C| 2
1
−1
I =
(A1 + A2 ) (a1 − a2 )
1
1 · exp − (a1 − a2 )
2
|2πA1 | 2 |A2 | 2
1
1
−1
· exp − (a1 − a2 ) (A1 + A2 ) (a1 − a2 )
=
1
2
|2πA1 | 2 |C −1 A2 |
1
1
−1
(A1 + A2 ) (a1 − a2 )
=
1
1 · exp − (a1 − a2 )
2
2
|2πA1 | 2 |A−1
1 A2 + I|
That is,
1
2
3
(20)
(21)
(22)
φj (x)p(x) dx = |2πΛ|
N (xj , Λ)N (u, S) dx
1
−1
−1
− 21
= |Λ S + I| · exp − (xj − u) (Λ + S) (xj − u)
2
Ij =
(19)
(23)