0% found this document useful (0 votes)
4 views160 pages

GM Notes

These lecture notes provide a rigorous introduction to conditional distributions, expectations, and conditional independence, which are foundational to the Markov theory of graphical models. The notes are based on previous works and include exercises, with updates in the second and third editions to streamline theory and correct errors. The content covers various topics including Markov kernels, local computation, multivariate normal models, and mathematical prerequisites.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views160 pages

GM Notes

These lecture notes provide a rigorous introduction to conditional distributions, expectations, and conditional independence, which are foundational to the Markov theory of graphical models. The notes are based on previous works and include exercises, with updates in the second and third editions to streamline theory and correct errors. The content covers various topics including Markov kernels, local computation, multivariate normal models, and mathematical prerequisites.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

U NIVERSITY OF C OPENHAGEN

D EPARTMENT OF M ATHEMATICAL S CIENCES


L ECTURE N OTES

L ECTURES ON G RAPHICAL M ODELS


3rd edition

S TEFFEN L. L AURITZEN
D EPARTMENT OF M ATHEMATICAL S CIENCES
U NIVERSITY OF C OPENHAGEN
U NIVERSITETSPARKEN 5
2100 C OPENHAGEN , D ENMARK

c S TEFFEN L. L AURITZEN 2017, 2018, 2019. A LL RIGHTS RESERVED .


2nd printing 2020.

ISBN 978-87-70787-53-6
PREFACE

These lecture notes have as their purpose to give a rigorous introduction to the notion
of conditional distributions and expectations, as well as properties of conditional
independence as this concept underpins the Markov theory of graphical models. A
major part of these lecture notes are based on Conditioning and Markov properties by
Anders Rønn–Nielsen and Ernst Hansen (Third edition, 2016), in particular the
treatment of conditional distributions using Markov kernels in Chapter 1, but also the
measure-theoretic version of conditional independence and a large number of
exercises. These were again heavily using previous lecture notes of Martin Jacobsen,
Søren Tolver Jensen, and Søren Feodor Nielsen. I am indebted to this tradition of
openness in the Statistics group at the Department of Mathematical Sciences and in
particular to Anders and Ernst for permission to use their material of which parts have
been copied and pasted directly into this document. Clearly, I take full responsibility
for any error that may have crept into the notes in one way or another during this
process. For basic results in measure theory, the reader is referred to Hansen (2009).
Much of the remaining material builds heavily on Lauritzen (1996).

Copenhagen S.L.L.
27 September 2017.

PREFACE TO THE SECOND EDITION


In this second edition the theory of conditional independence has been streamlined
using conditional expectations and the construction of Bayesian networks using
combination of Markov kernels has been developed. The sections on Markov
properties of directed acyclic graphs has been extended to cover the case where the
measures do not have a density w.r.t. a product measure, and the section of Markov
equivalence correspondingly extended.

Copenhagen S.L.L.
5 September 2018

PREFACE TO THE THIRD EDITION


In this third edition, minor errors have been corrected, a few sections have been
modified, and more exercises have been added.

Copenhagen S.L.L.
14 October 2019
CONTENTS

1 Conditional Distributions 1
1.1 Markov kernels 1
1.2 Integration of Markov kernels 3
1.3 Properties of the integration measure 6
1.4 Conditional distributions 9
1.5 Transformations of conditional distributions 16
1.6 Conditional moments 22
1.7 Exercises 29
2 Conditional independence 39
2.1 Conditional probabilities given a σ–algebra 39
2.2 Conditionally independent events 40
2.3 Conditionally independent σ-algebras 42
2.4 Combination of Markov kernels 46
2.5 Conditional independence revisited 48
2.5.1 Independence models 51
2.5.2 Graphical independence models 54
2.5.3 General graph separation 54
2.5.4 Directed acyclic graphs 56
2.6 Markov properties 58
2.6.1 Markov properties on undirected graphs 59
2.6.2 Markov properties on directed acyclic graphs 64
2.6.3 Markov equivalence 69
2.7 Exercises 73
3 Local computation 79
3.1 Local computation 79
3.2 Probability propagation 79
3.2.1 Basic problem 79
3.2.2 Setting up the structure 80
3.2.3 The basic invariant 80
3.2.4 Message passing 81
3.2.5 Message scheduling 83
3.2.6 Alternative scheduling of messages 84
3.2.7 Alternative computations 84
3.2.8 An example 84
3.3 Exercises 94
4 Multivariate normal models 95
4.1 Basic facts and concepts 95
4.1.1 Notation 95
4.1.2 The saturated model 96
4.1.3 Conditional independence 97
4.1.4 Interaction 99
4.2 Covariance selection models 99
4.2.1 Maximum likelihood estimation 100
4.3 Decomposable models 103
4.3.1 Basic factorizations 103
4.3.2 Maximum likelihood estimation 104
4.4 The graphical lasso 104
4.4.1 A constrained optimization problem 105
4.4.2 Blocking the subgradient equation 105
4.5 Exercises 108
A Some mathematical prerequisites 111
A.1 Measurable spaces 111
A.2 Möbius inversion 113
A.3 Convexity and optimization 114
A.3.1 Convex sets and functions 114
A.3.2 Convex optimization problems 115
A.3.3 Duality and optimality 116
A.4 Iterative partial maximization 118
B Some graph theory 121
B.1 Notation and terminology 121
B.2 Undirected graphs 124
B.2.1 Separation and connectivity 124
B.2.2 Decomposition 124
B.2.3 Simplicial subsets and perfect sequences 126
B.3 Hypergraphs 130
B.3.1 Basic concepts 130
B.3.2 Graphs and hypergraphs 131
B.3.3 Junction trees and forests 132
B.4 Algorithms 136
B.4.1 Identifying chordal graphs 136
B.4.2 Finding cliques and constructing a junction tree 137
B.4.3 Junction trees of prime components 139
C Linear algebra and random vectors 141
C.1 Matrix results 141
C.2 Random vectors 142
D The multivariate normal distribution 147
D.1 Basic properties 147
References 149
Index 153
1
CONDITIONAL DISTRIBUTIONS

Let (X , E) and (Y, K) be two measurable spaces. In this chapter we shall discuss the
relation between measures on the product space (X × Y, E ⊗ K) and measures on the
two marginal spaces (X , E) and (Y, K). Following the notation in Hansen (2009) we
say that the map f : (X , E) → (Y, K) is E − K–measurable, if

f −1 (K) ∈ E

for all K ∈ K. For ease of notation, we will say that f is E-measurable instead of
E − B–measurable, when f has values in (R, B), where B is the Borel σ–algebra.
Similarly, if X defined on (Ω, F, P ) is a random variable with values in (X , E), and D
is a sub σ–algebra of F, we will say that X is D − E–measurable, if

X −1 (E) = (X ∈ E) ∈ D

for all E ∈ E. If (X , E) = (R, B) this will be abbreviated as X being D–measurable.

1.1 Markov kernels


Definition 1.1 A (X , E)–Markov Kernel on (Y, K) is a family of probability measures
(Px )x∈X on (Y, K) indexed by points in X such that the map

x 7→ Px (B)

is E–measurable for every fixed B ∈ K.

Theorem 1.2 Let (X , E) and (Y, K) be measurable spaces, let ν be a σ–finite


measure on (Y, K), and assume that f : X × Y → [0, ∞] is E ⊗ K–measurable and
has the property that
Z
0 < f (x, y) dν(y) < ∞ for all x ∈ X .

Then (Px )x∈X given by


R
f (x, y) dν(y)
Px (B) = RB for all B ∈ K, x ∈ X
f (x, y) dν(y)

is an (X , E)–Markov Kernel on (Y, K).


2 Conditional Distributions

Proof For each fixed set B ∈ K we need to argue that


R
1X ×B (x, y)f (x, y) dν(y)
x 7→ R
f (x, y) dν(y)
is an E–measurable function. But this follows from Theorem 8.7 in Hansen (2009)
since the ratio of measurable functions is itself measurable. 2
Lemma 1.3 If (Y, K) has an intersection–stable generating system D, then (Px )x∈X
is a (X , E)–Markov Kernel on (Y, K) if only
x 7→ Px (D)
is E-measurable for all fixed D ∈ D.
Proof Define H = {F ∈ K : x 7→ Px (F ) is E–measurable} and verify that H is a
Dynkin Class. Since D ⊆ H, we have H = K. 2
Next we define the inclusion map ix : Y → X × Y by
ix (y) = (x, y) for y ∈ Y .
Then ix is K − E ⊗ K–measurable for each fixed x ∈ X . For G ∈ E ⊗ K define
Gx = {y ∈ Y : (x, y) ∈ G} = i−1
x (G)

Note that Gx is K–measurable due to the measurability of ix . Then we have


Lemma 1.4 Let (Px )x∈X be a (X , E)–Markov kernel on (Y, K). For each G ∈ E ⊗ K
the map
x 7→ Px (Gx )
is E–measurable.
Proof Let H = {G ∈ E ⊗ K : x 7→ Px (Gx ) is E–measurable} and consider a
product set A × B ∈ E ⊗ K. Then

x ∅ if x ∈
/A
(A × B) =
B if x ∈ A
so that 
0 if x ∈
/A
Px ((A × B)x ) = = 1A (x) · Px (B)
Px (B) if x ∈ A
This is a product of two E-measurable functions and hence itself E-measurable. So we
conclude that H contains all product sets; since this is an intersection stable generating
system for E ⊗ K, we have H = E ⊗ K, if we can show that H is a Dynkin class:
We already have that X × Y ∈ H since it is a product set. Assume that G1 ⊆ G2 are
two sets in H. Then obviously also Gx1 ⊆ Gx2 for all x ∈ X , and
(G2 \ G1 )x = Gx2 \ Gx1 .
Then
Px ((G2 \ G1 )x ) = Px (Gx2 ) − Px (Gx1 )
which is a difference between two measurable functions. Hence G2 \ G1 ∈ H.
Integration of Markov kernels 3

Finally, assume that G1 ⊆ G2 ⊆ · · · is an increasing sequence of H–sets. Similarly to


above we have Gx1 ⊆ Gx2 ⊆ · · · and

!x ∞
[ [
Gn = Gxn .
n=1 n=1

Then !x !
∞ ∞
!
[ [
Px Gn = Px Gxn = lim Px (Gxn )
n→∞
n=1 n=1
x
S∞ is E–measurable, since each of the functions x 7→ Px (Gn ) are measurable.
This limit
Then n=1 Gn ∈ H. 2

1.2 Integration of Markov kernels


Theorem 1.5 Let µ be a probability measure on (X , E) and let (Px )x∈X be an
(X , E)–Markov kernel on (Y, K). There exists a uniquely determined probability
measure λ on (X × Y, E ⊗ K) satisfying
Z
λ(A × B) = Px (B) dµ(x)
A

for all A ∈ E and B ∈ K.


The probability measure λ constructed in Theorem 1.5 is called the integration of
(Px )x∈X with respect to µ. The interpretation is that λ describes an experiment on
X × Y that is performed in two steps: The first step picks a random element x ∈ X
with distribution µ. The second step picks a random point y ∈ Y according to the
probability measure Px determined by the outcome x.
Proof The uniqueness follows, since λ is determined on all product sets and these
form an intersection stable generating system for E ⊗ K.
In order to prove the existence, we define
Z
λ(G) = Px (Gx ) dµ(x)

For each G ∈ E ⊗ K the integrand is measurable according to Lemma 1.4. It is


furthermore non–negative, such that λ(G) is well–defined with values in [0, ∞].
Now let G1 , G2 , . . . be a sequence of disjoint sets in E ⊗ K. Then for each x ∈ X the
sets Gx1 , Gx2 , . . . are disjoint as well. Hence
[ ∞  Z  [∞ x  Z X∞ ∞
X
λ Gn = Px Gn dµ(x) = Px (Gxn ) dµ(x) = λ(Gn ) .
n=1 n=1 n=1 n=1

In the second equality we have used that each Px is a measure, and in the third equality
we have used monotone convergence to interchange integration and summation. From
this we have that λ is a measure. And since
4 Conditional Distributions

Z Z Z
λ(X × Y) = Px ((X × Y)x ) dµ(x) = Px (Y) dµ(x) = 1 dµ(x) = 1

we obtain that λ is actually a probability measure. Finally, it follows that


Z Z Z
x
λ(A × B) = Px ((A × B) ) dµ(x) = 1A (x)Px (B) dµ(x) = Px (B) dµ(x)
A
for all A ∈ E and B ∈ K. 2
Corollary 1.6 Let µ be a probability measure on (X , E) and let (Px )x∈X be an
(X , E)–Markov kernel on (Y, K). Let λ be the integration of (Px )x∈X with respect to
µ. Then λ satisfies
λ(A × Y) = µ(A) for all A ∈ E
Z
λ(X × B) = Px (B) dµ(x) for all B ∈ K

Proof The second statement is obvious. For the first result just note that Px (Y) = 1
for all x ∈ X . 2
The probability measure on (Y, K) defined by λ(X × B) is called the mixture of the
Markov kernel with respect to µ.
Example 1.7 Let µ be a probability measure on (X , E) and let ν be a probability
measure on (Y, K). Define Px = ν for all x ∈ X . Then, trivially, (Px )x∈X is an
X –Markov kernel on Y. Let λ be the integration of this kernel with respect to µ. Then
for all A ∈ E and B ∈ K
Z
λ(A × B) = ν(B) dµ(x) = µ(A) · ν(B) .
A

The only measure satisfying this property is the product measure µ ⊗ ν, so λ = µ ⊗ ν.


Hence a product measure is a particularly simple example of a measure constructed by
integrating a Markov kernel. 2
Example 1.8 Let µ be the Poisson distribution with parameter λ. For each x ∈ N0 we
define Px to be the binomial distribution with parameters (x, p). Then (Px )x∈N0 is an
N0 –Markov kernel on N0 .
Let ξ be the mixture of (Px )x∈N0 with respect to µ. This must be a probability measure
on N0 and is thus determined by its probability mass function q. For n ∈ N0 we obtain
∞  
X k n λk
q(n) = p (1 − p)k−n e−λ
n k!
k=n
∞ k−n
(λp)n −λ X (1 − p)λ
= e
n! (k − n)!
k=n
n
(λp) −λ (1−p)λ (λp)n −λp
= e e = e .
n! n!
Hence the mixture ξ is the Poisson distribution with parameter λp. 2
Integration of Markov kernels 5

Theorem 1.9. (Uniqueness of integration) Suppose that (Y, K) has a countable


generating system that is intersection stable. Let µ and µ̃ be two probability measures
on (X , E) and assume that (Px )x∈X and (P̃x )x∈X are two (X , E)–Markov kernels on
(Y, K). Let λ be the integration of (Px )x∈X with respect to µ, and let λ̃ be the
integration of (P̃x )x∈X with respect to µ̃. Define

E0 = {x ∈ X : Px = P̃x }

Then λ = λ̃ if and only if µ = µ̃ and µ(E0 ) = 1.

Proof Let (Bn )n∈N be a countable generating system for (Y, K). Then

\
E0 = {x ∈ X : Px (Bn ) = P̃x (Bn )}
n=1

from which we can conclude that E0 ∈ E.


Assume that µ = µ̃ and µ(E0 ) = 1. Then for all A ∈ E and B ∈ K we have
Z Z
λ(A × B) = Px (B) dµ(x) = P̃x (B) dµ̃(x) = λ̃(A × B)
A∩E0 A∩E0

and thereby λ = λ̃.


Assume conversely that λ = λ̃. According to Corollary 1.6 we have for all A ∈ E

µ(A) = λ(A × Y) = λ̃(A × Y) = µ̃(A)

such that µ = µ̃. The proof will be complete, if we can show that

µ({x ∈ X : Px (Bn ) 6= P̃x (Bn )}) = 0

for all n ∈ N. For this purpose we consider the set

En+ = {x ∈ X : Px (Bn ) > P̃x (Bn )} .

Using this definition gives


Z
(Px (Bn ) − P̃x (Bn )) dµ(x) = λ(En+ × Bn ) − λ̃(En+ × Bn ) = 0
+
En

and since the integrand is strictly positive on En+ , we can conclude that µ(En+ ) = 0. It
is shown similarly that µ(En− ) = 0, where

En− = {x ∈ X : Px (Bn ) < P̃x (Bn )} .

This concludes the proof. 2


6 Conditional Distributions

1.3 Properties of the integration measure


In this section we will consider integration with respect to λ, where λ is the integrated
measure of a Markov kernel (Px )x∈X with respect to some probability measure µ. We
shall see, that such λ–integrals can be calculated by successive integration similar to
what is known for product measures.
Lemma 1.10 Let (Px )x∈X be a (X , E)–Markov kernel on (Y, K) and assume that
f : X × Y → [0, ∞] is E ⊗ K–measurable. Then the map
Z
x 7→ f (x, y) dPx (y) (1.1)

is E–measurable.
Proof Firstly note that for fixed x then f (x, y) = f ◦ ix (y) which is a K–measurable
function. Hence the integral in (1.1) is well–defined. Now assume that f is a simple
function
Xn
f= ck 1Gk (1.2)
k=1

where c1 , . . . , cn ∈ (0, ∞) and G1 , . . . , Gn are disjoint sets in E ⊗ K. Since

1Gk (x, y) = 1Gxk (y)

for all x and y, we obtain


Z n Z
X
f (x, y) dPx (y) = ck 1Gk (x, y) dPx (y)
k=1
Xn Z
= ck 1Gxk (y) dPx (y)
k=1
Xn
= ck Px (Gxk )
k=1

According to Lemma 1.4 this is a linear combination of E–measurable functions.


Hence it is E–measurable.
Now assume that f is a general function in M+ (X × Y, E ⊗ K). Then there exists a
sequence (fn )n∈N of non–negative simple functions with fn (x, y) ↑ f (x, y) for all
x ∈ X and y ∈ Y. For fixed x we have from monotone convergence, that
Z Z
fn (x, y) dPx (y) ↑ f (x, y) dPx (y) .

Hence the right hand side is the point–wise limit of E–measurable functions. Thereby
it is E–measurable. 2
Properties of the integration measure 7

Theorem 1.11. (Extended Tonelli) Let µ be a probability measure on (X , E), and


assume that (Px )x∈X is a (X , E)–Markov kernel on (Y, K). Let λ be the integration of
(Px )x∈X with respect to µ. For every E ⊗ K–measurable function
f : X × Y → [0, ∞] it holds that
Z ZZ
f (x, y) dλ(x, y) = f (x, y) dPx (y) dµ(x) .

Proof The inner integral on the right hand side is E–measurable with values in [0, ∞]
according to Lemma 1.10. Hence both the left-hand side and the right-hand side are
well-defined.
Now assume that f is a simple function on the form (1.2). Then
Z Xn
f dλ = ck λ(Gk )
k=1
Xn Z
= ck Px (Gxk ) dµ(x)
k=1
Xn ZZ
= ck 1Gxk (y) dPx (y) dµ(x)
k=1
Xn ZZ
= ck 1Gk (x, y) dPx (y) dµ(x)
k=1
n
ZZ X
= ck 1Gk (x, y) dPx (y) dµ(x)
k=1
ZZ
= f (x, y) dPx (y) dµ(x)

which shows the result when f is a simple function.


Now let f be a general function in M+ (X × Y, E ⊗ K). Then there exists a sequence
(fn )n∈N of non–negative simple functions with fn ↑ f . From monotone convergence
we get Z Z ZZ
f dλ = lim fn dλ = lim fn (x, y) dPx (y) dµ(x)
n→∞ n→∞

But monotone convergence also yields


Z Z
fn (x, y) dPx (y) ↑ f (x, y) dPx (y)

and applying monotone convergence once more then gives


ZZ ZZ
fn (x, y) dPx (y) dµ(x) ↑ f (x, y) dPx (y) dµ(x) ,

and this shows the theorem. 2


8 Conditional Distributions

Theorem 1.12. (Extended Fubini) Let µ be a probability measure on (X , E) and


assume that (Px )x∈X is a (X , E)–Markov kernel on (Y, K). Let λ be the integration of
(Px )x∈X with respect to µ. For every E ⊗ K–measurable and λ–integrable function
f : X × Y → R it holds that
Z
A0 = {x ∈ X : |f (x, y)| dPx (y) < ∞}

is E–measurable with µ(A0 ) = 1. Furthermore, the function


R
f (x, y) dPx (y) x ∈ A0
x 7→ g(x) :=
0 x∈/ A0
is E–measurable and µ–integrable, and
Z Z Z
f (x, y) dλ(x, y) = f (x, y) dPx (y) dµ(x) .
A0

Note: The extended Tonelli’s Theorem


R can be applied to determine whether f is
λ–integrable – that is whether |f | dλ < ∞.
Proof It follows from Lemma 1.10 that A0 ∈ E. The extended Tonelli’s Theorem
gives ZZ Z
|f (x, y)| dPx (y) dµ(x) = |f | dλ < ∞ .
R
Hence the integral |f (x, y)| dPx (y) must be finite for µ almost all x ∈ X such that
µ(A0 ) = 1. For each x ∈ A0 we have
Z Z Z
f (x, y) dPx (y) = f (x, y) dPx (y) − f − (x, y) dPx (y)
+

From this we see that the function g defined in the theorem is measurable according to
Lemma 1.10. Furthermore we obtain from the extended Tonelli’s Theorem that
Z Z Z
|g(x)|dµ(x) = f (x, y) dPx (y) dµ(x)
ZAZ0
≤ 1A0 ×Y (x, y)|f (x, y)| dPx (y) dµ(x)

< ∞,
showing that g is µ–integrable. Finally, we have from the extended Tonelli that
Z Z
f (x, y) dPx (y) dµ(x)
A0
Z Z Z Z
= f (x, y)+ dPx (y) dµ(x) − f (x, y)− dPx (y) dµ(x)
ZA0 Z A0
= 1A0 (x)f (x, y) dλ(x, y) − 1A0 (x)f − (x, y) dλ(x, y)
+

Z Z
= 1A0 (x)f (x, y) dλ(x, y) = f (x, y) dλ(x, y) .
A0 ×Y
Conditional distributions 9

But from Corollary 1.6 we have λ(A0 × Y) = µ(A0 ) so


Z Z
f (x, y) dλ(x, y) = f (x, y) dλ(x, y)
A0 ×Y

and the proof is complete. 2

1.4 Conditional distributions


In an experiment where two random variables X and Y are observed, it is often
convenient to consider the probabilistic model in two steps: X is observed first,
afterwards Y is observed. Here it is natural to believe that the mechanism that decides
the value of Y depends on the value of X drawn. This two–step model can be
constructed by considering the joint distribution of X and Y as the integration of the
conditional distribution of Y given X with respect to the distribution of X.
Definition 1.13 Let X and Y be random variables defined on the probability space
(Ω, F, P ) with values in (X , E) and (Y, K) respectively. Let (Px )x∈X be a
(X , E)–Markov kernel on (Y, K). We say that (Px )x∈X is the conditional distribution
of Y given X, if the joint distribution (X, Y )(P ) is the integration of (Px )x∈X with
respect to X(P ). That is, if
Z
P (X ∈ A, Y ∈ B) = (X, Y )(P )(A × B) = Px (B) dX(P )(x)
A

for all A ∈ E and B ∈ K.


Note that we say the conditional distribution although according to Theorem 1.9 the
Markov kernel can be changed on nullsets with respect to X(P ). The strictly correct
term would be a conditional distribution.
When specifying the conditional distribution, it is not necessary to give the entire
Markov kernel (Px )x∈X . Since the Markov kernel is integrated with respect to X(P ) it
will be enough to give (Px )x∈A0 , where A0 ∈ E is any set with P (X ∈ A0 ) = 1.
Conversely, a conditional distribution given by (Px )x∈A0 , where P (X ∈ A0 ) = 1, can
be extended to a ”true” Markov kernel (P̃x )x∈X by the definition

Px x ∈ A 0
P̃x =
P0 x ∈
/ A0

where P0 is some probability measure on (Y, K). Note that x 7→ P̃x (B) is measurable,
since A0 is a measurable set.
The interpretation of the conditional distribution of Y given X is that Px describes the
distribution of Y if we know that X = x. This interpretation is very useful although it
should not be taken too seriously, since it may be difficult to give a strict mathematical
description when the event X = x is a nullset. This interpretation leads to the
10 Conditional Distributions

following alternative notation for a Markov kernel (Px )x∈X that is a conditional
distribution of Y given X:

P (Y ∈ B | X = x) = Px (B) for B ∈ K .

A more relaxed but useful notation will be simply talking about ’the distribution of
Y | X = x’ instead of the longer ’the distribution Px , when (Px )x∈X is the
conditional distribution of Y given X’. We will also from time to time write
expressions like Y | X = x ∼ ν.
For completely arbitrary random variables, a conditional distribution may not always
be well-defined. However, if the image space of Y is a Borel space (i.e. isomorphic to
a Borel subset of the unit interval), this is the case:
Theorem 1.14 Let X and Y be random variables defined on the probability space
(Ω, F, P ) with values in (X , E) and (Y, K) respectively, such that Y is a Borel space.
Then there exists a conditional distribution of Y given X.
This result is particularly important, since spaces of the form R, Rn , and R∞ are all
Borel spaces. We refrain from proving Theorem 1.14 as well as these facts and refer
the reader to other textbooks on probability.
Although the conditional distributions exist, it is in general difficult and not clear how
the corresponding Markov kernels should be constructed. However, direct construction
of the Markov kernels is possible in specific situations.
Theorem 1.15 Assume that X and Y are random variables on (X , E) and (Y, K)
such that (Px )x∈X is the conditional distribution of Y given X. Then X and Y are
independent if and only if Px does not depend on x, i.e. the Markov kernel can be
chosen so that
Px = P0
for all x ∈ X . In the case of independence, then Px = P0 = Y (P ) for all x ∈ X .

Proof Suppose that X and Y are independent. Then for A ∈ E and B ∈ K


Z
P (X ∈ A, Y ∈ B) = X(P )(A) · Y (P )(B) = Y (P )(B) dX(P )(x)
A

which shows that the constant Markov kernel (Y (P ))x∈X is the conditional
distribution of Y given X.
Conversely, assume that Px = P0 for all x ∈ X , where P0 is some probability measure
on (Y, K). Then for B ∈ K we have
Z
P (Y ∈ B) = P (X ∈ X , Y ∈ B) = Px (B) dX(P )(x)
Z
= P0 (B) dX(P )(x) = P0 (B)

which shows that Y (P ) = P0 . Furthermore for A ∈ E and B ∈ K we obtain


Conditional distributions 11

Z Z
P (X ∈ A, Y ∈ B) = Px (B) dX(P )(x) = P0 (B) dX(P )(x)
A A
= X(P )(A)P0 (B) = P (X ∈ A)P (Y ∈ B)

leading to the conclusion that X and Y are independent. 2


Hence independence between two variables X and Y is equivalent to the conditional
distribution of Y given X being constant. In contrast, if the conditional distribution
consists of very different probability measures there is a strong dependence between X
and Y .
In the following theorem it is seen that if X is a discrete random variable, the
conditional distribution is just given by elementary conditional probabilities.
Theorem 1.16 Let X and Y be random variables defined on (Ω, F, P ) with values in
(X , E) and (Y, K). Assume that X is finite or countable and that E is the paving that
consists of all subsets of X . Then the conditional distribution of Y given X is
determined by
P (X = x, Y ∈ B)
Px (B) = for B ∈ K , (1.3)
P (X = x)
for all x ∈ X with P (X = x) > 0.
Note that Px (B) is simply defined as the conditional probability of (Y ∈ B) given the
set (X = x):

P (X = x, Y ∈ B)
Px (B) = = P (Y ∈ B | X = x)
P (X = x)

Proof Let A0 = {x ∈ X : P (X = x) > 0} and note that X(P )(A0 ) = 1 such that
(1.3) defines an (X , E)–Markov kernel on (Y, K) – the measurability is not a problem,
since all functions on X are E–measurable. For A ⊆ X and B ∈ K we have
Z Z
Px (B) dX(P )(x) = Px (B) dX(P )(x)
A A∩A0
X P (X = x, Y ∈ B)
= P (X = x)
P (X = x)
x∈A∩A0
X
= P (X = x, Y ∈ B)
x∈A∩A0

= P (X ∈ A ∩ A0 , Y ∈ B)
= P (X ∈ A, Y ∈ B)

such that (Px )x∈X actually is the conditional distribution of Y given X. 2


Example 1.17 Let X1 and X2 be independent random variables that are Poisson
distributed with parameters λ1 and λ2 . Then the distribution of X = X1 + X2 is a
Poisson distribution with parameter λ = λ1 + λ2 . We will find the conditional
12 Conditional Distributions

distribution of X1 given X by indicating Px ({n}) for all x, n ∈ N0 . This must be


sufficient, since all Px are concentrated on N0 . Using Theorem 1.16 yields for x ∈ N0
and n = 0, 1, . . . , x that
P (X1 = n, X2 = x − n)
Px ({n}) =
P (X = x)
P (X1 = n)P (X2 = x − n)
=
P (X = x)
x−n
λn
1 −λ1 λ2 −λ2
n! e (x−n)! e
= x
λ −λ
x! e
  n  x−n
x λ1 λ2
=
n λ1 + λ2 λ1 + λ2
Hence the conditional distribution of X1 given X = x is a binomial distribution with
parameters (x, λ2λ+λ
1
2
). 2
Theorem 1.18 Assume that X and Y are random variables defined on (Ω, F, P ) with
values in (X , E) and (Y, K) respectively. Assume that (Px )x∈X is the conditional
distribution of Y given X. Furthermore let µ and ν be σ–finite measures on (X , E)
and (Y, K) respectively and assume that X(P ) = f · µ. Finally assume that (Px )x∈X
is a (X , E)–Markov kernel on (Y, K) of the type constructed in Theorem 1.2: Assume
that Px = gx · ν, where the function (x, y) 7→ gx (y) is E ⊗ K–measurable.
Then the joint distribution of X and Y is given by (X, Y )(P ) = h · µ ⊗ ν, where

h(x, y) = f (x) gx (y) for all x ∈ X , y ∈ Y

Proof Let A ∈ E and B ∈ K. Then

(X, Y )(P )(A × B) = P (X ∈ A, Y ∈ B)


Z
= 1A (x) Px (B) dX(P )(x)
Z Z 
= 1A (x) 1B (y)gx (y) dν(y) f (x) dµ(x)
Z Z
= 1A×B (x, y) f (x)gx (y)dν(y)dµ(x)
Z
= 1A×B (x, y) h(x, y)d(µ ⊗ ν)(x, y)

where the last equality is follows from Tonelli’s theorem. We see that (X, Y )(P ) and
h · µ ⊗ ν coincide on all product sets, and therefore must be equal. 2
The theorem states that the joint density is the product of the marginal density and the
conditional densities. The next theorem gives the converse result: The densities for the
conditional distribution is the ratio of the joint density and the marginal density.
Conditional distributions 13

Theorem 1.19 Assume that X and Y are random variables defined on (Ω, F, P ) with
values in (X , E) and (Y, K). Furthermore let µ and ν be σ–finite measures on (X , E)
and (Y, K) and assume that (X, Y )(P ) = h · µ ⊗ ν. Then the conditional distribution
of Y given X exists. The marginal distribution of X has density with respect to µ given
by Z
f (x) = h(x, y) dν(y)

Let A0 = {x ∈ X : 0 < f (x) < ∞}. Then X(P )(A0 ) = 1 and the conditional
distribution (Px )x∈X of Y given X has density with respect to ν given by

h(x, y)
gx (y) =
f (x)

for all x ∈ A0 .

Proof Finding the marginal density for X(P ) is a well–known calculation. For
A ∈ E we have

X(P )(A) = (X, Y )(P )(A × Y)


Z
= h(x, y) d(µ ⊗ ν)(x, y)
A×Y
Z Z
= h(x, y) dν(y) dµ(x)
ZA
= f (x) dµ(x)
A

according to Tonelli. Thus X(P ) has density f with respect to µ.


Now define the sets

A1 = {x ∈ X : f (x) = 0} and A2 = {x ∈ X : f (x) = ∞} .

Since X(P )(X ) = 1 we have


Z
1 ≥ X(P )(A2 ) = f (x) dµ(x) = ∞ · µ(A2 )
A2

so µ(A2 ) = 0. Clearly we have that X(P )(A1 ) = 0, such that X(P )(A0 ) = 1.
R
From Tonelli we have that x 7→ h(x, y)dν(y) = f (x) is E–measurable. Then also

h(x, y)
(x, y) 7→ 1A0 (x) = 1A0 (x)gx (y)
f (x)

is E ⊗ K − B–measurable, and we have from Theorem 1.2 that (Px )x∈A0 is a Markov
kernel, when Px = gx · ν. Finally we have for A ∈ E and B ∈ K that
14 Conditional Distributions

Z Z Z 
Px (B) dX(P )(x) = gx (y) dν(y) f (x) dµ(x)
A A∩A0 B
Z Z 
h(x, y)
= dν(y) f (x) dµ(x)
A∩A B f (x)
Z Z0 
= h(x, y) dν(y) dµ(x)
ZA B

= h(x, y)d(µ ⊗ ν)(x, y)


A×B
= (X, Y )(P )(A × B)
= P (X ∈ A, Y ∈ B) ,

which shows, that (Px )x∈A0 is the conditional distribution for Y given X. 2
Example 1.20 Suppose V = Rd and assume the random vector X partitioned into
components X1 and X2 , where X1 ∈ Rr and X2 ∈ Rs with r + s = d. Its mean vector
and covariance matrix can then be partitioned accordingly into blocks as
   
ξ1 Σ11 Σ12
ξ= and Σ =
ξ2 Σ21 Σ22

such that Σ11 has dimensions r × r and so on. Let X be distributed as Nd (ξ, Σ), where
X, ξ and Σ are partitioned as above and Σ is regular. Then the conditional distribution
of X1 given X2 = x2 is Nr (ξ1|2 , Σ1|2 ), where

ξ1|2 = ξ1 + Σ12 (Σ22 )−1 (x2 − ξ2 ) and Σ1|2 = Σ11 − Σ12 (Σ22 )−1 Σ21 . (1.4)

This is seen as follows: Since Σ is positive definite we can let K = Σ−1 denote the
concentration matrix and assume this to be partitioned in the same fashion as Σ. By
Theorem 1.19, the conditional density is proportional to the joint density of X1 and
X2 . Hence, exploiting that x2 is fixed, we find by direct calculation that

f (x1 | x2 ) ∝ fξ,Σ (x)


∝ exp −(x1 − ξ1 )> K11 (x1 − ξ1 )/2 − (x1 − ξ1 )> K12 (x2 − ξ2 ) .


The linear term involving x1 has coefficient equal to

K11 ξ1 − K12 (x2 − ξ2 ) = K11 ξ1 − (K11 )−1 K12 (x2 − ξ2 ) .




Using (C.2) we find that

(K11 )−1 = Σ11 − Σ12 (Σ22 )−1 Σ21 (1.5)

and further that


(K11 )−1 K12 = −Σ12 (Σ22 )−1 , (1.6)
which then gives
Conditional distributions 15

f (x1 | x2 ) ∝ exp −(x1 − ξ1|2 )> K11 (x1 − ξ1|2 )/2




and the result follows. Note that the proportionality constant may in principle depend
on the parameters as well as on x2 . But as the distribution is normal, this turns out not
to be the case. It follows from (C.1) that we have
det Σ22
det Σ = det Σ1|2 det Σ22 = . (1.7)
det K11
Note also the identities (1.5) and (1.6), which are quite useful in their own right. The
first expresses that the concentration matrix of the conditional distribution is obtained
from the concentration matrix of the joint distribution by deleting rows and columns
corresponding to the variables conditioned upon. We thus obtain an alternative formula
for the parameters of the conditional distribution
ξ1|2 = ξ1 − (K11 )−1 K12 (x2 − ξ2 ) and K1|2 = K11 (1.8)
which may be simpler to use in certain contexts. 2
We can reformulate Theorem 1.19 to obtain what is known as Bayes’ formula.
Corollary 1.21. (Bayes’ formula) If π = X(P ) and Px has density gx w.r.t. ν, then
the conditional distribution of X given Y exists and is determined by the Markov
kernel (πy∗ )y∈Y with density Ly w.r.t. π where
Ly (x) = gx (y)/c(y)
where Z
c(y) = gx (y) dπ(x).

Proof We have by integration that


Z Z 
P (X ∈ A, Y ∈ B) = gx (y) dν(y) dπ(x)
ZA B

= gx (y) d(π ⊗ ν)(x, y).


A×B

Hence, h(x, y) = gx (y) is the joint density of (X, Y ) w.r.t. π ⊗ ν. Using now
Theorem 1.19 with x and y interchanged we get that the conditional distribution of X
given Y = y exists and has density
Ly (x) = gx (y)/c(y)
w.r.t. π. 2
Bayes’ theorem is of course particularly important for Bayesian inference. We use the
term Fisherian model for a parametrized family P = {Pθ , θ ∈ Θ} of probability
measures on a measurable space (Y, F). If the parameter space Θ is equipped with a
σ-algebra T and the map θ 7→ Pθ (A) is measurable for all A ∈ F, this family can be
seen as a Markov kernel. We then define a corresponding Bayesian model as follows:
16 Conditional Distributions

Definition 1.22 If π is a prior distribution on (Θ, T) and P = {Pθ , θ ∈ Θ} is a


Fisherian model on Y with Θ as parameter space and densities gθ (·) w.r.t. a σ-finite
measure ν on Y, the corresponding Bayesian model with prior distribution π for
Θ × Y is the integration of (Pθ )θ∈Θ w.r.t. π.
We can then reformulate Corollary 1.21 as
Corollary 1.23 If π is a prior distribution on (Θ, T) and P = {Pθ , θ ∈ Θ} is a
Fisherian model on Y with Θ as parameter space and densities gθ w.r.t. a σ-finite
measure ν on Y, then the posterior distribution of θ given Y in the corresponding
Bayesian model exists and is determined by the Markov kernel (πy∗ )y∈Y with density
Ly w.r.t. π where
Ly (θ) ∝ gθ (y).

In other words, the corollary says that the likelihood function Ly (θ) ∝ gθ (y) is the
density of the posterior distribution πy∗ w.r.t. the prior distribution π:

πy∗ ∝ Ly · π, or posterior ∝ likelihood × prior.

1.5 Transformations of conditional distributions


In this section we shall present a series of transformation results for conditional
distributions. They have a somewhat similar content: In a framework with three or
more random variables, where we know some of the conditional distributions, various
other conditional distributions can be simply expressed.
It is complicated to understand how conditional distributions are specified in situations
with three or more random variables. The reader is encouraged to spend much time
understanding the content of the results, rather than the proofs. The stated results are
not very surprising if the content is understood. And the proofs are rather mechanical:
Firstly, it is argued that some expression is a Markov kernel, and then it is shown that
this Markov kernel is the right conditional distribution.
Assume in this section, that X, Y , X1 , X2 , Y1 and Y2 are random variables defined on
(Ω, F, P ) with values in (X , E), (Y, K), (X1 , E1 ), (X2 , E2 ), (Y1 , K1 ) and (Y2 , K2 )
respectively.

Theorem 1.24. (Substitution Theorem) Assume that (Px )x∈X is the conditional
distribution of Y given X. Let (Z, H) be a measurable space, and let φ : X × Y → Z
be a measurable map. Define Z = φ(X, Y ). Then the conditional distribution of Z
given X exists and is determined by (P̃x )x∈X , where

P̃x = (φ ◦ ix )(Px )

Note that this is not at all surprising: If we know that X = x, then we have
Z = φ(x, Y ) = (φ ◦ ix )(Y ), and apparently we are allowed to plug the conditional
distribution into this formula.
Transformations of conditional distributions 17

Proof For a fixed C ∈ H we have

P̃x (C) = Px ((φ ◦ ix )−1 (C)) = Px ((φ−1 (C))x ) ,

which is a measurable function of x, since (Px )x∈X is a Markov kernel. Hence


(P̃x )x∈X is a Markov kernel (each P̃x is a probability measure since it is the image
measure by the function φ ◦ ix ).
Now let A ∈ E and C ∈ H. Then

P (X ∈ A, Z ∈ C) = (X, Y )(P )((A × Y) ∩ φ−1 (C)) .

It is seen that if x ∈
/ A then

((A × Y) ∩ φ−1 (C))x = ∅

and if x ∈ A we have

((A × Y) ∩ φ−1 (C))x = (φ−1 (C))x = (φ ◦ ix )−1 (C) .

Hence
Z Z
P (X ∈ A, Z ∈ C) = Px ((φ ◦ ix )−1 (C)) dX(P )(x) = P̃x (C) dX(P )(x) ,
A A

which is what we wanted to prove. 2


Corollary 1.25 Assume that X and Y are independent random variables, let (Z, H)
be a measurable space, and let φ : X × Y → Z be a measurable map. Define
Z = φ(X, Y ). Then the conditional distribution of Z given X exists and is determined
by (P̃x )x∈X , where each P̃x is given as the distribution of φ(x, Y ).
Proof This follows directly from Theorem 1.24 since the conditional distribution of
Y given X is the constant Markov kernel (Y (P ))x∈X . 2
Example 1.26 In this example we revisit the multivariate Gaussian distribution and
derive the same conditional distribution as in Example 1.20; however, this time we
shall not assume that its covariance matrix Σ is positive definite. We assume the
covariance matrix is partitioned as in Example 1.20. We recall from Proposition D.5
that in the normal distribution, X1 and X2 are independent if and only if Σ12 = 0.
The aim will be to find the conditional distribution of X1 given X2 . For this define
Z = X1 − Σ12 Σ− −
22 X2 where Σ22 is any g-inverse to Σ22 ; i.e. any symmetric matrix

satisfying Σ22 Σ22 Σ22 = Σ22 . Note that if Σ22 is positive definite, we have
Σ−22 = (Σ22 )
−1
.
We first show that if v satisfies v > Σ22 = 0 we must also have v > Σ21 = 0; for if this
were not the case, we can find u such that ψ = v > Σ21 u < 0 and hence if we let
vλ> = (u> : λv > ) we have

vλ> Σvλ = u> Σ11 u + 2λψ


18 Conditional Distributions

which becomes negative when λ is large, contradicting that Σ is positive semidefinite.


More generally, if HΣ22 = 0, then also HΣ21 = 0 for any q × s-matrix H. We then
have for Z and X2 that (with e.g. Ir the r–dimensional identity matrix)

Ir −Σ12 Σ−
    
Z 22 X1
= .
X2 0 Is X2

To find the joint distribution of Z and X2 we use Proposition D.3 and calculate

Ir −Σ12 Σ−
   
22 Σ11 Σ12 Ir 0
0 Is Σ21 Σ22 −Σ− 22 Σ21 Is
− −
   
I −Σ12 Σ22 Σ11 − Σ12 Σ22 Σ21 Σ12
= r
0 Is 0 Σ22

 
Σ11 − Σ12 Σ22 Σ21 0
= .
0 Σ22

Here we have used that

Σ21 − Σ22 Σ− −
22 Σ21 = (Ir − Σ22 Σ22 )Σ21 = 0

since also
(Ir − Σ22 Σ− −
22 )Σ22 = Σ22 − Σ22 Σ22 Σ22 = 0.

Hence we get that

ξ1 − Σ12 Σ− Σ11 − Σ12 Σ−


     
Z 22 ξ2 22 Σ21 0
∼ Nr+s , .
X2 ξ2 0 Σ22

From this we see that Z and X2 are independent and that

Z ∼ Nr (ξ1 − Σ12 Σ− −
22 ξ2 , Σ11 − Σ12 Σ22 Σ21 ) .

Hence this normal distribution is also the conditional distribution of Z given X2


(Theorem 1.15). Then using the substitution X1 = Z + Σ12 Σ− 22 X2 gives according to
Corollary 1.25 and Proposition D.3 that

(X1 | X2 = x) ∼ Nr (ξ1 + Σ12 Σ− −


22 (x − ξ2 ) , Σ11 − Σ12 Σ22 Σ21 )

for any g-inverse Σ−


22 . 2
Example 1.27 Assume that X and Y are real valued variables such that the joint
distribution of (X, Y ) is a Dirichlet distribution with parameters (λ1 , λ2 , λ). Then the
distribution of (X, Y ) has density
Γ(λ + λ1 + λ2 ) λ1 −1 λ2 −1
f (x, y) = x y (1 − x − y)λ−1
Γ(λ)Γ(λ1 )Γ(λ2 )

on the set {(x, y) ∈ R2 : 0 < x, 0 < y, x + y < 1}. It can be shown that the marginal
distribution of X is a B–distribution with parameters (λ1 , λ2 + λ). Hence it has density
Transformations of conditional distributions 19

Γ(λ + λ1 + λ2 ) λ1 −1
g(x) = x (1 − x)λ2 +λ−1
Γ(λ1 )Γ(λ2 + λ)
for x ∈ (0, 1). The conditional distribution Px of Y given X = x for x ∈ (0, 1) must
be concentrated on the interval (0, 1 − x) and have density
 λ2 −1  λ−1
f (x, y) Γ(λ2 + λ) y y 1
fx (y) = = 1− .
g(x) Γ(λ)Γ(λ2 ) 1 − x 1−x 1−x
If Px is transformed by the map y → y/(1 − x) then a B–distribution with parameters
(λ2 , λ) is obtained. According to Theorem 1.24 the constant family consisting of
B–distributions with parameters (λ2 , λ) indexed by x ∈ (0, 1) must be the conditional
distribution of Y /(1 − X) given X. It follows from Theorem 1.15 that Y /(1 − X) and
X are independent and that Y /(1 − X) is B–distributed with parameters (λ2 , λ). 2
The following rather deep results is a type of converse to Corollary 1.25 and shows that
the functional construction in some sense is a universal representation of a Markov
kernel.
Theorem 1.28 Let X and Y be random variables with values in (X , E) and (Y, K).
There exists a map φ : X × (0, 1) → Y, which is E ⊗ B(0,1) − K measurable, with the
following property: if X 0 is a random variable with the same distribution as X, U is a
real valued random variable, independent of X 0 and uniformly distributed on (0, 1),
and if we let
Y 0 = φ(X 0 , U )
then (X 0 , Y 0 ) has the same distribution as (X, Y ).
Proof Due to the underlying assumption that the spaces involved are Borel spaces, we
may assume that (Y, K) = (R, B). Let (Px )x∈X be the conditional distribution of Y
given X. We know that the conditional distribution of U given X 0 is degenerate:
Qx = ν for all x ∈ X ,
where ν is the uniform distribution on (0, 1). By the substitution theorem, the
conditional distribution of Y 0 given X 0 is
Rx = φ ◦ ix (Qx ) = φ ◦ ix (ν) .
The proof is complete, once we show how to choose φ such that Rx = Px for every x,
as the joint distribution is uniquely determined from one marginal distribution and the
conditional distribution of the remaining marginal given the first.
The deep claim is not so much that it is possible to choose φ is such a way that
φ ◦ ix (ν) = Px for all x ∈ X . (1.9)
For if we let Fx be the distribution function corresponding to Px , and if we let qx be a
quantile function for Fx , it is well known that qx (ν) = Px . So we may let
φ(x, u) = qx (u) ,
and (1.9) will be satisfied bona fide.
20 Conditional Distributions

What is a deep claim is that the construction can be carried out in a way that guarantees
φ to be measurable. There is a choice involved, in the sense that quantile functions are
not unique, and even though the individual quantile functions are increasing, and thus
necessarily measurable, the various choices may destroy joint measurability.
The key is to get rid of the choices, and find an operationally defined quantile function.
A nice one is
qx (p) = inf{y ∈ R | Fx (y) > p} for all x ∈ X , p ∈ (0, 1) .
The idea is to single out the largest possible p-quantile whenever there is a choice. Let
us prove that this is in fact a quantile function: For fixed x and p, we have that
(
(y0 , ∞)
{y ∈ R | Fx (y) > p} = ,
[y0 , ∞)
for some y0 ∈ R. Whether we have the open or the halfclosed interval, depends on the
specifics of the situation, but in both cases we see that qx (p) = y0 . For each n we have
that y0 + n1 > y0 , and thus  
1
Fx y0 + > p.
n
Using right continuity of Fx , we can conclude that
Fx (y0 ) ≥ p .
1
Similarly, y0 − n < y0 , and so
 
1
Fx y0 − ≤ p.
n
Using monotonicity of Fx , we can conclude that
Fx (y0 −) ≤ p .
Together these inequalities show that y0 is a p-quantile for Fx . As for measurability, an
elementary argument shows that
[
{(x, p) | qx (p) < z} = {(x, p) | Fx (w) > p} . (1.10)
w<z,w∈Q

For any fixed w, the map


 
x 7→ Fx (w) = Px (−∞, w]

is measurable, as (Px )x∈X is a Markov kernel. Hence (x, p) 7→ (Fx (w), p) is


measurable, and thus
{(x, p) | Fx (w) > p} = {(x, p) | Fx (w) − p > 0}
is a measurable set. The fact that the right hand side of (1.10) is a countable union,
shows that the left hand side is a measurable set. 2
Transformations of conditional distributions 21

The point of Theorem 1.28 is that we may think of as any pair of variables as generated
in a two-step procedure, where the generation of the second variable can be
accomplished by mixing the first variable with random noise. It is the way that the
mixing is carried out, that determines the joint distribution.
The update function φ is not at all unique. There are literally uncountably many ways
to choose it. In certain cases it matters which one we use, in most cases it is irrelevant.
However, in typical applications there is a specific update function that almost forces
itself upon us.

We conclude the section by identifying some cases where the structure of conditional
distribution simplifies.
Theorem 1.29 Assume that (Px )x∈X is the conditional distribution of Y given X. Let
(Z, H) be a measurable space and let t : X → Z be an E − H–measurable map.
Define Z = t(X). Then the conditional distribution (Qx,z )(x,z)∈X ×Z of Y given
(X, Z) is given by
Qx,z = Px for all x ∈ X , z ∈ Z (1.11)
Note: This is a situation where it is quite clear that conditional distributions are not
uniquely determined. The variable (X, Z) does not have values in the entire product
space X × Z but only on the graph of t, meaning the set of points

{(x, z) ∈ X × Z : z = t(x)}

Then Qx,z could be defined as any probability measure outside the graph, if only some
measurability conditions are fulfilled. Hence the Markov kernel defined in (1.11) is not
the only possible conditional distribution of Y given (X, Z) – it is simply a convenient
choice.
Proof It is easily argued that a (X × Z, E ⊗ H)–Markov kernel (Qx,z )(x,z)∈X ×Z on
(Y, K) is defined by (1.11). For A ∈ E, B ∈ K and C ∈ H we have
Z Z
Qx,z (B) d(X, Z)(P )(x, z) = 1A×C (x, z)Qx,z (B) d((id, t) ◦ X)(P )(x, z)
A×C
Z
= 1A×C ◦ (id, t)(x) Q(id,t)(x) (B) dX(P )(x)
Z
= 1A∩t−1 (C) (x)Px (B) dX(P )(x) .

Since (Px )x∈X is the conditional distribution of Y given X, the last integral can be
identified as

P (X ∈ A ∩ t−1 (C), Y ∈ B) = P (X ∈ A, Z ∈ C, Y ∈ B)
= P ((X, Z) ∈ A × C, Y ∈ B) .

By fixing B and letting A × C vary it is obtained (by uniqueness of measures) that


22 Conditional Distributions

Z
Qx,z (B) d(X, Z)(P )(x, z) = P ((X, Z) ∈ G, Y ∈ B)
G

for all G ∈ E ⊗ H and all B ∈ K. Hence it is concluded that (Qx,z )(x,z)∈X ×Z is the
conditional distribution of Y given (X, Z). 2
Theorem 1.30 Let (Px )x∈X be the conditional distribution of Y given X. Let (Z, H)
be a measurable space and let t : X → Z be an E − H–measurable map. Define
Z = t(X). If an (Z, H)–Markov kernel (Qz )z∈Z on (Y, K) exists such that

Px = Qt(x) for all x ∈ X ,

then (Qz )z∈Z is the conditional distribution of Y given Z


A more relaxed formulation of this is that if the conditional distribution of Y given X
only depends on X through t(X), then this is also the conditional distribution of Y
given t(X).
Proof Let C ∈ H and B ∈ K. According to the change–of–variable theorem we have

P (Z ∈ C, Y ∈ B) = P (X ∈ t−1 (C), Y ∈ B)
Z
= 1t−1 (C) (x)Px (B) dX(P )(x)
Z
= 1C ◦ t(x)Qt(x) (B) dX(P )(x)
Z
= 1C (z)Qz (B) d(t ◦ X)(P )(z)
Z
= Qz (B) dZ(P )(z) .
C

Hence (Qz )z∈Z is the conditional distribution of Y given Z. 2

1.6 Conditional moments


Clearly we can consider moments of random variables w.r.t. a conditional distribution.
For the expectation we have the following formal definition of a pointwise conditional
expectation.
Definition 1.31 Assume that X and Y are random variables defined on (Ω, F, P ) with
values in (X , E) and (R, B). Let (Px )x∈X be the conditional distribution of Y given
X. Assume that for some x ∈ X it holds that
Z
|y| dPx (y) < ∞

then we define the conditional expectation of Y given X = x as


Z
E(Y | X = x) = y dPx (y)
Conditional moments 23

A related and useful concept is that of a conditional expectation (operator) given a


σ-algebra. In contrast to the conditional expectation defined pointwise for a specific x
in Definition 1.31, this is a global definition and demands that the unconditional
expectation exists.
Definition 1.32 Let X be a real random variable defined on (Ω, F, P ) with
E|X| < ∞ and D be a sub σ–algebra of F. A conditional expectation of X given D is
any real random variable denoted E(X | D) that satisfies
1) E(X | D) is D–measurable
2) E|E(X | D)| < ∞
3) For all D ∈ D it holds that
Z Z
E(X | D) dP = X dP . (1.12)
D D

Conditional expectations are almost unique:


Theorem 1.33 If U and Ũ are both conditional expectations of X given D, then
U = Ũ a.s. Further, If U is a conditional expectation of X given D and Ũ is
D-measurable with Ũ = U a.s., then Ũ is also a conditional expectation of X given D.
Proof If U and Ũ are both conditional expectations, we let A = {U − Ũ > } which
is clearly D-measurable and thus we have from (1.12) that for all  > 0 it holds that
Z
0= (U − Ũ ) dP ≥ P (A ) ≥ 0
A

and hence we have P (A ) = 0; similarly we conclude that P (B ) = 0 where


B = {Ũ − U > } and hence U = Ũ almost surely.
Further, if U is a conditional expectation and U = Ũ a.s. with Ũ D-measurable, we
have E|Ũ | < ∞ and get for D ∈ D that
Z Z Z
Ũ dP = U dP = X dP
D D D

and hence Ũ is also a conditional expectation. 2


Finally, such a conditional expectation always exists, even in general (non-Borel)
probability spaces. However, as this is a non-elementary result, we shall refrain from
proving this here. See for example Chapter 23 of Schilling (2005) for further details.
Theorem 1.34 If X is a real random variable with E|X| < ∞, then there exists a
conditional expectation of X given D.
Furthermore we have a series of nice properties.
Theorem 1.35 Let X, Xn and Y be real random variables, all of which are
integrable. It then holds that
(a) If X = c a.s., where c ∈ R is a constant, then E(X|D) = c a.s.
24 Conditional Distributions

(b) For α, β ∈ R it holds that

E(αX + βY |D) = αE(X|D) + βE(Y |D) a.s.

(c) If X ≥ 0 a.s. then E(X|D) ≥ 0 a.s. If Y ≥ X a.s. then


E(Y |D) ≥ E(X|D) a.s.
(d) If D ⊆ E are sub σ-algebras of F then

E(X|D) = E[E(X|E)|D] = E[E(X|D)|E] a.s.

(e) If σ(X) and D are independent then

E(X|D) = EX a.s.

(f) If X is D-measurable then


E(X|D) = X a.s.

(g) If it holds for all n ∈ N that Xn ≥ 0 a.s. and Xn+1 ≥ Xn a.s. with lim Xn = X
a.s., then
lim E(Xn |D) = E(X|D) a.s.
n→∞

(h) If X is D-measurable and E|XY | < ∞, then

E(XY |D) = X E(Y |D) a.s.

(i) If f : R → R is a measurable function that is convex on an interval I, such that


P (X ∈ I) = 1 and E|f (X)| < ∞, then it holds that
 
f E(X|D) ≤ E f (X)|D) a.s.

Proof The proof is left as Exercise 1.16. 2


Now assume that X is a random variable with values in (X , E) and that Y is a real
random variable with E|Y | < ∞. We shall then write the conditional expectation of Y
given D = σ(X) in short as E(Y | X) rather than E(Y | σ(X)). The resulting random
variable is referred to as the conditional expectation of Y given X — as opposed to the
conditional expectation of Y given X = x.
The fact that E(Y | X) is σ(X)–measurable is equivalent to the existence of a
measurable map φ : (X , E) → (R, B) such that

E(Y | X) = φ(X) P almost surely

and the next theorem gives that φ and x 7→ E(Y | X = x) are almost identical if Y has
finite expectation. In words, the theorem says that any conditional expectation is
almost surely equal to the expectation in the conditional distribution.
Conditional moments 25

Theorem 1.36 Assume that X and Y are random variables defined on (Ω, F, P ) and
with values in (X , E) and (R, B) respectively. Let (Px )x∈X be the conditional
distribution of Y given X.
If E|Y | < ∞, then X(P )(A0 ) = 1, where
Z
A0 = {x ∈ X : |y| dPx (y) < ∞} .

Define φ : X → R by φ(x) = 1A0 (x)E(Y | X = x). Then φ(X) is a version of the


conditional expectation of Y given X.

Proof Consider the function f : X × R → R given by f (x, y) = y. Since


Z Z
|f (x, y)| d(X, Y )(P )(x, y) = |f (X, Y )| dP = E|Y | < ∞ ,

it follows from the extended Fubini, that


Z Z
|y| dPx (y) = |f (x, y)| dPx (y) < ∞

for X(P ) almost all x ∈ X , such that X(P )(A0 ) = 1.


Since φ : X → R is defined by
R
y dPx (y) , x ∈ A0
φ(x) =
0, x∈/ A0

then it is E − B–measurable according to the extended Fubini. We will argue, that


φ(X) is a conditional expectation of Y given X by verifying the conditions 1)–3) in
Definition 1.32. Since φ is measurable we have that φ(X) is σ(X)–measurable.
Furthermore — using the change-of-variable theorem, Theorem A.8 — we get
Z
E|φ(X)| = |φ(X)| dP
Z
= |φ(x)| dX(P )(x)
Z Z
= y dPx (y) dX(P )(x)
A0
Z Z 
≤ |y|dPx (y) dX(P )(x)
Z
= |y| d(X, Y )(P )(x, y) < ∞

In the last equality we have used extended Tonelli. This shows, that 2) is satisfied for
φ(X). Finally we have for A ∈ E
26 Conditional Distributions

Z Z
φ(X) dP = φ(x) dX(P )(x)
(X∈A) A
Z Z
= y dPx (y) dX(P )(x)
A∩A0
ZZ
= 1A∩A0 (x)y dPx (y) dX(P )(x)
Z
= 1A∩A0 (x)y d(X, Y )(P )(x, y)
Z
= 1A∩A0 (X)Y dP
Z
= Y dP
(X∈A∩A0 )
Z
= Y dP
(X∈A)

In the fourth equality we have used the extended Fubini’s theorem. This shows that
also 3) is fulfilled, such that φ(X) is a conditional expectation of Y given X. 2
The following result can be shown using the proof of Theorem 1.36:
Theorem 1.37 Assume that X and Y are random variables defined on (Ω, F, P ) with
values in (X , E) and (R, B) respectively. If E|Y | < ∞, then E|E(Y | X)| < ∞ and

E(E(Y | X)) = EY

Proof In the proof of Theorem 1.36 we saw that φ(X) = E(Y | X) is integrable, and
that Z Z
φ(X) dP = Y dP
(X∈A) (X∈A)

So for A = X we get
Z Z
E(E(Y | X)) = φ(X) dP = Y dP = EY

which completes the proof. 2


Theorem 1.38 Assume that X and Y are random variables defined (Ω, F, P ) with
values in (X , E) and (Y, K) respectively. Suppose that the conditional distribution
(Px )x∈X of Y given X exists. Let φ : X × Y → R be a measurable function and
define Z = φ(X, Y ). Assume that E|Z| < ∞. Then
Z
E(Z | X = x) = φ(x, y) dPx (y)

for X(P ) almost all x ∈ X .


Conditional moments 27

Proof According to Theorem 1.24 we have that the conditional distribution of Z


given X is given by the Markov kernel (P̃x )x∈X , where
P̃x = (φ ◦ ix )(Px )
Then according to Theorem 1.36 we have for X(P ) almost all x ∈ X
Z Z Z
E(Z | X = x) = z dP̃x (z) = (φ ◦ ix )(y) dPx (y) = φ(x, y) dPx (y)

which was to be shown. 2


Corollary 1.39 Assume that X and Y are independent random variables defined
(Ω, F, P ) with values in (X , E) and (Y, K) respectively. Let φ : X × Y → R be a
measurable function and define Z = φ(X, Y ). Assume that E|φ(X, Y )| < ∞. Then
Z
E(φ(X, Y ) | X = x) = φ(x, y) dY (P )(y)

for X(P ) almost all x ∈ X .


Proof (Y (P ))x∈X is the conditional distribution of Y given X. 2
We can also use Theorem 1.38 to show the following.
Corollary 1.40 Assume that Y and Z are real valued random variables with
E|Y | < ∞ and E|Z| < ∞. Let X be a random variable with values in (X , E). Then
E(Y + Z | X = x) = E(Y | X = x) + E(Z | X = x)
for X(P ) almost all x ∈ X .
Proof Let (Px )x∈X be the conditional distribution of (Y, Z) given X. Then
Z
E(Y + Z | X = x) = (y + z) dPx (y, z)

for X(P ) almost all x ∈ X . And


Z Z
E(Y | X = x) = y dPx (y, z) E(Z | X = x) = z dPx (y, z)

for X(P ) almost all x ∈ X . 2


If Y is real valued with EY 2 < ∞, and (Px )x∈X is the conditional distribution of Y
given X, then we can define the conditional variance of Y given X = x by
Z Z 2
V (Y | X = x) = y 2 dPx (y) − y dPx (y)

which will be well–defined for X(P ) almost all x ∈ X . Letting V (Y | X) be the


composition of X and x 7→ V (Y | X = x) gives
V (Y | X) = E(Y 2 | X) − E(Y | X)2
28 Conditional Distributions

Theorem 1.41 Let X and Y be random variables defined on (Ω, F, P ) with values in
(X , E) and (R, B) respectively. If EY 2 < ∞, then
 
V Y = E V (Y | X) + V E(Y | X) .

Proof We use the calculation

E V (Y | X) + V E(Y | X) = E E(Y 2 | X) − E(Y | X)2


  
2
+ E E(Y | X)2 − E E(Y | X)

2
= E E(Y 2 | X) − E E(Y | X)


as required. 2
Example 1.42 In example 1.26 we studied the situation where
     
X1 ξ1 Σ11 Σ12
∼ Nr+s , ,
X2 ξ2 Σ21 Σ22

and we found that

X1 | X2 = x ∼ Nr (ξ1 + Σ12 Σ−1 −1


22 (x − ξ2 ) , Σ11 − Σ12 Σ22 Σ21 )

If we assume that X1 is one–dimensional, we have defined E(X1 | X2 = x) and


V (X1 | X2 = x). Since conditional expectations and conditional variances are
calculated as expectations and variances in the conditional distributions, we have

E(X1 | X2 = x) = ξ1 + Σ12 Σ−1


22 (x − ξ2 )
V (X1 | X2 = x) = Σ11 − Σ12 Σ−1
22 Σ21

Note: the conditional variance does not depend on x but is different from V (X1 ). 2
Confusing conditional variances and ordinary variances is a quite common mistake –
and that may lead to substantial problems.
Exercises 29

1.7 Exercises
Exercise 1.1 Assume that X1 and X2 are independent random variables that are both
binomially distributed with parameters (n, p). Define the random variable X = X1 + X2 . Find
the conditional distribution of X1 given X.
Exercise 1.2 Let X and Y be random variables defined on (Ω, F, P ). Assume that
(a) X has the binomial distribution with parameters (n, p1 )

(b) The conditional distribution of Y given X = x is binomial with parameters (n, p2 )


Find the marginal distribution of Y and try to give an intuitive explanation of the result.
Exercise 1.3 Assume that X and Y are two random variables defined on (Ω, F, P ) with values
in (X , E) and (Y, K) respectively, and let (Px )x∈X be the conditional distribution of Y given
X. Let f : X × Y → [0, ∞) be an E ⊗ K–measurable function.
(a) Show that ZZ
E[f (X, Y )] = f (x, y) dPx (y) dX(P )(x).

(b) Assume that X is uniformly distributed on (0, 1). Assume that the conditional distribution
(Px )x∈(0,1) of Y given X is the exponential distribution with mean value x. Find EY .
Exercise 1.4 Let Y be a finite or countable set, and let K consist of all subsets of Y. Assume
that Y is a random variable defined on (Ω, F, P ) with values in (Y, K). Let p(y) denote the
probability function for Y . Let X be another finite or countable set, and assume that t : Y → X
is some map. Define X = t(Y ).

(a) Show that X has probability function


X
r(x) = p(y)
y∈t−1 (x)

(b) Show that (Px )x∈X is the conditional distribution of Y given X, where each Px has probability
function
p(y)1{x} (t(y))
qx (y) =
r(x)

Exercise 1.5 Let Y1 , . . . , Yn be independent and identically distributed random variables


defined on (Ω, F, P ) with values in {0, 1}. Assume that

P (Y1 = 0) = 1 − p , P (Y1 = 1) = p

for some 0 < p < 1. Define t : {0, 1}n → {0, 1, . . . , n} by

t(y1 , . . . , yn ) = y1 + · · · + yn

Define X = t(Y1 , . . . , Yn ).
(a) Realise that X has the binomial distribution with parameters (n, p) and argue that
P (X = x) > 0 for all x = 0, 1, . . . , n.
30 Conditional Distributions

(b) Show that (Px )x=0,...,n is the conditional distribution of Y = (Y1 , . . . , Yn ) given X, where Px
is the uniform distribution on {(y1 , . . . , yn ) ∈ {0, 1}n : y1 + · · · + yn = x}.

Exercise 1.6 Let X1 , X2 and X3 be independent random variables, where each Xi has a
Poisson distribution with parameter λi . Define X = X1 + X2 + X3 and show that the
conditional distribution of (X1 , X2 , X3 ) given X is given by (Px )x∈N0 , where each Px (for
x > 0) is a multinomial distribution with parameters x and (λ1 /λ, λ2 /λ, λ3 /λ), where
λ = λ1 + λ2 + λ3 : For all (x1 , x2 , x3 ) with x1 + x2 + x3 = x it holds that
 x1  x2  x2
x! λ1 λ2 λ2
Px {(x1 , x2 , x3 )} =
x1 !x2 !x3 ! λ λ λ

It may be useful to note that X is Poisson distributed with parameter λ.

Exercise 1.7 Let X and Y be random variables defined on (Ω, F, P ). Assume that
(a) X has the binomial distribution with parameters (n, p1 ).

(b) The conditional distribution of Y given X = x is binomial with parameters (x, p2 ).


Find the marginal distribution of Y and try to give an intuitive explanation of the result.

Exercise 1.8 Let X and Y be random variables with values in (X , E) and (Y, K) respectively,
such that (Px )x∈X is the conditional distribution of Y given X. Assume that µ and ν are
σ–finite measures on (X , E) and (Y, K). Assume furthermore that X(P ) has density f with
respect to µ, and that for each x ∈ X the probability Px has density gx with respect to ν, such
that (x, y) 7→ gx (y) is E ⊗ K − B–measurable.
(a) Show that Z
`(y) = gx (y)f (x) dµ(x)

is the density for the marginal distribution of Y with respect to ν.

(b) Show that Y (P )(B0 ) = 1, where B0 = {y ∈ Y : 0 < `(y) < ∞}.

(c) Show that the conditional distribution of X given Y exists and is given by (Qy )y∈Y , where Qy
has density with respect to µ given by

gx (y)f (x)
ky (x) =
`(y)

for y ∈ B0 .

Exercise 1.9 Assume that X is Gamma–distributed with parameters (λ, β) and that the
conditional distribution of Y given X is given by (Px )x∈R , where Px is the Poisson distribution
with parameter x.
(a) Show that the marginal distribution of Y is a negative binomial distribution and find the
parameters.

(b) Show that the conditional distributions of X given Y are Γ–distributions.


Exercises 31

Exercise 1.10 Let X and Y be real valued random variables defined on (Ω, F, P ). Let C ∈ B
be a fixed subset of R. Consider the following game: We are told the value of X, and are based
on this information supposed to guess whether Y ∈ C or not.
It seems natural to expect that we in two different games, where the same value of X is
observed, give the same guess of whether Y ∈ C or not – we know the same in the two
situations. Hence giving a rule for guessing must be the same as indicating a set A: If we observe
X ∈ A then we guess that Y ∈ C, and if we observe X ∈ / A, then we guess that Y ∈ / C.
Obviously, different choices of A may lead to more or less successful guessing rules (we define
a guessing rule to be successful, if it often leads to the right guess...). Let (Px )x∈R be the
conditional distribution of Y given X.
(a) Show that for a given guessing rule, then
Z Z
P (right guess) = Px (C) dX(P )(x) + Px (C c ) dX(P )(x)
A Ac

(b) Show that the optimal guessing rule corresponds to the set

1
A0 = {x ∈ R : Px (C) ≥ }.
2

(c) How is the optimal guessing rule, if X and Y are independent?

(d) How is the optimal guessing rule, if X = Y ?


Exercise 1.11 Let X be a random variable with values in (X , E) that is defined on a probability
space (Ω, F, P ). Let furthermore F ∈ F and consider the random variable 1F .
(a) Find the Markov kernel (Pz )z∈{0,1} that is the conditional distribution of X given 1F .

(b) Find the Markov kernel (Qx )x∈X that is the conditional distribution of 1F given X.
Exercise 1.12 Assume that X is uniformly distributed on (0, 1) and that the conditional
distribution of Y given X = x is a binomial distribution with parameters (n, x) We could say
that Y has a binomial distribution with fixed length n and random probability parameter.
(a) What are the possible values of Y ? Argue that E|Y | < ∞.

(b) Find E(Y | X = x) and E(Y | X).

(c) Find EY .

(d) Find P (Y = k) for all k being a possible value of Y . What is the marginal distribution of Y ?
Exercise 1.13 Let X and Y be random variables with values in (X , E) and (Y, K) respectively.
Assume that (Px ) is the conditional distribution of Y given X. Let
Z
A0 = {x ∈ X | |y| dPx (y) < ∞}

and assume that X(P )(A0 ) = 1. Define


32 Conditional Distributions

Z
φ(x) = 1A0 (x) |y| dPx (y) .

Show that Eφ(X) = E|Y | and conclude that

Eφ(X) < ∞ if and only if E|Y | < ∞.

Exercise 1.14 Assume that X has the exponential distribution with mean 1, and assume that the
conditional distribution of Y given X = x is a Poisson distribution with parameter x. We could
say that Y is Poisson distributed with random parameter.
(a) Use Exercise 1.13 to argue that E|Y | < ∞.

(b) Find E(Y | X = x) and E(Y | X).

(c) Find EY .

(d) Find P (Y = k) for all k being a possible value of Y . What is the marginal distribution of Y ?
Exercise 1.15 Let X and Y be independent random variables that both have the uniform
distribution on (0, 1). Define Z = XY .
(a) Find the conditional distribution of Z given X.

(b) What are the possible values of Z? Argue that E|Z| < ∞.

(c) Find E(Z | X) and use this to find EZ.

(d) Find EZ without using conditional distributions.


Exercise 1.16 Prove Theorem 1.35.
Exercise 1.17 Let A ∈ Od+ be a matrix of a rotation in Rd , i.e. AA> = Id and det(A) = 1. A
random variable U with values in Rd is said to have a uniform distribution on the sphere rSd−1
with radius r if for any such A, V = AU has the same distribution as U , and
P (U/r ∈ Sd−1 ) = 1, where

Sd−1 = {x ∈ Rd : ||x|| = 1}

is the unit sphere in Rd .


(a) Let X ∼ Nd (0, σ 2 Id ) and define U = X/||X||. Show that U is uniform on Sd−1 ;

(b) Use this fact to show that the conditional distribution of X given ||X|| = r is uniform on rSd−1 .
Exercise 1.18 The spherical coordinates of a point x = (x1 , x2 , x3 ) ∈ R3 \ {0} are (ρ, φ, θ)
determined as
x1 = r sin φ cos θ, x2 = r sin φ sin θ, x3 = r cos φ,
where r > 0, φ ∈ [0, π), and θ ∈ [0, 2π). Now let (R, F, T ) denote the spherical coordinates of
X, where X ∼ N3 (0, Id ).
(a) Find the joint density of (R, F, T ) w.r.t. Lebesgue measure on R+ × [0, π) × [0, 2π);

(b) Find the conditional distribution of (F, T ) given R and show that these are independent;
Exercises 33

(c) Deduce that if (F, T ) has density g(φ, θ) = sin φ/(4π) w.r.t. Lebesgue measure on
[0, π) × [0, 2π), then
Y = (sin F cos T, sin F sin T, cos T )
is uniform on S2 .

(d) Find the conditional distribution of T given F = π/2;

(e) Find the conditional distribution of F given T = 0;

(f) Comment on the result, which is closely related to the Borel–Kolmogorov paradox.
Exercise 1.19 Assume that Y1 , Y2 , . . . is a sequence of independent and identically distributed
random variables such that E|Y1 | < ∞. Assume that N is a random variables with values in N
such that EN < ∞. Assume that N and (Y1 , Y2 , . . .) are independent (we consider
(Y1 , Y2 , . . .) as a random variable with values in (R∞ , B∞ )). Define the random variable Y by

N
X
Y = Yk
k=1

(a) Show that the conditional distribution (Pn )n∈N of Y given N is determined such that Pn is the
distribution of n
P
k=1 Y k . Argue similarly that the conditional distribution (Qn )n∈N of
PN
such that Qn is the distribution of n
P
k=1 |Yk | given N is determined k=1 |Yk |.

(b) Show that Z


|y| dQn (y) = nE|Y1 |

for all n ∈ N.

(c) Use (2) and Exercise 1.13 to obtain that

N
!
X
E |Yk | = EN E|Y1 | < ∞
k=1

(d) Show that E(Y | N = n) = nEY1 and that EY = EN EY1 .


Exercise 1.20 Let X and Z be independent and exponentially distributed with expectation
EX = EZ = 1 and define
Y = φ(X, Z) = min(X, Z).
a) Show that also Y is exponentially distributed and find EY ;

b) Show that the conditional distribution of Y given X = x is given by the Markov kernel
Px , x > 0 where (
1 − e−y if y < x
Px (Y ≤ y) = .
1 if y ≥ x

c) Identify the joint distribution of (X, Y ), for example by specifying its joint distribution function.

d) Find the conditional distribution of X given Y = y.


34 Conditional Distributions

Exercise 1.21 Let f and g be densities for distributions on [0, ∞). Assume that there exists a
constant c > 0 such that
f (x) ≤ cg(x) for all x ∈ [0, ∞)
Think of a situation where we want to simulate random variables with a distribution that has
density f , but where f is so complicated that this is not straightforward to do directly. Suppose
on the other hand that g is a simple well–known density that we actually can simulate from. An
algorithm to produce a random variable X with density f is the acceptance–rejection algorithm:
(i) Generate Y with density g and U uniform on (0, 1) such that Y ⊥
⊥U

(ii) If U ≤ f (Y )/(cg(Y )), let X = Y . Otherwise return to (i)


The idea of this exercise is to show that X generated in the algorithm above actually has density
f.
So let Y have density g and let U be uniform on (0, 1). Assume that Y and U are independent.
Define the random variable ( f (Y )
1 , U ≤ cg(Y )
Z= f (Y )
0 , U > cg(Y )

(a) Show that P (Z = 1) = 1c .


R
(b) Show that P (Y ∈ B | Z = 1) = B
f (x) dx for all B ∈ B.

(c) Conclude that the algorithm produces a variable X with density f , and discuss which value of c
we should choose.
Exercise 1.22 Think of a situation where we want to estimate the value z that is given by

z = EZ

for some real valued random variable Z with EZ 2 < ∞. Let Z1 , Z2 , . . . , Zn be independent
replications of Z. Then
n
1X
ẑn1 = Zk
n
k=1

is an estimator for z.
(a) Show that ẑn1 is unbiased
E ẑn1 = z
and find the variance V ẑn1 .
A method to improve the estimator could be finding some random variable X and consider the
new variable E(Z | X). Now let (Z1 , X1 ), . . . , (Zn , Xn ) be independent replications of
(Z, X), and define the estimator
n
1X
ẑn2 = E(Zk | Xk )
n
k=1

(b) Show that ẑn2 is unbiased and that


V ẑn2 ≤ V ẑn1
Exercises 35

Apparently this method will improve the estimator no matter which variable X we choose. But
of course some choices may be more clever than others.

(c) What happens, if we use X = 1 (or some other constant), and why is this a bad idea anyway?

We will consider two specific examples of variables Z. In both examples we shall just let n = 1,
since increasing values of n simply makes both variances smaller by a factor 1/n, and thereby
does not change anything in the comparison.
In the first example we shall find estimators for the very well–known value π (although we
already know π much more accurately than we will ever be able to estimate, the example serves
as a very good illustration of what is going on). Let

Z = 4 · 1(U 2 +U 2 ≤1) ,
1 2

where U1 and U2 are independent and both uniform on (0, 1). Define the first estimator ẑ1 = Z.
(d) Show that E ẑ1 = π.
Define the estimator ẑ2 by
ẑ2 = E(Z | U1 )
p
(e) Show that ẑ2 = 4 1 − U12 .

(f) Try to simulate 10000 replications of both ẑ1 and ẑ2 . Compare the variances – and also compare
with the theoretical variance of ẑ1 .
In the next example, the estimation has some real practical use. Assume that X1 and X2 are
independent and has a distribution ν. Assume that X1 , X2 ≥ 0 and that ν has density f with
respect to the Lebesgue measure. Furthermore think of a situation, where the distribution of
S = X1 + X2 is complicated to calculate. We are interested in estimating

z(s) = P (S > x)

especially for large values of x.


The simple estimator will in this framework be

ẑ1 (x) = 1(X1 +X2 >x)

The problem is, that if x is very large, then it is very rare that this estimator is non–zero. Even if
we make many replications. Instead we shall try to construct an estimator using conditional
expectations.
Firstly, we try something similar to above. Define

ẑ2 (x) = P (S > x | X1 )

(g) Show that


ẑ2 (x) = F̄ (x − X1 ) ,
where F̄ is the survival function for ν:

F̄ (x) = ν((x, ∞)) .


36 Conditional Distributions

Let
X(1) = min{X1 , X2 } and X(2) = max{X1 , X2 }
(h) Show that the conditional distribution of X(2) given X(1) is determined by the Markov kernel
(Py )y≥0 , where
ν(B ∩ (y, ∞))
Py (B) = .
ν((y, ∞))

We now define a conditional estimator by

ẑ3 (x) = P (S > x | X(1) )

(i) Show that 


F̄ max{x − X(1) , X(1) }
ẑ3 (x) = ,
F̄ (X(1) )

Now assume that ν is the Weibull distribution with shape parameter 0.5. Then the density f is
given by
0.5
0.5x−0.5 e−x
for x > 0. And F̄ is
0.5
F̄ (x) = e−x
(j) Simulate 10000 replications of the three estimators (with e.g. x = 20 and x = 50) and compare
the variances.
Exercise 1.23 Let X be a real valued random variable with E|X| < ∞.
(a) Show that the conditional distribution of X given X is given by the Markov kernel (δx )x∈X ,
where δx is the Dirac Measure in x:

1, x ∈ B
δx (B) =
0, x ∈
/B

(b) Show that E(X | X = x) = x and E(X | X) = X.

(c) Assume that Y is another real valued random variable with E|Y | < ∞ and E|XY | < ∞. Show
that E(XY | X = x) = xE(Y | X = x) and E(XY | X) = XE(Y | X).
Exercise 1.24 Let W be the set (0, 1)2 . Assume that we generate N points in W in the
following way: Let N be Poisson distributed with parameter λ and
(U11 , U12 ), (U21 , U22 ), . . . , (UN
1 2
, UN ) be independent and identically distributed such that Uk1 and
Uk are independent and uniformly distributed on (0, 1). This makes each (Uk1 , Uk2 ) uniformly
2

distributed on W .
In this exercise we will show that the collection of points (U11 , U12 ), . . . , (UN 1 2
, UN ) in W is a
Poisson process on W : Define for a subset A ⊆ W the random variable N (A) to be the number
of points in A:
XN
N (A) = 1(U k ,U k )∈A) .
1 2
k=1

Then
Exercises 37

(i) N (A) is Poisson distributed with parameter λm2 (A), where m2 (A) is the area (2–dimensional
Lebesgue measure) of A.

(ii) For disjoint sets A1 , . . . , Am the variables N (A1 ), . . . , N (Am ) are independent.
The result will follow by finding conditional distributions given N
(a) Show that for U1 and U2 independent and uniformly distributed on (0, 1) and A some subset of
W , then
P ((U1 , U2 ) ∈ A) = m2 (A)

(b) Let A1 , . . . , Am be disjoint subsets of W such that m


S
j=1 Aj = W . Argue that the conditional
distribution of (N (A1 ), . . . , N (Am )) given N = n is a polynomial distribution with length n
and probability parameters (m2 (A1 ), . . . , m2 (Am )).

(c) Show that N (A1 ), . . . , N (Am ) are independent and that each N (Aj ) is Poisson distributed
with parameter λm2 (Aj ).
Now assume that k : W → [0, 1] is a measurable function that is bounded by 1. Define for each
subset A of W the number
Z
K(A) = k(x, y) m2 (dx, dy)
A

(d) Give a suggestion for how to obtain a collection of points (V11 , V12 ), . . . , (VM
1 2
, VM ) in W , such
that for each subset A of W we have that the number of points in A

M
X
M (A) = 1((V 1 ,V 2 )∈A)
j j
k=1

is Poisson distributed with parameter λK(A).


Exercise 1.25 Assume that (X, Y ) is a real valued random vector, such that E|Y | < ∞.
Assume that the random vector (X, Ỹ ) has the same distribution as (X, Y ), where Ỹ is another
real valued random variable.
(a) Show that E(Y | X) = E(Ỹ | X) a.s.
Now assume that X1 , . . . , Xn are independent and identically distributed with E|X1 | < ∞.
Define Sn = X1 + · · · + Xn .
(b) Argue that (X1 , Sn ) has the same distribution as (Xk , Sn ) for all k = 1, . . . , n.

(c) Show that E(X1 | Sn ) = Sn /n.


38 Conditional Distributions
2
CONDITIONAL INDEPENDENCE

In this chapter we will work on a general probability space (Ω, F, P ). All events
occurring will silently be assumed to be F-measurable, all σ-algebras occurring will
silently be assumed to be subalgebras of F, and all random variables
X : (Ω, F) → (X , E) will silently be assumed to be F − E measurable. The general
convention is that random variables with names like X or Xi or variations thereof have
values in a generic space (X , E), unless it is explicitly stated that they are real valued
(or integer valued or whatever). Similarly, variables with names like Y or Z will have
values in (Y, K) and (Z, G) respectively.
Recall that (X , E) is a Borel space if it is in bijective, bimeasurable correspondence
with (R, B) or a subspace of this. Such a correspondence enables us to replace X with
R, whenever there is an advantage in that. It turns out that every sensible space has this
property, unless it its very, very huge (non-separable metric spaces, with the σ-algebra
generated by the open sets, say). The above generic X , Y and Z-spaces are always
assumed to be Borel spaces.

2.1 Conditional probabilities given a σ–algebra


We recall that the conditional expectation E(Y | H) of a real valued random variable Y
with E|Y | < ∞ given a σ-algebra H is any H-measurable and integrable random
variable satisfying
Z Z
E(Y | H) dP = Y dP for all H ∈ H . (2.1)
H H

as defined in Definition 1.32.


As we have considered conditional expectations given a σ-algebra, we shall also be
concerned with the conditional probability given a σ-algebra. This is defined by taking
conditional expectation of the indicator function 1A , that is

P (A | H) = E(1A | H) .

The integrability condition (2.1) will in this case take the form
Z
P (A | H) dP = P (A ∩ H) for all H ∈ H . (2.2)
H

We will make frequent use of the monotonicity property of conditional expectations


that ensure
0 ≤ P (A | H) ≤ 1 a.s.
40 Conditional independence

and even that


A⊆B ⇒ P (A | H) ≤ P (B | H) a.s
Furthermore, the double conditioning theorem (Theorem 1.35) says in this context that
 
E P (A | H) | G = P (A | G) a.s

whenever the two σ-algebras G and H satisfies that G ⊆ H.

2.2 Conditionally independent events


Definition 2.1 Two events A and B are are conditionally independent given a
σ-algebra H, if
P (A ∩ B | H) = P (A | H) P (B | H) a.s. (2.3)
Symbolically, we will write A ⊥
⊥ B | H if (2.3) is satisfied.
Speaking colloquially, we will frequently say that A and B are independent given H
if (2.3) is satisfied - repeated use of the word conditionally makes the sentences sound
tedious.
Please note that conditional independence represents an intricate relation between the
two events and the σ-algebra. The σ-algebra H is really an integral part of the
definition. Whether A and B are conditionally independent or not, depends crucially
on which σ-algebra we use for conditioning.
If H ⊆ G are two σ-algebras, it is completely possible that two events A and B are
independent given H, while they are not independent given the finer σ-algebra G. But
it is equally possible that A and B are independent given G, while they are not
independent given the coarser σ-algebra H, see Example 2.3 below. Changing the
σ-algebra on which we are conditioning is usually a very challenging task.
Example 2.2 Recall that a σ-algebra H is a trivial if every event in H has probability 0
or 1. The most obvious trivial σ-algebra is
H = {∅, Ω} ,
but there are plenty of other trivial algebras arising all over probability theory - tail
algebras, symmetric algebras, invariant σ-algebras in ergodic theory and what not. If H
is trivial, we observe that
P (A | H) = P (A) a.s.
for any event A, since the relation
Z
P (A) dP = P (A ∩ H) ,
H

is satisfied for all H-sets H, both those of probability 0 (where there is nothing to
prove) and those of probability 1 (where there is also nothing to prove). Hence (2.3)
translates to
P (A ∩ B) = P (A) P (B) . (2.4)
A priori the formula has an a.s.-qualifier, but as it is a relation between deterministic
numbers, it is either true or false, with no probability involved.
Conditionally independent events 41

Hence we see that conditional independence of two events given a trivial σ-algebra is
simply classical independence of the events. 2

Example 2.3 If C is yet another event, and if H is the σ-algebra generated by that
event,
H = {∅, C, C c , Ω} ,

then it is readily checked that

P (A ∩ C)



 P (C)
 on C
P (A | H) = a.s
 P (A ∩ C c )
on C c



P (C c )

for any event A. If we suppose that H is non-trivial, meaning that P (C) ∈ (0, 1), we
see that (2.3) translates to the two conditions

P (A ∩ B ∩ C) P (A ∩ C) P (B ∩ C)
= ,
P (C) P (C) P (C)

P (A ∩ B ∩ C c ) P (A ∩ C c ) P (B ∩ C c )
c
= .
P (C ) P (C c ) P (C c )

These two conditions cannot be deduced from each other, and they are not related to
(2.4). For instance, the probability table

C Cc
c
B B B Bc
2 1 2 4
A 18 18 A 18 18
4 2 1 2
Ac 18 18 Ac 18 18

corresponds to a situation where A ⊥⊥ B | H but where A and B are dependent, as can


readily be checked.
On the other hand, the probability table

C Cc
c
B B B Bc
1 2 2 1
A 12 12 A 12 12
2 1 1 2
Ac 12 12 Ac 12 12

corresponds to a situation where A and B are independent, but where they are not
independent given H. 2
42 Conditional independence

Example 2.4 If we have a finite partition D of Ω,

D = {D1 , . . . , Dn }

where the atoms of D (the Di -sets) are pairwise disjoint and unite to the whole of Ω,
the σ-algebra generated by D is the family of all unions,
( )
[
H= Di | I ⊆ {1, . . . , n} .
i∈I

If we let
D∗ = {D ∈ D | P (D) > 0} ,
it is easily checked that
X P (A ∩ D)
P (A | H) = 1D a.s.

P (D)
D∈D

for any event A. In this setting, condition (2.3) translates into

P (A ∩ B ∩ D) P (A ∩ D) P (B ∩ D)
= for all D ∈ D∗ .
P (D) P (D) P (D)

Again, whether this holds or not is very sensitive to the specific atoms. If an atom is
divided into two, there is no telling if A and B are independent on each of the two
subatoms, just because we know if they are independent on the original atom. And
similarly, if two atoms are coalesced, we may loose or create conditional
independence, as the case may be. 2

2.3 Conditionally independent σ-algebras


Definition 2.5 Two classes of events, A and B, are conditionally independent given a
σ-algebra H if
A⊥ ⊥ B |H for all A ∈ A, B ∈ B . (2.5)
Symbolically, we will write A ⊥
⊥ B | H if (2.5) is satisfied.
We will almost exclusively use this concept in situations where the two classes of
events are σ-algebras, but it is nice to be allowed to formulate things in a slightly
broader fashion. We may for instance see that it typically is enough to check (2.5) on
two generators of the σ-algebras under consideration:
Lemma 2.6 Let A and B be two classes of events, both stable under formation of
intersections. Then

A⊥
⊥ B|H ⇒ σ(A) ⊥⊥ σ(B) | H .
Conditionally independent σ-algebras 43

Proof A prototypical application of Dynkin’s lemma. For each set F ∈ F we consider


the class
CF = {E ∈ F | F ⊥⊥ E | H} ,
and we observe that this is a Dynkin class. If we take A ∈ A, we know that B ⊆ CA .
Using Dynkins lemma, we see that σ(B) ⊆ CA . On the other hand, conditional
independence of two events is a property that is symmetric in the two events, so we can
reformulate this fact as A ⊆ CB for any set B ∈ σ(B). Using Dynkin’s lemma again
establishes that σ(A) ⊆ CB for any set B ∈ σ(B). And though this may look
awkward, it is in fact the property we are after. 2
Conditional independence of classes of events is of course just as sensitive to the exact
choice of the σ-algebra on which we are conditioning, as conditional independence of
events were. In fact, if
A = {∅, A, Ac , Ω} , B = {∅, B, B c , Ω} ,
then A ⊥⊥ B | H if and only if A ⊥ ⊥ B | H, as is readily seen from Lemma 2.6. So the
counterexamples to any kind of simple behaviour under change of the conditioning
algebra given in section 2.2 also apply in this setting.
Example 2.7 Assume that H is a trivial σ–algebra. Then we saw in Example 2.2 that
two sets A and B are conditionally independent given H, if and only if they are truly
independent. This translates directly into conditional independence of classes of
events: If H is trivial, then any two classes A and B satisfies
A⊥
⊥ B|H ⇔ A ⊥⊥ B
Assume conversely that H = F. Then for all F ∈ F we have
P (F | F) = 1F a.s. ,
since 1F is F–measurable. Hence it is seen that for any choice of A and B we have
with A ∈ A and B ∈ B that
P (A | F)P (B | F) = 1A · 1B = 1A∩B = P (A ∩ B | F) a.s. ,
so we conclude that A and B are always conditionally independent given F. 2
Example 2.8 Assume that A, B and H are independent. Then with A ∈ A we observe
P (A | H) = P (A) a.s.
since for H ∈ H the relation
Z
P (A) dP = P (A)P (H) = P (A ∩ H)
H

is satisfied. Then – using the independence between A and B – we obtain


P (A | H)P (B | H) = P (A) · P (B) = P (A ∩ B) = P (A ∩ B | H) a.s. .
In the last equality we used that A ∩ B ⊥⊥ H since both A and B are independent of H.
We conclude that A and B are independent given H as well. 2
44 Conditional independence

Theorem 2.9 Let A, B and H be three σ-algebras. Suppose that A ⊥⊥ B | H. If X is an


A-measurable real valued random variable, and if Y is a B-measurable real valued
random variable, such that E|X| < ∞, E|Y | < ∞ and E|XY | < ∞, then it holds
that
E(XY | H) = E(X | H) E(Y | H) a.s.

Proof A prototypical extension result. We know the theorem to be true for indicator
variables. Hence it is true for simple variables. The monotone convergence theorem for
conditional expectations will show it is true for non-negative variables, and a final
handwaving will dismiss the problems of positive and negative parts. 2
Conditional independence is by its very definition symmetric in the two events, or
more general, in the two classes of events. Rather surprisingly, it turns out that the
most fruitful way of working with the concept is through an asymmetric formulation:
Theorem 2.10 Let A, B and H be σ-algebras. It holds that A ⊥⊥ B | H if and only if

P (A | B ∨ H) = P (A | H) a.s (2.6)

for every event A ∈ A.


In the theorem B ∨ H denotes the smallest σ–algebra that contains both B and H. This
σ–algebra must be generated by the ∩–stable generating system given by

{B ∩ H : B ∈ B, H ∈ H}

Proof Notice that for any three events A ∈ A, B ∈ B and H ∈ H we have that
Z Z Z  
P (A | H) dP = 1B P (A | H) dP = E 1B P (A | H) | H dP
B∩H
ZH H

= P (A | H) P (B | H) dP. (2.7)
H

In the second equality we have used the integration property from the definition of
conditional expectations. In the third equality we have used that if X is H–measurable,
then E(XY | H) = XE(Y | H) (we also exploit that for indicator functions we
trivially have E|X| < ∞, E|Y | < ∞ and E|XY | < ∞ so the conditional
expectations are well defined).
Suppose that A and B are conditionally independent given H. Then we can work the
above line of equations one step further to see that
Z Z
P (A | H) dP = P (A ∩ B | H) dP = P (A ∩ B ∩ H) .
B∩H H

Since the events of the form B ∩ H is a generator for the σ-algebra B ∨ H that is stable
under formation of intersections, and as P (A | H) is H-measurable, and thereby in
Conditionally independent σ-algebras 45

particular B ∨ H–measurable, we conclude that P (A | H) indeed does satisfy all


conditions for being the conditional probability of A given B ∨ H. And hence (2.6)
holds.
For the opposite implication, we may utilise (2.6) on the starting end of (2.7), and
obtain that
Z Z
P (A | H) P (B | H) dP = P (A | B ∨ H) dP = P (A ∩ B ∩ H) .
H H∩B

As P (A | H) P (B | H) is indeed H-measurable, we see that it satisfies all conditions


for being the conditional probability of A ∩ B given H. And hence A and B are
conditionally independent given H. 2
The asymmetric condition (2.6) is usually paraphrased by saying that there is no extra
information in B for making predictions on the occurrence of an A-set, when we
already have access to the information in H. All the information in B, useful for that
prediction, is already contained in H. The symmetry between A and B is not clearly
visible here, but somehow it is still there.
In many cases, it is an advantage to use a slightly simplified version of Theorem 2.10,
saying that A ⊥⊥ B | H if and only if P (A | B ∨ H) is H-measurable. More formally, we
have the following corollary:
Corollary 2.11 Let (Ω, F, P ) be a probability space and A, B, and H sub-σ-algebras
of F. Then A ⊥
⊥ B | H if and only if for any A ∈ A there is a H-measurable random
variable ZA so that

P (A | B ∨ H) = ZA P -almost surely. (2.8)

Proof If A ⊥
⊥ B | H, we have from Theorem 2.10 that

P (A | B ∨ H) = P (A | H)

almost surely and hence we can let ZA = P (A | H). Conversely, if (2.8) holds, we
have for any H ∈ H ⊆ (B ∨ H) that

P (A ∩ H) = E(1H 1A ) = E{1H P (A | B ∨ H)} = E(1H ZA )

so ZA is a version of P (A | H). Theorem 2.10 now yields that A ⊥⊥ B | H. 2


Further, the statement in Theorem 2.10 can of course be extended to random variables:
Corollary 2.12 Let A, B and H be σ-algebras. If A ⊥⊥ B | H then it holds for any
A-measurable real random variable X such that E|X| < ∞ that

E(X | B ∨ H) = E(X | H) a.s (2.9)

Proof Follows from Theorem 2.10 by the same extension technique, that was used to
prove Theorem 2.9. 2
46 Conditional independence

Example 2.13 Assume that A and H are σ–algebras. We clearly have H ∨ H = H,


such that
P (A | H ∨ H) = P (A | H)
Then it follows that A ⊥
⊥ H | H. The same argument applies to deduce that A ⊥⊥ B | H
whenever B ⊆ H. 2
In many cases we have σ-algebras generated by random variables. We will make no
distinction between the random variable X and the σ-algebra σ(X) generated by X,
and we will write things like

X⊥
⊥ Y |Z instead of σ(X) ⊥⊥ σ(Y ) | σ(Z)

without notification.

2.4 Combination of Markov kernels


Let (X , E), (Y, K), (Z, G) be measurable spaces and consider Markov kernels P and
Q, where P is a Markov kernel from X to Y, and Q a Markov kernel from Y to Z.
Definition 2.14 The combination P ~ Q of the Markov kernels P and Q is a Markov
kernel from X to Y × Z determined as
Z
(P ~ Q)x (B × C) = Qy (C) dPx (y) (2.10)
B

for A ∈ E, B ∈ K, C ∈ G.
In other words, (P ~ Q)x is the integration of Q w.r.t. Px . If µ is a probability measure
on X , we may think of µ as a Markov kernel from {0} to X and write the integration λ
of P w.r.t. µ as a combination in this sense
Z
λ(A × B) = Px (B) dµ(x) = (µ ~ P )(A × B).
A

If Y = Y1 × Y2 and Q is a Markov kernel from Y2 to Z, Q can always be extended to


a Markov kernel Q̃ from Y to Z as

Q̃y = Q̃(y1 ,y2 ) = Qy2 .

We shall in the following not distinguish between Q and its extension Q̃.

Consider now Markov kernels P and Q as above, and further, a Markov kernel R from
Z to W. We then have
Proposition 2.15 Combination of Markov kernels is associative

(P ~ Q) ~ R = P ~ (Q ~ R)

where Markov kernels are extended whenever appropriate.


Combination of Markov kernels 47

Proof This is a direct consequence of the extended Tonelli’s Theorem 1.11. From
(2.10) we get
Z
{(P ~ Q) ~ R}x (B × C × D) = Rz (D) d(P ~ Q)x (y, z)
ZB×C
Z
= Rz (D) dQy (z) dPx (y)
ZB C
= (Q ~ R)y (C × D) dPx (y)
B
= {P ~ (Q ~ R)}x (B × C × D)

as desired. 2

Corollary 2.16 If in Proposition 2.15 X = {0} and P = µ is a probability measure


on Y, we have
λ = (µ ~ Q) ~ R = µ ~ (Q ~ R)

and further, if λ represents the joint distribution of random variables (Y, Z, W ) it


holds that W ⊥ ⊥λ Y | Z.

Proof The conditional independence statement follows from Theorem 1.30 since then
R̃(y,z) = Rz — which represents the conditional distribution of W given (Y, Z) —
depends on Z only. 2

Suppose now that P is a Markov kernel from X to Y and Q a Markov kernel from X
to Z. We can then extend P and Q to be Markov kernels P̃ and Q̃ from X × Y and
X × Z and hence combine them in both directions as P ~ Q̃ or Q ~ P̃ . And, in fact,
these two combinations are identical:
Proposition 2.17 If P is a Markov kernel from X to Y and Q a Markov kernel from X
to Z the combination of these Markov kernels is commutative and equal to the product
Markov kernel:
(P ~ Q)x = (Q ~ P )x = Px ⊗ Qx .

Further, for any probability measure µ on X we then have Y ⊥⊥λ X | Z where


λ = µ ~ P ~ Q = µ ~ Q ~ P represents the joint distribution of (X, Y, Z).

Proof We have
Z
(P ~ Q)x (B × C) = Q̃(x,y) (C) dPx (y)
B
Z
= Qx (C) dPx (y) = Px (B)Qx (C)
B

which establishes that (P ~ Q)x = (Q ~ P )x = Px ⊗ Qx . The final statement follows


from Corollary 2.16. 2
48 Conditional independence

2.5 Conditional independence revisited


It is convenient to collect the most fundamental properties of conditional independence
in a single theorem.
Theorem 2.18 Let (Ω, F, P ) be a probability space and A, B, C, and D
sub-σ-algebras of F. Then the following properties hold
(A1) A⊥ ⊥ B | C =⇒ B ⊥ ⊥ A | C (symmetry);
(A2) (A ⊥
⊥ B | C) ∧ D ⊆ B =⇒ A ⊥⊥ D | C (reduction);
(A3) A⊥ ⊥ (B ∨ C) | D =⇒ A ⊥ ⊥ B | (C ∨ D) (weak union);
(A4) (A ⊥
⊥ C | B) ∧ (A ⊥⊥ D | B ∨ C) =⇒ A ⊥⊥ (C ∨ D) | B (contraction);
(A5) (A ⊥
⊥ B | C) ∧ (A ⊥⊥ C | B) =⇒ A ⊥⊥ (B ∨ C) | B ∩ C (intersection);
Proof The symmetry in (A1) is trivial from Definition 2.5.
Reduction (A2) is also immediate as D represents fewer events than B.
To establish weak union, note that if A ⊥⊥ (B ∨ C) | D we have from Theorem 2.10 that

P (A | B ∨ C ∨ D) = P (A | D),

where we have also used that ∨ is associative. Since P (A | D) is D-measurable it is


also C ∨ D-measurable and thus

P (A | B ∨ C ∨ D) = P (A | C ∨ D).

Now use Theorem 2.10 again to conclude that A ⊥⊥ B | (C ∨ D).


For contraction (A4) we get

P (A | B ∨ C ∨ D) = P (A | B ∨ C) = P (A | B)

where we have used Theorem 2.10 in one direction twice. Using it in the other
direction gives
A ⊥⊥ (C ∨ D) | B.
For the intersection (A5) we get

P (A | B ∨ C) = P (A | B) = P (A | C)

where all equalities hold almost surely. Thus P (A | B ∨ C) is almost surely equal to an
A measurable function and almost surely equal to a B measurable function. Hence, by
Lemma A.11, P (A | B ∨ C) is almost surely equal to an B ∩ C-measurable function
and therefore
P (A | B ∨ C) = P (A | B ∩ C)
whereby A ⊥
⊥ (B ∨ C) | B ∩ C. Using Corollary 2.11 completes the proof. 2
Note that if we do not supplement A and B with the σ-ideal of null sets IP , the
corresponding variant of (A5) is not true in general. This is illustrated in the following
example.
Conditional independence revisited 49

Example 2.19 Let Ω = {0, 1}3 and F be the σ-algebra of all subsets of Ω. Define P as
p111 = p000 = 1/2
so that all six other atoms in F have probability zero.
Let Ai = σ(Xi ), i = 1, 2, 3, i.e. the σ-algebras generated by coordinate projections. It
then holds that
A1 ⊥ ⊥ A2 | A3 and A1 ⊥⊥ A3 | A2 .
But A2 ∩ A3 = {∅, Ω} so it is not true that A1 ⊥⊥ (A2 ∨ A3 ) | A2 ∩ A3 . However, from
(A5) we get
A1 ⊥⊥ A2 ∨ A3 | A2 ∩ A3 .
Indeed in this example we have A2 ∩ A3 = F since I consists of all subsets of the six
atoms with probability zero. Hence the last conditional independence is really an
uninteresting tautology. 2
Translating Theorem 2.18 to random variables, we get the following:
Corollary 2.20 Let (Ω, F, P ) be a probability space and X, Y , Z, W random
variables on Ω. Then the following properties hold.
(C1) X ⊥ ⊥ Y | Z =⇒ Y ⊥ ⊥ X | Z (symmetry);
(C2) (X ⊥ ⊥ Y | Z) ∧ (W = φ(Y )) =⇒ X ⊥⊥ W | Z (reduction);
(C3) X ⊥ ⊥ (Y, Z) | W =⇒ X ⊥ ⊥ Y | (Z, W ) (weak union);
(C4) (X ⊥ ⊥ Z | Y ) ∧ (X ⊥⊥ W | (Y, Z)) =⇒ X ⊥⊥ (Z, W ) | Y (contraction);
Proof This follows directly from the definition and Theorem 2.18 by realizing that,
for example, W = φ(Y ) =⇒ σ(W ) ⊆ σ(Y ). 2
When X, Y , and Z are discrete random variables the condition for X ⊥⊥ Y | Z
simplifies as
P (X = x, Y = y | Z = z) = P (X = x | Z = z)P (Y = y | Z = z),
where the equation holds for all z with P (Z = z) > 0. When the three variables admit
a joint density with respect to a product measure µ, we have
Proposition 2.21 Assume that the joint distribution of (X, Y, Z) has density w.r.t. a
σ-finite product measure µ on X × Y × Z. Then we have:
X⊥
⊥ Y | Z ⇐⇒ f (x, y | z) = f (x | z)f (y | z), (2.11)
X⊥
⊥ Y | Z ⇐⇒ f (x, y, z)f (z) = f (x, z)f (y, z), (2.12)
X⊥
⊥ Y | Z ⇐⇒ f (x, y, z) = f (x, z)f (y, z)/f (z) (2.13)
X⊥
⊥ Y | Z ⇐⇒ f (x | y, z) = f (x | z) (2.14)
X⊥
⊥ Y | Z ⇐⇒ f (x, z | y) = f (x | z)f (z | y) (2.15)
X⊥
⊥ Y | Z ⇐⇒ f (x, y, z) = h(x, z)k(y, z) for some h, k (2.16)
X⊥
⊥ Y | Z ⇐⇒ f (x, y, z) = f (x | z)f (y, z). (2.17)
where these equations hold almost surely with respect to P and we have used f as a
generic symbol for the densities involved.
50 Conditional independence

Proof The proof is Exercise 2.5. 2


Another property of the conditional independence relation is often used:
(C5) if X ⊥
⊥ Y | Z and X ⊥
⊥ Z | Y then X ⊥
⊥ (Y, Z).
However (C5) does not hold universally, but only under additional conditions —
essentially that there be no non-trivial logical relationship between Y and Z or,
formally, σ(Y ) ∩ σ(Z) is trivial.
Proposition 2.22 If the joint density of all variables with respect to a product measure
is positive then the statement (C5) will hold true.

Proof Assume that the variables have density f (x, y, z) > 0 and that X ⊥⊥ Y | Z as
well as X ⊥
⊥ Z | Y . Then (2.16) gives for almost all values of (x, y, z) that

f (x, y, z) = k(x, z)l(y, z) = g(x, y)h(y, z) (2.18)

for suitable strictly positive functions g, h, k, l. Thus we have that for almost all
(x, y, z) that
k(x, z)l(y, z)
g(x, y) = . (2.19)
h(y, z)

Choosing a fixed z = z0 we have g(x, y) = π(x)ρ(y) where π(x) = k(x, z0 ) and


ρ(y) = l(y, z0 )/h(y, z0 ). Thus f (x, y, z) = π(x)ρ(y)h(y, z) and hence X ⊥⊥ (Y, Z)
as desired. 2
Generally, the following modification of (C5) holds
(C5*) if X ⊥
⊥ Y | Z and X ⊥
⊥ Z | Y then X ⊥
⊥ (Y, Z) | H,
where H = h(Y, Z) represents the information which is common to (Y, Z) so that
σ(H) = σ(X) ∩ σ(Y ), see Theorem 2.18.

It is illuminating to consider the special case when all state spaces are discrete. Define
the bipartite graph G + with vertex set V = Y ∪ Z by letting

y ∼+ z ⇐⇒ f (y, z) > 0.

The common information H above is simply indicating the connectivity component of


Y (or Z) in this graph. Hence we have the following necessary and sufficient condition
for (C5):
Proposition 2.23 Assume that all state spaces are discrete and let G + be defined as
above. Then (C5) holds for all discrete random variables X if and only if G + is
connected.

Proof If G + is not connected, we can let X = H denote the connectivity component


of Y (or Z); then, conditionally on Y or Z, X has a degenerate distribution and hence
X⊥ ⊥ Y | Z and X ⊥ ⊥ Z | Y ; but X = H is certainly not independent of (Y, Z).
Conditional independence revisited 51

If G + is connected — and H therefore is trivial — we first get from (2.18) that the
marginal distribution of Y and Z satisfies

f (y, z) = k̄(z)l(y, z) = ḡ(y)h(y, z)


P P
where k̄(z) = x k(x, z) and ḡ(y) = x g(x, y). Hence, if f (y, z) > 0 we have
k̄(z) > 0, ḡ(y) > 0, and l(y, z)/h(y, z) = ḡ(y)/k̄(z). Thus from (2.19) we have

g(x, y) = k(x, z)ḡ(y)/k̄(z). (2.20)

Next, choose a fixed y ∗ ∈ Y and let (y ∗ = y1 , z1 , y2 . . . , zn , yn = y) be a path in G +


from y ∗ to an arbitrary y ∈ Y; such a path exists because G + is connected. Then, since
f (y1 , z1 ) > 0 and f (y2 , z1 ) > 0, we get from (2.20)

g(x, y1 ) = k(x, z1 )ḡ(y1 )/k̄(z1 ) and g(x, y2 ) = k(x, z1 )ḡ(y2 )/k̄(z1 );

hence we find
g(x, y2 ) = g(x, y1 )ḡ(y2 )/ḡ(y1 ).
Proceeding in the same way with y2 , z2 , and y3 yields

g(x, y3 ) = g(x, y2 )ḡ(y3 )/ḡ(y2 ) = g(x, y1 )ḡ(y3 )/ḡ(y1 )

and if we continue this along the path we get for an arbitrary y that

g(x, y) = g(x, y ∗ )ḡ(y)/ḡ(y ∗ ).

We can now let π(x) = g(x, y ∗ ) and ρ(y) = ḡ(y)/ḡ(y ∗ ) and proceed as in the proof of
Proposition 2.22. 2
Note in particular that the proof of Proposition 2.23 effectively establishes (C5*) in the
discrete case.

2.5.1 Independence models


It is illuminating to think of the properties (C1)–(C5) as purely formal expressions,
with a meaning that is not necessarily tied to probability. If we interpret the symbols
used for random variables as abstract symbols for pieces of knowledge obtained from,
say, reading books, and further interpret the symbolic expression X ⊥⊥ Y | Z as:
Knowing Z, reading Y is irrelevant for reading X,
the properties (C1)–(C4) translate to the following:
(I1) if, knowing Z, reading Y is irrelevant for reading X, then so is reading X for
reading Y ;
(I2) if, knowing Z, reading Y is irrelevant for reading the book X, then reading any
chapter U of Y is irrelevant for reading X;
(I3) if, knowing Z, reading both of Y and W is irrelevant for reading the book X,
reading Y remains irrelevant after having also read W ;
52 Conditional independence

(I4) if, knowing Y , reading the book Z is irrelevant for reading X and even after
having also read Z, reading W is irrelevant for reading X, then reading both of
Z and W is irrelevant for reading X.
Thus one can view the relations (A1)–(A4) as pure formal properties of the notion of
irrelevance. The property (A5) is slightly more subtle. In a certain sense, also the
symmetry (A1) is a somewhat special property of probabilistic conditional
independence, rather than general irrelevance.
It is thus tempting to use the relations such as these as formal axioms for conditional
independence or irrelevance. Indeed, it was conjectured (Pearl, 1988) that the
properties (C1)–(C4) were sound and complete axioms for probabilistic conditional
independence. However, the completeness fails. In fact, finite axiomatization of
probabilistic conditional independence is not possible (Studený, 1992).

Let V be a finite set. An independence model ⊥σ over V is a ternary relation over


subsets of a finite set V . The independence model is a semi-graphoid if it holds for all
mutually disjoint subsets A, B, C, D:
(S1) if A ⊥σ B | C then B ⊥σ A | C (symmetry);
(S2) if A ⊥σ (B ∪ D) | C then A ⊥σ B | C and A ⊥σ D | C (decomposition);
(S3) if A ⊥σ (B ∪ D) | C then A ⊥σ B | (C ∪ D) (weak union);
(S4) if A ⊥σ B | C and A ⊥σ D | (B ∪ C), then A ⊥σ (B ∪ D) | C (contraction);
The independence model is a graphoid if it also satisfies
(S5) if A ⊥σ B | (C ∪ D) and A ⊥σ C | (B ∪ D) then A ⊥σ (B ∪ C) | D (intersection).
Finally, the graphoid is compositional if also
(S6) if A ⊥σ B | C and A ⊥σ D | C then A ⊥σ (B ∪ D) | C (composition).
The composition property ensures that pairwise conditional independence implies
setwise conditional independence, i.e. that

A ⊥σ B | C ⇐⇒ α ⊥σ β | C, ∀α ∈ A, β ∈ B.

Example 2.24. (Probabilistic independence models) An important class of


independence models are generated by probability distributions. For a system V of
labeled random variables Xv , v ∈ V with distribution P we can define an
independence model ⊥ ⊥P by

A⊥
⊥P B | C ⇐⇒ XA ⊥⊥P XB | XC ,

where XA = (Xv , v ∈ A) denotes the variables with labels in A. The general


properties (C1)–(C4) of probabilistic conditional independence imply that
probabilistic independence models are semi-graphoids, but they are not generally
graphoids, nor do they generally satisfy composition. From Proposition 2.22 it follows
that if P has strictly positive density w.r.t. a product measure, ⊥⊥P is a graphoid, but
this condition is not neccessary, as indicated in Proposition 2.23. We shall later see that
if P is a regular multivariate Gaussian distribution, ⊥⊥P is a compositional graphoid,
Conditional independence revisited 53

but in general this is not so for an arbitrary P , reflecting that pairwise independence
does not generally imply joint independence. 2
Fundamentally, graphical models exploit that graph separation is an independence
model, and indeed it is a full compositional graphoid.
Example 2.25. (Separation in an undirected graph) A very important example of a
model for the irrelevance axioms above is that of separation in undirected graphs. Let
A, B, and C be subsets of the vertex set V of a finite undirected graph G = (V, E).
Define
A ⊥G B | C ⇐⇒ C separates A from B in G.
Then it is not difficult to see that undirected graph separation ⊥G is a compositional
graphoid. 2
Example 2.26. (Second order independence) Sets of random variables A and B are
partially uncorrelated for fixed C if their residuals after linear regression on XC are
uncorrelated:
Cov{XA − E∗ (XA | XC ), XB − E∗ (XB | XC )} = 0,
where E∗ (XA | XC ) is the linear regression of XA on XC ; this is defined as the affine
function E∗ (XA | XC ) = α + β > XC that minimizes the second moment of the
residual E||XA − (α + β > XC )||2 . In other words we write A ⊥2 B | C if all partial
correlations ρAB·C are equal to zero. The relation ⊥2 satisfies the semigraphoid
axioms (S1)–(S4), composition (S6), and (S5) if there is no non-trivial linear relation
between the variables in V . 2
Example 2.27. (Geometric orthogonality) As another example, consider geometric
orthogonality in Euclidean vector spaces or in Hilbert spaces. Let L, M , and N be
linear subspaces of a Euclidean space V and define
L ⊥ M | N ⇐⇒ (L N ) ⊥ (M N ), (2.21)
where L N = L ∩ N ⊥ . Note that this is not the same as standard orthogonality as
this usually is defined to imply L ∩ M = {0} for orthogonal L and M . If (2.21) is
satisfied, then L and M are said to meet orthogonally in N . Again, it is not hard to see
that the orthogonal meet has the following properties:
(O1) if L ⊥ M | N then M ⊥ L | N ;
(O2) if L ⊥ M | N and U is a linear subspace of L, then U ⊥ M | N ;
(O3) if L ⊥ (M + U ) | N , then L ⊥ M | (N + U );
(O4) if L ⊥ M | N and L ⊥ U | (M + N ), then L ⊥ (M + U ) | N .
(O5) if L ⊥ M | N and L ⊥ N | M , then L ⊥ (M + N ) | (M ∩ N ).
(O6) if L ⊥ M | N and L ⊥ U | N then L ⊥ (M + U ) | N .
The direct analogue of (C5) does not hold in general; for example if M = N we may
have
L ⊥ M | N and L ⊥ N | M,
but if M and N are not orthogonal then it is false that L ⊥ (M + N ). 2
54 Conditional independence

Example 2.28. (Separation in a bidirected graph) There are other notions of graph
separation that determine compositional graphoid independence models. If A, B, and
C are subsets of the vertex set V of a finite bidirected graph B = (V, E), we say that C
b-separates A from B in B and write A ⊥B B | C if all paths from A to B intersect
V \ (A ∪ B ∪ C). This notion is dual to separation in undirected graphs and bidirected
graph separation ⊥B determines a compositional graphoid; see also Theorem 2.31
below. 2
Example 2.29. (Variation independence) Let U ⊆ X = ×v∈V Xv and define for

S ⊆ V and u∗S ∈ XS ∩ U the S-section U uS of U as

U uS = {uV \S : uS = u∗S , u ∈ U}.

Define further the conditional independence relation ‡U as


∗ ∗ ∗
A ‡U B | S ⇐⇒ ∀u∗S : U uS = {U uS }A × {U uS }B

i.e. if and only if the S-sections all have the form of a product space. The relation ‡U
satisfies the semigraphoid axioms. Note in particular that A ‡U B | S holds if U is the
support of a probability measure satisfying A ⊥⊥ B | S. 2

2.5.2 Graphical independence models


A particularly important class of independence models are given by various forms of
separation in graphs. We have already seen such examples, the standard separation in
undirected graphs in Example 2.25, and its dual, b-separation for bidirected graphs, in
Example 2.28. These are both special instances of a more general concept of graph
separation for graphs with three types of edge, to be discussed below.

2.5.3 General graph separation


We say that a walk ω from α to β in a general graph G is active relative to S, if all
collider sections on ω intersect S, and all non-collider sections are disjoint from S. A
walk that is not active relative to S is said to be blocked by S. If ω is an active walk
from α ∈ A to β ∈ B, we also say that ω connects A and B.
Definition 2.30 Two subsets A and B of the vertex set V of a graph G = (V, E) are
said to be g-separated by S if all walks from A to B are blocked by S and we then
write A ⊥G B | S.
We note that if G is an undirected graph, there are no collider sections, so an active
walk is a walk that is disjoint from S; hence, this notion of separation specializes to
standard separation for undirected graphs. Similarly, for bidirected graphs all
non-endpoints of a walk are collider singletons, so an active path is a path that runs
entirely within S. Hence the g-separation in Definition 2.30 also specializes to
b-separation in bidirected graphs. For that reason we shall also just say that A and B
are separated by S in G when the conditions in Definition 2.30 are fulfilled and the
context will identify the precise meaning of this.
Conditional independence revisited 55

In the following we shall consider other interesting special cases, but first we wish to
establish that the independence model ⊥G so defined is indeed a compositional
graphoid:
Theorem 2.31 Let G = (V, E) be a general graph. Then the independence model
A ⊥G B | C determined by g-separation forms a compositional graphoid.
Proof Let G = (V, E) and consider disjoint subsets A, B, C, and D of V . We verify
each of the six properties separately.
Symmetry: If A ⊥G B | C then B ⊥G A | C. This is obvious from the definition.
Decomposition: If A ⊥G (B ∪ D) | C then A ⊥G B | C and A ⊥G D | C. Also
immediate from the definition.
Weak union: If A ⊥G (B ∪ D) | C then A ⊥G B | (C ∪ D). Using decomposition
yields A ⊥G D | C and A ⊥G B | C. Now suppose, for contradiction, that there
exist a connecting walk ω from A to B relative to C ∪ D. Then ω must have at
least one collider section, or it would also be connecting between A and B
relative to C. All collider sections on ω must intersect (C ∪ D) for ω to be
connecting. Also, ω must have a collider section intersecting D but disjoint from
C for else it would also be connecting relative to C. Consider the collider
section ρ which is closest to A on ω and let δ be the point nearest to A on ρ. The
vertices between A and δ on ω are not in B ∪ D and hence the subwalk of ω
consisting of these vertices connects between A and δ relative to C. This
contradicts the assumption that A ⊥G (B ∪ D) | C.
Contraction: If A ⊥G B | C and A ⊥G D | (B ∪ C) then A ⊥G (B ∪ D) | C. Suppose,
for contradiction, that there exists a walk between A and B ∪ D which is
connecting relative to C. Consider a shortest walk of this type and call it ω. This
walk must be between A and D since A ⊥G B | C. In addition, since all collider
sections on ω intersect C. As A ⊥G D | (B ∪ C), ω must have a non-collider
section that intersects B. This contradicts the fact that ω is a shortest walk
between A and B ∪ D which is connecting relative to C.
Intersection: If A ⊥G B | (C ∪ D) and A ⊥G D | (C ∪ B) then A ⊥G (B ∪ D) | C.
Suppose, for contradiction, that there exists a walk between A and B ∪ D that is
connecting relative to C. Consider a shortest walk of this type and call it ω. The
walk ω is either between A and B or between A and D. By symmetry we may
assume that ω is between A and B. Since all collider sections on ω intersect C
and A ⊥G B | (C ∪ D) ω must have a non-collider section that intersects D. This
contradicts that ω is a shortest walk between A and B ∪ D that is connecting
relative to C.
Composition: If A ⊥G B | C and A ⊥G D | C then A ⊥G (B ∪ D) | C. This is obvious
from the definition.
The proof is now complete. 2
Theorem 2.31 implies that we can focus on establishing conditional independence for
pairs of nodes, formulated in the corollary below.
56 Conditional independence

a 1

2 5 6

3 4 7 8 b
S

F IG . 2.1. Example of an active walk: (a, 1, 2, 3, 4, 3, 2, 5, 6, 7, 8, b). The colliders on


the walk are 4 and 7 which are both in S and all non-colliders are outside S; hence
the walk connects a and b relative to S. The shortest walk (a, 1, 2, 5, 6, 7, 8, b) from
a to b is blocked by 2 which is a collider on that walk and outside S.

Corollary 2.32 Let G = (V, E) and A, B, and C be disjoint subsets of V . Then


A ⊥G B | C if and only if α ⊥G β | C for every pair α ∈ A and β ∈ B.
Proof This follows because ⊥G satisfies decomposition and composition. 2

2.5.4 Directed acyclic graphs


For the case of a directed acyclic graph D the notion of g-separation in Definition 2.30
is equivalent (Koster, 2002) to what has been known as d-separation and differs from
g-separation by using paths instead of walks and considering paths to be active if
colliders are in An(S) and all non-colliders outside of S. We shall use the term
d-separation also for the version with walks and denote this by ⊥D .
To answer a query whether a given triple (A, B, S) satisfies A ⊥D B | S one must
potentially check an infinite number of walks. However, there is an alternative method
for checking d-separation in terms of standard separation in a suitable undirected
graph, associated with the query.
More precisely we say that A is m-separated from B by S and we write A ⊥m B | S if
S separates A from B in (DAn(A∪B∪S) )m , i.e.

A ⊥m B | S ⇐⇒ A ⊥(DAn(A∪B∪S) )m B | S.

We then have:
Proposition 2.33 Let A, B and S be disjoint subsets of a directed, acyclic graph G.
Then A ⊥D B | S ⇐⇒ A ⊥m B | S.
Proof Since d-separation is a special instance of g-separation, it follows from
Corollary 2.32 that we only need to consider the case where A and B are singletons a
and b. We show the result by showing that every g-connecting walk between a and b
corresponds to a connecting walk in (DAn(a∪b∪S) )m and vice versa.
Suppose S does not d-separate a from b. Then there is a connecting walk ω from a to b
such as, for example, indicated in Fig. 2.1. This walk must lie proceed entirely within
An(a ∪ b ∪ S). For if some vertex γ ∈ ω is a collider on ω we must have γ ∈ S or the
walk would be blocked; and if γ is neither an ancestor of S nor a collider on the walk,
at least one of the subwalks away from γ would lead to a or b. If γ is a collider,
Conditional independence revisited 57

pa(γ) ∩ ω must be outside S or the walk would be blocked. If pa(γ) ∩ ω = {δ} is a


singleton, as in vertex 5 of Fig. 2.1, we shorten the walk omitting the subwalk (δ, γ, δ)
from ω and obtain a walk from a to b not including γ; see Fig. 2.2. If

a 1

2 5 6

3 4 7 8 b
S

F IG . 2.2. The moral graph corresponding to the connecting walk in D. Modify-


ing the walk ω = (a, 1, 2, 3, 4, 3, 2, 5, 6, 7, 8, b) between a and b to become
ω ∗ = (a, 1, 2, 3, 2, 5, 6, 8, b) which connects a and b in the moral graph.

pa(γ) ∩ ω = {δ1 , δ2 } as for vertex 7 in Fig. 2.1, the marriage in the moral graph
between δ1 and δ2 means we can similarly replace (δ1 , γ, δ2 ) with (δ1 , δ2 ) and still
have a walk in the moral graph. Continuing in this fashion for all colliders on ω yields
a walk ω ∗ from a to b in (DAn(a∪b∪S) )m , circumventing S.
Suppose conversely that a is not separated from b in (DAn(a∪b∪S) )m . Then there is a
walk ω in this graph that circumvents S. The walk has pieces that correspond to edges
in the original graph and pieces that correspond to marriages. Each marriage edge
(δ1 , δ2 ) connects the parents of some vertex γ. If γ is in S we can simply replace the
piece (δ1 , δ2 ) of the walk with (δ1 , γ, δ2 ) as γ does not block this part of the walk in D.
If γ 6∈ S but has a descendant σ ∈ S, we instead modify the walk by replacing (δ1 , δ2 )
with (δ1 , γ, . . . , σ, . . . , γ, δ2 ), thus extending ω with a walk from γ to its first
descendant σ ∈ S and back again to γ. If neither of these, a or b must be a descendant
of γ since the ancestral set was smallest. In the latter case, a new walk can be created
in the new graph with one collider less, using the line of descent, such as illustrated in
Fig. 2.3. Continuing this substitution process eventually leads to an active walk from a
to b. Thus a is not d-separated from b by S and the proof is complete. 2

The use of Proposition 2.33 for deciding whether two sets A and B are separated by S
is illustrated in the following example.

a 1 a 1

d 2 4 5 d 2 4 5

c 3 6 7 b c 3 6 7 b
S S

F IG . 2.3. The walk (a, 1, 4, 5, 7, b) in (DAn(a∪b∪S) )m enables the construction of a


connecting walk (a, d, c, 3, 2, 4, 5, 6, 7, b) in D.
58 Conditional independence

a s sb

s? s

s? s y s
?
@
R s S = {x, y}
@
 PP
s sc
PP
x q?
P

F IG . 2.4. Is {a} d-separated from b by S = {x, y} in this graph? By S ∗ = {x}? By


S ∗∗ = {y}?

Example 2.34 Consider the directed acyclic graph in Fig. 2.4 and the problem of
deciding whether a ⊥D b | S.
There are two paths from a to b, one of them passing through y and one of them
avoiding y; the first path is blocked by y, whereas the second path is blocked both by x
and c. Thus we have a ⊥D b | {x, y}. If we consider S ∗ = {x} then the first path (via y)
becomes d-connecting so S ∗ is not d-separating. For S ∗∗ = {y}, the first path is still
blocked both by y and x, whereas the second path is blocked by the collider node c,
and hence it also holds that a ⊥D b | {y}. In this particular case we need only consider
paths and not walks.
The moral graph of the smallest ancestral set containing all the variables involved is
shown to the left in Fig. 2.5. It is immediate that S separates a from b in the graph to

a s sb a s sb a s sb
 
s s s s s
 
s s y s s y
@ @
@s S = {x, y} @s S ∗ = {x} S ∗∗ = {y}
 
x x

F IG . 2.5. The moral graphs of the smallest ancestral sets in the graph of Fig. 2.4
containing all variable involved are shown from left to right. S separates a from b
in the graph to the left, S ∗∗ separates in the graph to the right, wheras S ∗ does not
separate in the graph in the middle.

the left, implying a ⊥D b | S and similarly we have a ⊥D b | S ∗∗ , whereas


¬(a ⊥D b | S ∗ ). 2

2.6 Markov properties


In this section we consider relationships between probabilistic independence models
— as described in Example 2.24 — and graphical independence models. Such
relations take the form of Markov properties which typically involve statements of the
Markov properties 59

form that certain graph separations imply conditional independence statements in the
probabilistic independence model. More generally, G-Markov properties are
relationships between an independence model ⊥σ and separation properties in G.

Thus we shall consider the situation where we have a collection of random variables
(Xα )α∈V taking values in Borel spaces (Xα )α∈V . The probability spaces are either
real finite-dimensional vector spaces or finite and discrete sets. For A being a subset of
V we let XA = ×α∈A Xα and further X = XV . Typical elements of XA are denoted as
xA = (xα )α∈A . Similarly XA = (Xα )α∈A . We then use the short notation
A⊥ ⊥ B | C for XA ⊥ ⊥ XB | XC and so on. If we specifically want to emphasize the
dependence of the conditional independence relation on the specific probability
distribution P , we write ⊥
⊥P , but most of the time P will be fixed and given by the
context.
If a graph G = (V, E) is given with vertex set equal to the labels of the random
variables (Xα )α∈V we define
Definition 2.35 P is said to satisfy the global Markov property w.r.t. the graph G if for
all disjoint subsets A, B, S of V

(G) A ⊥G B | S =⇒ A ⊥⊥P B | S.

In other words, separation in the graph G implies conditional independence; or the map
A → XA is an independence homomorphism. We shall also say that X (or P ) is
globally Markov w.r.t. G if (G) holds. Further, we say:
Definition 2.36 P is said to be faithful to the graph G if for all disjoint subsets A, B, S
of V
A ⊥G B | S ⇐⇒ A ⊥⊥P B | S.
Thus a distribution P is faithful to G if and only if the independence models ⊥G and

⊥P are isomorphic. For a faithful distribution, the graph therefore gives a full picture
of the conditional independence relations among subsets of variables. Note that even
for a faithful distribution, there might be conditional independence relations among
other functions of the random variables than the coordinate projections
X → XA , A ⊆ V .
Whereas the global Markov property and the notion of faithfulness relates universally
to any graph with a separation property, there are a variety of Markov properties that
make reference to special types of graph. We shall discuss these in the following
subsections.

2.6.1 Markov properties on undirected graphs


Consider an undirected graph G = (V, E) and a collection of random variables
(Xα )α∈V as above.
In addition to the global Markov property defined by separation in Definition 2.35
above, we have a range of different Markov properties. A probability measure P on X
is said to obey
60 Conditional independence

(P) the pairwise Markov property relative to G, if for any pair (α, β) of vertices

α 6∼ β =⇒ α ⊥⊥ β | V \ {α, β};

(L) the local Markov property relative to G, if for any vertex α ∈ V

α ⊥⊥ V \ cl(α) | bd(α);

(G) the global Markov property relative to G, if separation implies conditional


independence
A ⊥G B | S =⇒ A ⊥⊥ B | S.
The Markov properties are related as described in the proposition below.
Proposition 2.37 For any undirected graph G and any probability distribution on X it
holds that
(G) =⇒ (L) =⇒ (P). (2.22)
Proof Firstly, (G) implies (L) because bd(α) separates α from V \ cl(α). Assume
next that (L) holds. We have β ∈ V \ cl(α) because α and β are non-adjacent. Hence

bd(α) ∪ ((V \ cl(α)) \ {β}) = V \ {α, β},

and it follows from (L) and (C3) that

α⊥
⊥ V \ cl(α) | V \ {α, β}.

Application of (C2) then gives α ⊥


⊥ β | V \ {α, β} which is (P). 2
It is worth noting that the proof of (2.22) only exploits the properties (C1)–(C4) of
conditional independence and hence also holds for any semi-graphoid independence
model ⊥σ .
The various Markov properties are different in general; but if the conditional
independence relation ⊥ ⊥P induced by P is a graphoid, the Markov properties are all
equivalent. The result is stated in the theorem below, due to Pearl and Paz (1987); see
also Pearl (1988).
Theorem 2.38. (Pearl and Paz) If a probability distribution P on X is such that its
independence model ⊥⊥P is a graphoid, it holds that

(G) ⇐⇒ (L) ⇐⇒ (P).

Proof We need to show that (P) implies (G), so assume that A ⊥G B | S, (P) holds,
and ⊥ ⊥P satisfies (S1)–(S5). Without loss of generality we may assume that both A
and B are non-empty. The proof is then reverse induction on the number of vertices
n = |S| in S. If n = |V | − 2 then both A and B consist of one vertex and the required
conditional independence follows from (P).
So assume |S| = n < |V | − 2 and that separation implies conditional independence
for all separating sets S with more than n elements. We first assume that
Markov properties 61

V = A ∪ B ∪ S, implying that at least one of A and B has more than one element, A,
say. If α ∈ A then A \ {α} ⊥G B | S ∪ {α} and also α ⊥G B | S ∪ A \ {α}; thus by the
induction hypothesis

A \ {α} ⊥
⊥P B | S ∪ {α} and α ⊥⊥P B | S ∪ A \ {α}.

Now (S5) for ⊥ ⊥P gives A ⊥


⊥P B | S.
If A ∪ B ∪ S ⊂ V we choose α ∈ V \ (A ∪ B ∪ S). Then A ⊥G B | S ∪ {α} implying
A⊥ ⊥P B | S ∪ {α}. Further, either α ⊥G B | A ∪ S separates B from {α} or
α ⊥G A | B ∪ S. Assuming the former gives α ⊥⊥P B | A ∪ S. Using (S5) and (S2) we
derive that A ⊥
⊥P B | S. The latter case is similar. 2
Note again that the proof only exploits (S1)–(S5) and therefore applies to any graphoid
independence model ⊥σ .
The global Markov property (G) is important because it gives a general criterion for
deciding when two groups of variables A and B are conditionally independent given a
third group of variables S.

As conditional independence is intimately related to factorization, so are the Markov


properties. In the following, symbols ψa , φa for a ⊆ V , etc. denote functions that
depend on x through its coordinates in a only, i.e.

xa = ya =⇒ ψa (x) = ψa (y).

Further we let f = dP/dµ denote the density of P w.r.t. a product measure


µ = ⊗α∈V µα on X . We then define:
Definition 2.39 A probability measure P on X is said to factorize according to G if
for all complete subsets a ⊆ V there exist non-negative functions ψa that depend on x
through xa only so that Y
f (x) = ψa (x). (2.23)
a complete
The functions ψa are not uniquely determined. There is arbitrariness in the choice of µ,
but also groups of functions ψa can be multiplied together or split up in different ways.
In fact one can without loss of generality assume — although this is not always
practical — that only cliques appear as the sets a, i.e. that
Y
f (x) = ψc (x), (2.24)
c∈C

where C is the set of cliques of G. If P factorizes, we say that P has property (F) and
the set of such probability measures is denoted by MF (G). We have
Proposition 2.40 For any undirected graph G and any probability distribution on X it
holds that
(F) =⇒ (G) =⇒ (L) =⇒ (P).
62 Conditional independence

Proof We only have to show that (F) implies (G) as the remaining implications are
given in Proposition 2.37. Let (A, B, S) be any triple of disjoint subsets such that S
separates A from B. Let à denote the connectivity components in GV \S which contain
A and let B̃ = V \ (Ã ∪ S). Since A and B are separated by S, their elements are in
different connectivity components of GV \S and any clique of G is either a subset of
à ∪ S or of B̃ ∪ S. If CA denotes the cliques contained in à ∪ S, we thus obtain from
(2.24) that
Y Y Y
f (x) = ψc (x) = ψc (x) ψc (x) = h(xÃ∪S )k(xB̃∪S ).
c∈C c∈CA c∈C\CA

Hence (2.16) gives that à ⊥


⊥ B̃ | S. Applying (C2) twice gives the desired
independence. 2
In the case where P has a positive density we can use the Möbius inversion lemma to
show that (P) implies (F), and thus all Markov properties are equivalent. This result
seems to have been discovered independently in various forms by a number of authors
(Averintsev, 1970; Spitzer, 1971; Besag, 1972; Besag, 1974), see Clifford (1990). The
result is often referred to as the Hammersley–Clifford Theorem. However,
Hammersley and Clifford (1971) actually prove that (L) implies (F) under the
positivity assumption, so this is slightly inaccurate. The proof given below is
essentially identical to the proof given by Grimmett (1973); see also Koster (1994).
Theorem 2.41 A probability distribution P with positive density f with respect to a
product measure µ satisfies the pairwise Markov property with respect to an
undirected graph G if and only if it factorizes according to G.
Proof If P factorizes, it is pairwise Markov as shown in Proposition 2.40, so we just
have to show that (P) implies (F).
Since the density is positive, we may take logarithms on both sides of (2.23). Hence
this equation can be rewritten as
X
log f (x) = φa (x), (2.25)
a:a⊆V

where φa (x) = log ψa (x) and φa ≡ 0 unless a is a complete subset of V .


Assume then that P is pairwise Markov and choose a fixed but arbitrary element
x∗ ∈ X . Define for all a ⊆ V

Ha (x) = log f (xa , x∗ac ),

where (xa , x∗ac ) is the element y with yγ = xγ for γ ∈ a and yγ = x∗γ for γ 6∈ a. Since
x∗ is fixed, Ha depends on x through xa only. Let further for all a ⊆ V
X
φa (x) = (−1)|a\b| Hb (x).
b:b⊆a
Markov properties 63

From this relation it is also clear that φa depends on x through xa only. Next we can
apply Lemma A.12 (Möbius inversion) to obtain that
X
log f (x) = HV (x) = φa (x)
a:a⊆V

such that we have proved the theorem if we can show that φa ≡ 0 whenever a is not a
complete subset of V . So let us assume that α, β ∈ a and α 6∼ β. Let further
c = a \ {α, β}. If we write Ha as short for Ha (x) we have
X
(−1)|c\b| Hb − Hb∪{α} − Hb∪{β} + Hb∪{α,β} .

φa (x) = (2.26)
b:b⊆c

Let d = V \ {α, β}. Then, by the pairwise Markov property and (2.17), we have
f (xb , xα , xβ , x∗d\b )
Hb∪{α,β} (x) − Hb∪{α} (x) = log
f (xb , xα , x∗β , x∗d\b )
f (xα | xb , x∗d\b )f (xβ , xb , x∗d\b )
= log
f (xα | xb , x∗d\b )f (x∗β , xb , x∗d\b )
f (x∗α | xb , x∗d\b )f (xβ , xb , x∗d\b )
= log
f (x∗α | xb , x∗d\b )f (x∗β , xb , x∗d\b )
f (xb , x∗α , xβ , x∗d\b )
= log
f (xb , x∗α , x∗β , x∗d\b )
= Hb∪{β} (x) − Hb (x).

Thus all terms in the curly brackets in (2.26) add to zero and henceforth the entire sum
is zero. This completes the proof. 2
When (A, B, S) form a decomposition of G the Markov properties decompose
accordingly. This is expressed formally in three propositions below.
Proposition 2.42 Assume that (A, B, S) decompose G = (V, E). Then a probability
distribution P factorizes with respect to G if and only if both its marginal distributions
PA∪S and PB∪S factorize with respect to GA∪S and GB∪S respectively and the
densities f satisfy

f (x)fS (xS ) = fA∪S (xA∪S )fB∪S (xB∪S ). (2.27)

Proof Suppose that p factorizes with respect to G such that


Y
f (x) = ψc (x).
c∈C

Since (A, B, S) decomposes G, all cliques are either subsets of A ∪ S or of B ∪ S. Let


A denote the cliques that are subsets of A ∪ S and B those that are subsets of B ∪ S.
Then
64 Conditional independence

Y Y
f (x) = ψc (x) ψc (x) = h(xA∪S )k(xB∪S ).
c∈A c∈B\A

By direct integration we find

fA∪S (xA∪S ) = h(xA∪S )k̄(xS )

where Z
k̄(xS ) = k(xB∪S )µB (dxB ),

and similarly with the other marginals. This gives (2.27) as well as the factorizations of
both marginal densities.
Conversely, assume that (2.27) holds and that fA∪S and fB∪S factorize. Then let
 1
if fS (xS ) 6= 0
ψS (xS ) = fS (xS )
0 otherwise.

Since fS is obtained from integration of f , the latter must also be almost everywhere
zero when fS is. Hence

f˜(x) = fA∪S (xA∪S )fB∪S (xB∪S )ψS (xS )

is a density for P and P factorizes. 2


Recursive use of Proposition 2.42 yields
Corollary 2.43 If G is decomposable and P has density f with respect to a product
measure µ on X , it holds that
Y Y
f (x) fS (xS )ν(S) = fC (xC ), (2.28)
S∈S C∈C

where S are the separators of G with multiplicities ν(S), C the set of cliques of G, and
fA , A ∈ C ∪ S are the marginal densities of XA , A ∈ C ∪ S.

2.6.2 Markov properties on directed acyclic graphs


For a directed acyclic graph, there are again several relevant Markov properties other
than the global Markov property (G) as defined by graph separation in Definition 2.35
or, equivalently, via m-separation, cf. Proposition 2.33.

An ordering V = {1, . . . , d} of the vertices of a DAG D is topological if all arrows


point from lower to higher: α → β =⇒ α < β. The predecessors of a vertex β are
pr β = {α ∈ V : α < β}. Now an independence model ⊥σ is said to obey
(O) the ordered Markov property relative to (D, <), if any vertex α is is
conditionally independent of its predecessors, given its parents:

α ⊥σ pr(α) \ pa(α) | pa(α).


Markov properties 65

(L) the local Markov property relative to D, if if any variable is conditionally


independent of its non-descendants, given its parents:
α ⊥σ nd(α) \ pa(α) | pa(α).
(G) the global Markov property relative to D, if separation implies conditional
independence
A ⊥D B | S =⇒ A ⊥σ B | S.
In constrast to the undirected case, these Markov properties are all equivalent without
further regularity assumptions. Indeed we have:
Theorem 2.44 Let D be a directed, acyclic graph and ⊥σ a semigraphoid
independence model. on X . Then the following conditions are equivalent
(G) ⊥σ obeys the directed global Markov property, relative to D;
(L) ⊥σ obeys the directed local Markov property, relative to D;
(O) ⊥σ obeys the ordered local Markov property relative to (D, <) where < is a
topological ordering of D.
Proof That (G) implies (L) follows by observing that {α} ∪ nd(α) is an ancestral set
and that pa(α) obviously separates {α} from nd(α) \ pa(α) in (G{α}∪nd(α) )m .
To show that (L) implies (G) we use induction on the number |V | of vertices in D. For
less than or equal to two vertices there is nothing to show. So assume the conclusion
holds for all DAGs with less than or equal to n vertices and assume |V | = n + 1. We
then consider three disjoint subsets (A, B, S) and may w.l.o.g. assume
An(A ∪ B ∪ S) = V for else the inductive assumption would yield the desired
conclusion.
Hence assume that A ⊥G B | S in G = Dm . Let v ∗ be a terminal vertex in D. The
separation implies that either v ∗ ∈ A ∪ S or v ∗ ∈ B ∪ S since parents are married in
Dm , so assume the former.
Consider first the case v ∗ ∈ A. Since v ∗ has no descendants, (L) yields
v ∗ ⊥σ (V \ pa(v ∗ )) | pa(v ∗ ); separation implies that also pa(v ∗ ) ⊆ A ∪ S; now weak
union (S3) yields v ∗ ⊥σ B | (A \ {v ∗ }) ∪ S. Also, S must separate A \ {v ∗ } from B in
(DV \v∗ )m since this has no more edges than Dm . From the inductive hypothesis we
now conclude that (A \ {v ∗ }) ⊥σ B | S. The case v ∗ ∈ B is similar.
Next we consider the case v ∗ ∈ S. First, realise that if S separates A from B in Dm ,
then S \ {v ∗ } separates A from B in (Dm )V \v∗ and hence also in (Dm )V \v∗ ). The
inductive hypothesis yields A ⊥σ B | (S \ {v ∗ }). If pa(v ∗ ) ⊆ A ∪ S, (L) in
combination with (S3) yields v ∗ ⊥σ B | (A ∪ (S \ {v ∗ })); contraction (S4) yields
(A ∪ {v ∗ }) ⊥σ B | (S \ {v ∗ }); finally weak union (S3) yields A ⊥σ B | S as desired.
The case with pa(v ∗ ) ⊆ B ∪ S is similar.
To show that (L) implies (O) we observe that pr(α) ⊆ nd(α) so (S2)
α ⊥σ nd(α) \ pa(α) =⇒ α ⊥σ pr(α) \ pa(α).
Finally we show that (O) implies (L) by induction on the number n = |V | of vertices
of D. For n ≤ 2 there is nothing to show. Assume the statement is true for |V | ≤ n and
66 Conditional independence

consider a DAG with n + 1 vertices so that (O) holds for ⊥σ and let v ∗ = n + 1. Then
for any α ≤ n the inductive assumption implies

α ⊥σ nd(α) \ (pa(α) ∪ {v ∗ }) | pa(α). (2.29)

If v ∗ ∈ de(α) we thus have α ⊥σ nd(α) \ pa(α) | pa(α). Otherwise we must have


pa(v ∗ ) ⊆ nd(α) and v ∗ ⊥σ V \ {v ∗ } | pa(v ∗ ), which by (S2) and (S3) implies
v ∗ ⊥σ α | (nd(α) \ {v ∗ }). Combining this fact with (2.29) and (S4) now yields
α ⊥σ nd(α) \ pa(α) | pa(α). The case α = v ∗ is trivial. Hence this completes the
proof. 2
Corollary 2.45 If ⊥σ satisfies (O) w.r.t. a specific topological ordering it satisfies (O)
w.r.t. any topological ordering.
Proof This is immediate since (O) is equivalent to (G) and (L) and these do not refer
to any ordering. 2
Consider next a system (P v )v∈V of Markov kernels that are adapted to D in the sense
that each P v is a Markov kernel from Xpa(v) to Xv . We then define the recursive
combination of (P v )v∈V w.r.t. a topological numbering of D as P < = ~v∈V P v ,
where combinations are made according to <. We then have:
Proposition 2.46 The recursive combination is well-defined and independent of the
specific topological ordering.
Proof This is shown by induction on the number |V | of vertices in D. For |V | ≤ 2
this is immediate.
Next assume the statement is true for |V | ≤ n and consider a DAG with n + 1 vertices.
We can then let v ∗ be a terminal vertex in D and by Proposition 2.15 write

P = ~v∈V \{v∗ } P v ~ P v


where v ∗ is the last vertex in a topological ordering, so the combination is


well-defined. If two topological orderings both have v ∗ = n + 1, the inductive
assumption also ensures that the corresponding recursive combinations are identical.
If two different terminal vertices v ∗ and v ∗∗ are last in two topological orderings it
follows from Proposition 2.17 that
∗ ∗∗ ∗∗ ∗
~v∈V \{v∗ ,v∗∗ } P v ~ P v ~ P v = ~v∈V \{v∗ ,v∗∗ } P v ~ P v ~ P v
 

and hence the inductive assumption ensures that the recursive combinations are
identical. 2
Remark: We may therefore without ambiguity omit the specific topological ordering
and write P = ~v∈V P v .
Definition 2.47 The Bayesian network (D, P ) generated by D and (P v )v∈V is the
recursive combination P = ~v∈V P v of (P v )v∈V w.r.t. D.
Markov properties 67

For a DAG D we say that P admits a recursive kernel factorization (R) if there exists a
a system (P v )v∈V of Markov kernels that are adapted to D in the sense that each P v is
a Markov kernel from Xpa(v) to Xv and P = ~v∈V P v . We first note
Proposition 2.48 If P admits a recursive kernel factorization according to the
directed, acyclic graph D and A is an ancestral set, then the marginal distribution PA
admits a recursive factorization according to GA .
Proof For any ancestral set A there is a topological ordering of V so that α < β for
all α ∈ A and β ∈ V \ A. Hence we may write

P = ~v∈V P v = (~v∈A P v ) ~ ~v∈V \A P v = PA ~ Q




so the marginal distribution simply factorizes as PA = ~v∈A P v . 2


We then have the following theorem:
Theorem 2.49 Let D be a directed, acyclic graph and P a probability distribution on
X . Then the following conditions are equivalent
(G) P obeys the directed global Markov property, relative to D;
(L) P obeys the directed local Markov property, relative to D;
(O) P obeys the ordered local Markov property relative to (D, <) where < is a
topological ordering of D;
(R) P admits a recursive kernel factorization according to D.
Proof That (G), (L), and (O) are equivalent follows from Theorem 2.44 since ⊥⊥P is
a semigraphoid.
That (R) is equivalent to (O) follows by induction on the number of vertices and
Corollary 2.16: If (O) holds and v ∗ is the largest vertex in a topological ordering we
have P = PV \{v∗ } ~ Q where Q represents the conditional distribution of Xv∗ given

XV \{v∗ } the latter only depending on xpa(v∗ ) by (O) and can we thus let Q = P v .
Hence induction yields the recursive factorization (R).
On the other hand, if (R) holds, Corollary 2.16 implies v ∗ ⊥⊥P V \ pa(v ∗ ) and the
remaining conditional independence relations follow by induction. 2
Example 2.50 [Structural equation models] A specific way to construct a Bayesian
network is through a system of structural equations. More precisely define

Xv ← φv (Xpa(v) , Uv ), v∈V (2.30)

where the assigments are made according to a topological ordering of the vertices of a
DAG D and Uv are independent and uniformly distributed on (0, 1). Then, by
Corollary 1.25, this defines a system of Markov kernels that is adapted to D and the
recursive combination of these Markov kernels represents the distribution of
Xv , v ∈ V . 2

In fact, by Theorem 1.28, any adapted system of Markov kernels and thus any
Bayesian network can be represented by a system of structural equations as above.
68 Conditional independence

Generally, a Bayesian network defined by stuctural equations may not have a density
w.r.t. any product measure. But if it has, the results above can be strengthened. We say
that a probability distribution P admits a recursive density factorization according to
D, if there exist non-negative functions, henceforth referred to as kernels,
k α (·, ·), α ∈ V defined on Xα × Xpa(α) , such that
Z
k α (yα , xpa(α) )µα (dyα ) = 1

and P has density f with respect to µ = ⊗α∈V µα , where


Y
f (x) = k α (xα , xpa(α) ).
α∈V

We then also say that P has property (F). It is an easy induction argument to show that
Proposition 2.51 P admits a recursive density factorization if and only if the kernels
k α (·, xpa(α) ) are densities for the conditional distribution of Xα , given
Xpa(α) = xpa(α) .
Proof Left to the reader as Exercise 2.8. 2
m
Also it is immediate that if we form the undirected moral graph D (marrying parents
and deleting directions) such as described towards the end of Section B.1, we have
Lemma 2.52 If P admits a recursive density factorization according to the directed,
acyclic graph D, it factorizes according to the moral graph Dm and therefore obeys
the global Markov property relative to Dm .
Proof The factorization follows from the fact that, by construction, the sets
{α} ∪ pa(α) are complete in Dm and we can therefore let ψ{α}∪pa(α) = k α . The
remaining part of the statement follows from the fact that (F) implies (G) in the
undirected case; see Proposition 2.40. 2
Generally, if P admits a recursive density factorization it also admits a recursive kernel
factorization.
We may now extend Theorem 2.49 to
Theorem 2.53 Let D be a directed, acyclic graph. For a probability distribution P on
X which has density with respect to a product measure µ, the following conditions are
equivalent:
(F) P admits a recursive density factorization according to D;
(R) P admits a recursive kernel factorization according to D;
(G) P obeys the directed global Markov property, relative to D;
(L) P obeys the directed local Markov property, relative to D;
(O) P obeys the ordered Markov property, relative to D.
Proof This follows as (R) and (F) are equivalent when the joint distribution have a
density w.r.t. a product measure, cf. Theorems 1.18 and 1.19. 2
Markov properties 69

2.6.3 Markov equivalence


Consider two graphs G1 and G2 as well as their associated independence models ⊥G1
and ⊥G2 . It may well happen that even though the graphs are different, their
independence models might be identical, see for example Figure 2.6 below. Here all

α β γ α β γ α β γ α β γ

F IG . 2.6. Four Markov equivalent graphs. Their associated independence models are
in all cases α ⊥G γ | β.

independence models are the same although the graphs are different. This also means
that any probability distribution P which satisfies the global Markov property for any
of them, automatically satisfies the global Markov property for all of them. We
formally define
Definition 2.54 Two graphs G1 and G2 are Markov equivalent if and only if their
independence models coincide, i.e. if A ⊥G1 B | S ⇐⇒ A ⊥G2 B | S.
Generally, independence models based on directed acyclic graphs are different from
those based on corresponding undirected graphs, but occasionally, as in Figure 2.6,
they are identical. More precisely we first define:
Definition 2.55 A directed acyclic graph D is said to be perfect if all parents of
common children are married, i.e. if for any triple α, β, γ with α → γ ← β, we have
α ∼ β.
Perfect DAGs are Markov equivalent to their skeleton. More precisely:
Proposition 2.56 A directed acyclic graph D is Markov equivalent to its skeleton
G = ske(D) if and only if D is perfect.
Proof The proof is by induction on the number of vertices |V | of D. For |V | ≤ 3 the
only non-perfect DAG is a triple α, β, γ with α → γ ← β and α 6∼ β, where then
α ⊥D β is the only independence whereas, for the skeleton, the only independence is
α ⊥G β | γ.
For |V | > 3, consider a triplet A, B, S and let v ∗ be a terminal vertex outside
A ∪ B ∪ S. If this does not exist, we have An(A ∪ B ∪ S) = V and we have
A ⊥m B | S ⇐⇒ A ⊥G B | S where G = ske(D) is the skeleton of D. Else remove v ∗
and use the induction hypothesis.
For the converse, the inductive assumption implies that we only have to consider the
case where a terminal vertex v ∗ has unmarried parents α and β. These are then
separated in the skeleton by V \ {α, β} but not d-separated as the walk α → v ∗ ← β is
active relative to V \ {α, β}. 2
In general, the question of Markov equivalence of two directed acyclic graphs is
slightly more subtle. Before we explore this further, we need a few lemmas.
Lemma 2.57 Let D = (V, E) be a directed acyclic graph. Then for α 6= β it holds
that α 6∼ β if and only if there exists S ⊆ V \ {α, β} such that α ⊥D β | S.
70 Conditional independence

Proof If α ∼ β, the walk (α, β) connects α and β given any S and hence we do not
have α ⊥D β | S.
Conversely, if α 6∼ β we let A = An(α, β) be the smallest ancestral set containing
{α, β} and subsequently S = A \ {α, β}. It is also true that α 6∼ β in the moral graph
(DA )m as α and β have no common children in A: since all elements of A are
ancestors of α or β a directed path from a common child to either of them would create
a cycle. Hence α ⊥m β | S and thus, by Proposition 2.33 α ⊥D β | S. 2
Note that the same result is trivially true for an undirected graph G, where we can use
S = V \ {α, β}. Indeed it is true for any general graphical independence model ⊥G as
defined earlier, but we refrain from showing the lemma in this generality here.
Further we define
Definition 2.58 An arrow α → β is covered in a DAG D if pa(β) = pa(α) ∪ α.
Note that if D∗ is obtained from D by replacing the arrow α → β with β → α then
β → α is covered in D∗ if and only if α → β is covered in D. Covered edges can be
reversed without changing the independence model, as the next lemma says.
Lemma 2.59 Let D be a DAG and let D∗ be obtained from D by replacing the edge
α → β with β → α. Then D∗ is a DAG which is Markov equivalent to D if and only if
α → β is covered.
Proof Assume first that the arrow α → β is covered. To show that D∗ is a DAG we
assume for contradiction that there is a directed cycle in D∗ which then must include
the arrow β → α since D was a DAG. Let this cycle be

ω ∗ = (α1 → · · · → γ → β → α → · · · → α1 ).

But if α → β is covered and γ → β then γ is also a parent of α in D implying that

ω = (α1 → · · · → γ → α → · · · → α1 )

is a cycle in D, contradicting that D is acyclic.


To show that D∗ and D are Markov equivalent we have to show that if there is a walk
in D from u to v which is connecting relative to S there is also a connecting walk from
u to v in D∗ . We may without loss of generality assume that this walk includes the
edge α → β since otherwise the statement is obvious; thus the walk has the form

ω = (u ∼ · · · ∼ γ1 ∼ α → β ∼ γ2 · · · ∼ v).

If β ∈ S, β must be a collider in D on this walk and we must have γ2 ∈ pa(β), and


α, γ2 6∈ S since otherwise the walk would not be connecting. Since α → β is covered
we have γ2 = α or γ2 ∈ pa(α); if α = γ2 the walk

ω 0 = (u ∼ · · · ∼ γ1 ∼ α = γ2 ∼ · · · ∼ v)

would still be connecting and if γ1 = γ2 the walk

ω 00 = (u ∼ · · · ∼ γ1 = γ2 ∼ · · · ∼ v)
Markov properties 71

connects. If γ1 6= γ2 and γ1 ∈ pa(α) we also have γ1 ∈ pa(β) and the walk

ω 000 = (u ∼ · · · ∼ γ1 → β ← γ2 · · · ∼ v)

connects. Every time the walk includes α → β we modify the walk as above and
eventually obtain a walk ω̃ which connects in both D and D∗ .
If β 6∈ S it is never a collider on ω. If now γ̃1 ∈ pa(β) we modify ω as

ω̃ 0 = (u ∼ · · · ∼ γ̃1 → β → γ̃2 · · · ∼ v)

and this walk will still be connecting. Working through all the appearances of α → β
eventually yields a walk that is connecting in both D and D∗ .
For the converse we consider an edge α → β which is not covered. Then there is a
γ ∈ pa(β) \ pa(α) with γ 6= α or a γ ∈ pa(α) \ pa(α). Consider the former case: If
α → γ, reversing α → β creates a cycle (α → γ → β → α) and thus D∗ is not
acyclic. Hence we may assume that α 6∼ γ and thus by Lemma 2.57 there is an S such
that α ⊥D γ | S. Then β 6∈ S for else would (α → β ← γ) connect. But then
(γ → β → α) connects in D∗ and thus D and D∗ are not Markov equivalent.
If γ ∈ pa(α) \ pa(β) we argue similarly, just reversing the role of D and D∗ . This
completes the proof. 2
We define an unshielded collider tripath to be an induced subgraph of the form
α → γ ← β, i.e. arrows meet head-to-head at γ but α 6∼ β. Such structures are
preserved under the operation of reversing a covered edge:
Lemma 2.60 Let D be a DAG and let D∗ be obtained from D by replacing a covered
edge α → β with β → α. Then D and D∗ have the same skeleton and the same
unshielded collider tripaths.
Proof The skeleton is clearly unchanged by any edge reversal. Also, none of the
edges involved in an unshielded collider tripath α → γ ← β are covered as then α is a
parent of γ but not a parent of β. 2
Further we have
Lemma 2.61 If two directed acyclic graphs D1 = (V, E1 ) and D2 = (V, E2 ) with
D1 6= D2 have the same skeleton ske(D1 ) = ske(D2 ) and the same unshielded
collider tripaths, then there exists a covered edge α → β in E1 \ E2 .
Proof The proof is constructive and gives a simple algorithm for identifying such an
edge. First we consider a topological ordering of D1 and let β be the minimal element
of this ordering satisfying pa1 (β) \ pa2 (β) 6= ∅. Further, let α be the maximal element
of pa1 (β) \ pa2 (β). We shall argue by contradiction that α → β is indeed covered.
So assume for contradiction that there exists a vertex γ ∈ pa1 (β) \ pa1 (α) with
γ 6= α. Then we must have α → γ in E1 for else we would have an unshielded collider
tripath contradicting that α → β ∈ E1 \ E2 . But then either α → γ is in E1 \ E2 or
γ → β must be in E1 \ E2 for else D2 would contain a directed cycle. But the former
contradicts the minimality of β and the latter the maximality of α.
72 Conditional independence

If there were a vertex γ ∈ pa1 (α) \ pa1 (β) we would have γ ∈ pa2 (α) since β was
chosen to be minimal. Since α → β cannot be part of an unshielded collider tripath,
there must be an edge β → γ in E1 which would create a cycle.
Hence we conclude that α → β is covered. 2
We are then ready to show the main result about Markov equivalence of directed
acyclic graphs.
Theorem 2.62 Two directed acyclic graphs D1 = (V, E1 ) and D2 = (V, E2 ) are
Markov equivalent if and only if they have the same skeleton ske(D1 ) = ske(D2 ) and
the same unshielded collider tripaths.
Proof From Lemma 2.57 it follows that two Markov equivalent DAGs must have the
same skeleton. If we have two DAGs D1 and D2 with the same skeleton and the same
unshielded colliders, Lemma 2.61 yields that we can find a covered edge in E1 \ E2 .
Reversing this edge yields a new DAG D10 with E10 \ E2 having one element less.
Lemma 2.60 ensures that also D10 and D1 have the same skeleton and same unshielded
collider tripaths and Lemma 2.59 ensures D10 is Markov equivalent to D1 . Continuing
in this matter eventually transforms D1 to D2 and every step preserves Markov
equivalence, hence D1 is Markov equivalent to D2 .
For the converse we simply realise that if α → γ ← β is an unshielded collider tripath
in D1 which is not unshielded in D2 , any set S which satisfies α ⊥D1 β | S cannot
include γ where as it must include γ to ensure α ⊥D2 β | S. 2
Note that it follows from the proof that if D1 and D2 are Markov equivalent, there is a
sequence of covered arrow reversals transforming D1 into D2 .
Exercises 73

2.7 Exercises
Exercise 2.1 Let Y and Z be real valued random variables such that EY 2 < ∞ and
EZ 2 < ∞. Let X be a random variable with values in the measurable space (X , E). Define the
conditional covariance between Y and Z given X by

Cov(Y, Z | X) = E(Y Z | X) − E(Y | X)E(Z | X)

(a) Show that


Cov(Y, Z) = E(Cov(Y, Z | X)) + Cov(E(Y | X), E(Z | X))

(b) Assume that Y ⊥


⊥ Z | X. Show that Cov(Y, Z | X) = 0 a.s.
Now assume that X is a real valued random variable with EX 2 < ∞, and assume that Y1 and
Y2 are two other random variables with the same conditional distribution (Px )x∈R given X,
where
Px = N (x, 1)
Assume that Y1 ⊥
⊥ Y2 | X .
(c) Show that EY12 = EY22 < ∞.

(d) Show that Cov(Y1 , Y2 ) = V(X).


Exercise 2.2 Assume that X1 and X2 are real valued random variables. Let (Px )x∈R be the
conditional distribution of X1 given X1 + X2 .
Define for each x ∈ R and B ∈ B the set

x − B = {x − y : y ∈ B}

and define the collection of measures (Qx )x∈R by

Qx (B) = Px (x − B)

(a) Show that (Qx )x∈R is the conditional distribution of X2 given X1 + X2 .


Define for each x ∈ R the measure Rx on (R2 , B2 ) by

Rx (A × B) = Px (A ∩ (x − B))

for A, B ∈ B.
(b) Show that (Rx )x∈R is the conditional distribution of (X1 , X2 ) given X1 + X2 .

(c) Assume that X1 ⊥


⊥ X2 | X1 + X2 . Show that for all x ∈ R it holds that Px (A) ∈ {0, 1} for all
A ∈ B. Conclude that Px = δφ(x) , where φ(x) is some real number depending on x.

(d) Show that the function φ from (3) is measurable.

(e) Show that if X1 ⊥


⊥ X2 | X1 + X2 , then there exists measurable functions φ1 and φ2 , such that

X1 = φ1 (X1 + X2 ) a.s., and X2 = φ2 (X1 + X2 ) a.s.

.
74 Conditional independence

(f) Give an example of real random variables X1 , X2 and X3 , where

X1 ⊥
⊥ X2 | X1 + X2 + X3 .

.
Exercise 2.3 Assume that X is a real random variable and that (Px )x∈R is the conditional
distribution of Y given X, where Px is the exponential distribution with mean |x|.

(a) Find a measurable function


φ : R × (0, 1) → R
0
such that if X has the same distribution as X and if U is uniform on (0, 1) and independent of
X 0 , then (X 0 , Y 0 ) has the same distribution as (X, Y ), where Y 0 = φ(X 0 , U ).

(b) Assume that X ∼ N (0, 1). Simulate 10000 independent replications of (X, Y ), and plot the
points (Xn , Yn )n=1,...,10000 .

(c) Find E(Y | X = x) and V (Y | X = x) theoretically and use this to explain the plot.
Exercise 2.4 Assume that U1 , U2 and U3 are independent and identically distributed according
to the uniform distribution on (0, 1). Define the real random variables X, Y and Z as follows:

X = U12
Y = −X log(1 − U2 )
Z = −2X log(1 − U3 )

(a) Find the conditional distribution of Y given X and the conditional distribution of Z given X.

(b) Show that U2 ⊥


⊥ U3 | U1

(c) Show that (U1 , U2 ) ⊥


⊥ (U1 , U3 ) | U1

(d) Show that Y ⊥


⊥ Z | U1

(e) Show that Y ⊥


⊥ Z |X

(f) Find the conditional distribution of (Y, Z) | X.

(g) Let U4 be another uniformly distributed random variable independent of (U1 , U2 , U3 ), and
define Z2 = −2U42 log(1 − U3 ). Argue that Y ⊥ ⊥ Z2 . Simulate 10000 replications of (Y, Z)
and (Y, Z2 ), plot these replications in two plots and explain the difference.
Exercise 2.5 Prove Proposition 2.21.
Exercise 2.6 Show that if the distribution of X | Z is degenerate so that X in effect is a
deterministic function of Z, then X ⊥⊥ Y | Z for all possible random variables Y .
Exercise 2.7 Let (X, Y, Z) be random variables with a discrete and finite state space.
(a) Show that if (X, Y, Z) are all binary, it holds that

X⊥
⊥ Y and X ⊥
⊥ Y | Z =⇒ (X, Z) ⊥
⊥ Y or X ⊥
⊥ (Y, Z);
Exercises 75

(b) Find a counterexample to the analogous result when state spaces are discrete but may have more
than two states.
Exercise 2.8 Prove Proposition 2.51.
Exercise 2.9 Let X = (X1 , X2 , X3 )> ∼ N3 (0, Σ) be a multivariate Gaussian distribution.
(a) Show that X1 ⊥
⊥ X3 | X2 if and only if σ13 σ22 = σ12 σ23 ;

(b) Use this to show that for multivariate Gaussian variables it holds that

X1 ⊥
⊥ X3 and X1 ⊥
⊥ X3 | X2 =⇒ (X1 , X2 ) ⊥
⊥ X3 or X1 ⊥
⊥ (X2 , X3 ).

Exercise 2.10 Show that graph separation ⊥B in a bidirected graph G is a compositional


graphoid without using Proposition 2.31.
Exercise 2.11 Show that graph separation ⊥G in an undirected graph G is a compositional
graphoid without using Proposition 2.31.
Exercise 2.12 Consider the graph below:
D E
u u
B @ C
u @u
@
@
@u
@
A

(a) Write down all conditional independence statements for this graph corresponding to the pairwise
Markov property;

(b) Write down all conditional independence statements for this graph corresponding to the local
Markov property;

(c) Write down some of the conditional independence statements for this graph which follow from
the global Markov property and which are not listed above.

Exercise 2.13 Let X = Y = Z with P {X = 1} = P {X = 0} = 1/2. Show that this


distribution satisfies (P) but not (L) with respect to the graph below.
s s s
X Y Z
Exercise 2.14 Let U and Z be independent with

P (U = 1) = P (Z = 1) = P (U = 0) = P (Z = 0) = 1/2,

W = U , Y = Z, and X = W Y . Show that this distribution satisfies (L) but not (G) w.r.t. the
graph below.
s s s s s
U W X Y Z
76 Conditional independence

Exercise 2.15 Consider the distribution over four binary variables which gives probability 1/8
to all of the 8 configurations displayed in the figure below:
1 r r1
1 r r1
r1 r1 1 r r1
1 r r0 0 r r1
1 r r0 0 r r1
1 r r0 0 r r1
0 r r0 0 r r0
1 r r0 0 r r1
0 r r0
0 r r0
Note that there are only four variables. The only reason that the graph (four-cycle) is repeated is
to see the obvious pattern in the configuration.
Show that this distribution satisfies (G) with respect to the four cycle, but the distribution does
not factorize with respect to this graph, i.e., it does not satisfy (F).
Hint: Assume that it factorizes and show that if it is positive on these configurations, it must be
positive on all 16 possible configurations of the four binary variables.
Exercise 2.16 Let the joint distribution of (X, Y ) have density f (x, y) w.r.t. a product measure
ν ⊗ µ. The conditional entropy H(X | Y ) is defined as the average entropy in the conditional
distribution
h i
H(X | Y ) = E E {− log f (X | Y ) | Y }
Z Z 
= −f (x | y) log f (x | y)ν(dx) f (y) µ(dy).
y x

(a) Use Jensen’s inequality to show that

H(X | Y ) ≤ H(X),

i.e. the entropy is always reduced by conditoning.

(b) Show that


H(X, Y ) = H(X | Y ) + H(Y ).

(c) For three random variables, show that

H(X, Y, Z) + H(Z) ≤ H(X, Z) + H(Y, Z).

(d) Show further that

X⊥
⊥ Y | Z ⇐⇒ H(X, Y, Z) + H(Z) = H(X, Z) + H(Y, Z).

Exercise 2.17 Let ⊥σ be an independence model on a finite set V and let M ⊆ V . The
marginal independence model ⊥σM is simply the restriction of ⊥σ to triples (A, B, S) with
Exercises 77

(A ∪ B ∪ S) ⊆ M . The conditional independence model ⊥M


σ is defined for triples (A, B, S)
with (A ∪ B ∪ S) ⊆ V \ M as

A ⊥M
σ B | S ⇐⇒ A ⊥σ B | (S ∪ M ).

(a) Show that ⊥σM and ⊥M σ inherit the properties of ⊥σ , such that, e.g., if ⊥σ is a compositional
graphoid, so are its marginal and conditional;

(b) Show that for a probability distribution P with associated independence model ⊥
⊥P , the
independence model of the marginal distribution PM is indeed the marginal of ⊥⊥P ;

(c) Show that for a probability distribution P with associated independence model ⊥
⊥P , the
independence model of the conditional distributions (PxM ) of XV \M given XM is indeed the
conditional model of ⊥⊥P ;

(d) Show that if ⊥ ⊥P is globally Markov w.r.t. an undirected graph G, then the conditional
distributions (PxM ) of XV \M given XM are globally Markov w.r.t. the induced subgraph
GV \M ;

(e) Show that in general the M -marginal of ⊥


⊥P is not globally Markov w.r.t. GM .
Exercise 2.18 Consider a DAG D with arrows
1 → 2, 2 → 5, 2 → 3, 5 → 6, 4 → 5, 4 → 7, 5 → 7.
(a) Draw the DAG;

(b) List all conditional independence relations corresponding to the local, directed Markov property;

(c) Find the ancestral sets generated by the following subsets:


(a) {5};
(b) {2, 7};
(c) {4, 6};

(d) Which of the following separation statements are true? For those that are not true, identify an
active walk.
(a) 2 ⊥D 4 | 5;
(b) 2 ⊥D 7 | 5,
(c) 1 ⊥D 7 | 5, 6;
(d) 1 ⊥D 4 | 6;
Exercise 2.19 Consider the following directed acyclic graphs, and in each case, list all DAGs in
their Markov equivalence class and verify in every single case whether they are Markov
equivalent to an undirected graph.
(a) 1 → 2, 3 → 2, 2 → 4, 4 → 5, 2 → 5;

(b) 1 → 2, 2 → 3, 2 → 4, 4 → 5, 6 → 5;

(c) 1 → 2, 2 → 3, 2 → 4, 4 → 5, 5 → 6;
Exercise 2.20 Consider a directed acyclic graph D with arrows
A → B, B → D, B → E, C → E, D → E, D → F, E → F .
78 Conditional independence

(a) Form the moral graph Dm of D.

(b) Assume P satisfies the local directed Markov property with respect to D. Which of the
following statements can be concluded? Explain your reasoning.

C⊥
⊥ D | B, A⊥
⊥ C | E, B⊥
⊥ F | {E, A}.

(c) Consider the following directed acyclic graphs obtained from D by reversing arrows:
(i) D1 has reversed the arrow from A → B, i.e. it has arrows
B → A, B → D, B → E, C → E, D → E, D → F, E → F ;
(ii) D2 has reversed the arrow from D → E, i.e. it has arrows
A → B, B → D, B → E, C → E, E → D, D → F, E → F .
(iii) D3 has reversed the arrow from C → E, i.e. it has arrows
A → B, B → D, B → E, E → C, D → E, D → F, E → F .
Which of these directed acyclic graphs are Markov equivalent to D?

(d) Which of the directed acyclic graphs above are Markov equivalent to an undirected graph?
3
LOCAL COMPUTATION

3.1 Local computation


Local computation algorithms have been developed with a variety of purposes. For
example:
• Kalman filter and smoother (Thiele, 1880; Kalman and Bucy, 1961);
• Solving sparse linear equations; (Parter, 1961);
• Decoding digital signals; (Viterbi, 1967; Bahl, Cocke, Jelinek and Raviv, 1974);
• Estimation in hidden Markov models; (Baum, 1972);
• Peeling in pedigrees; (Elston and Stewart, 1971; Cannings, Thompson and
Skolnick, 1976);
• Belief function evaluation; (Kong, 1986; Shenoy and Shafer, 1986);
• Probability propagation. (Pearl, 1986; Lauritzen and Spiegelhalter, 1988; Jensen,
Lauritzen and Olesen, 1990);
Also dynamic programming, linear programming, optimizing decisions, calculating
Nash equilibria in cooperative games, and many others. This list is far from exhaustive.
An abstract framework has been discussed by Shenoy and Shafer (1990) and Lauritzen
and Jensen (1997).
All algorithms are using, explicitly or implicitly, a graph decomposition and a junction
tree or similar structure. The basic idea is to arrange computations to be performed
locally, i.e. in cliques of a decomposable graph and thus effectively in a smaller state
space than that associated with all the variables in V .

3.2 Probability propagation


3.2.1 Basic problem
We consider a factorizing density on X = ×v∈V Xv with V and Xv finite:
Y
p(x) = φC (x).
C∈C

The potentials φC (x) depend on xC = (xv , v ∈ C) only. The basic task is to calculate
the marginal probability X
p(x∗E ) = p(x∗E , yV \E )
yV \E

for E ⊆ V and fixed x∗E , but this sum has too many terms if V is large as then X is
huge and has cardinality at least 2|V | . A second purpose of the computation is to get
the prediction p(xv | x∗E ) = p(xv , x∗E )/p(x∗E ) for v ∈ V . We first consider a simple
example:
80 Local computation

Example 3.1 Assume that the density factorizes as

p(x, y, z, w) = φ(x, y)ψ(y, z)η(z, w)

and assume each of X, Y , Z, and W has, say, 100 states. The joint state space has thus
108 states, and to calculate p(x) directly from p(x, y, z, w) by brute force involves 106
terms in the sum for every x, hence 108 arithmetic operations are needed. This is
possible, but time consuming, and in networks with many variables, direct calculation
becomes impossible.
Instead, we may use the factorization p(x, y, z, w) = φ(x, y)ψ(y, z)η(z, w) as follows:
1. Calculate η ∗ (z) = w η(z, w), with 10000 additions;
P

2. Calculate ψ ∗ (y, z) = ψ(y, z)η ∗ (z) with 10000 multiplications


3. Calculate ψ ∗ (y) = z ψ ∗ (y, z), with 10000 additions;
P

4. Calculate φ∗ (x, y) = φ(x, y)ψ ∗ (y) with 10000 multiplications;


5. Calculate φ∗ (x) = y φ∗ (x, y), with 10000 additions.
P

Now the marginal p∗ (x) is equal to φ∗ (x) so we calculated our quantity of interest
with only 50000 operations. Note in particular that we never explicitly formed the
product p(x, y, z, w) = φ(x, y)ψ(y, z)η(z, w). The product only appears conceptually,
guiding the specific computations. 2

3.2.2 Setting up the structure


The typical application of a local computation algorithm involves first specifying a
Bayesian network. Starting from a DAG, the local computational structure is set up in
several steps:
1. Moralisation: Constructing Dm and exploiting that if P factorizes over D, it
factorizes over Dm (Lemma 2.52);
2. Triangulation: Adding edges to find a chordal cover G̃ of G, i.e. a chordal graph
G̃ with G ⊆ G̃. This step is non-trivial (NP-complete) to optimize;
3. Constructing a junction tree: Using maximum cardinality search, the cliques of
G̃ are found and arranged in a junction tree.
4. Initialization: Assigning appropriate potential functions φC to cliques and
separators; see below.
The complete process above is often referred to as compilation. Computation is then
performed by message passing after observations have been incorporated, to be
explained in the following.

3.2.3 The basic invariant


[Link] Initialization From a Bayesian network over a directed acyclic graph D
with conditional densities kv (xv | xpa(v) ) we first assign every v to a clique Cv of G̃
with the property that {v} ∪ pa(v) ⊆ Cv . Such a clique will always exist after
moralization. There may be more than one possible choice for Cv , but we then choose
arbitrarily among these. We then assign potential functions
Probability propagation 81

Y
φC (xC ) = kv (xv | xpa(v) );
v:Cv =C

with the usual convention that the product over the empty set is equal to 1 so we get
φC ≡ 1 for cliques C that have no node assigned. We also assign potentials to
separators, initially φS ≡ 1 for all S ∈ S, where S is the set of separators in the
junction tree.
We now define the joint potential of the junction tree as
Q
Y φC (xC )
κ(x) = f (x) = kv (xv | xpa(v) ) = QC∈C . (3.1)
v∈V S∈S φS (xS )

and emphasize that only the clique potentials are actually computed whereas the
product above is a conceptual quantity.
From Bayes’ formula in Corollary 1.21 we also note that the conditional density of
XV \E given XE = x∗E is determined as
f (x | x∗E ) = κ(x)/p(x∗E ).
Formally, we shall incorporate evidence XE = x∗E by multiplying the clique potentials
with appropriate indicator functions, i.e.
φCv (x) ← φCv (x)1{x∗v } (xv ), v ∈ E.
We shall see below that the expression on the right-hand side of (3.1) will remain
invariant under the message passing process.
For simplicity we shall in the following assume that all state spaces Xv are discrete and
finite and densities are always expressed w.r.t. counting measure.

[Link] Marginalization We define the A-marginal of a potential φB for A ⊆ V as

φ↓A ↓A
X
B (x) = φB (xA ) = φB (y)
yB :yA∩B =xA∩B

Since φB depends on x through xB only, it is true that if B ⊆ V is ‘small’, its


A-marginal can be computed easily. Note also that the marginal φ↓A depends on xA
only and that marginalization satisfies the following properties:
↓A
Consonance: For subsets A and B it holds that φ↓(A∩B) = φ↓B ;
Distributivity: If φC depends on x C only and C ⊆ B, it holds that
↓B
(φφC ) = φ↓B φC .


The distributivity ensures that we can move factors in a sum outside of the summation
sign.

3.2.4 Message passing


The computation now proceeds by neighbouring cliques communicating by
appropriate messages, exploiting the separators as transmitters. The basic operation of
sending a message is described below.
82 Local computation

[Link] Messages When C sends a message to D, the following happens:


Before
  
φC φS φD
  
  - 
φ↓S
φC φ↓S
C φD φCS
  
After
In words, φD receives the message from C by multiplying its potential by the ratio
φ↓S ↓S
C /φS ; the separator potential is subsequently replaced by the S-marginal φC of the
C-potential. The computations are completely local, only involving variables
associated with the communicating cliques. We note in particular that the expression
for the joint potential Q
φC (xC )
κ(x) = QC∈C
S∈S φS (xS )
is invariant under the message passing since φC φD /φS is:
φ↓S
φC φD C
φS φC φD
= .
φ↓S
C
φS
Also, after the message has been sent, D contains the D-marginal of φC φD /φS . To
see this we calculate
 ↓D
φC φD φD ↓D φD ↓S
= φ = φ .
φS φS C φS C
[Link] Second message Suppose that after the first message, D returns a message
to C, i.e. the following happens:
After first message
  - 
φ↓S
φC φ↓S
C φD φCS
  
  
φ↓S ↓S φ↓S
φC φDS φ φD φCS
  
After second message
After two messages all sets contain the relevant marginal of φ = φC φD /φS . To see
this, we argue as follows: The total marginal is
↓S !↓S
φ↓S φ↓S φ↓S

↓S φC φD ↓D ↓S C
φ = = (φ ) = φD = C D .
φS φS φS
Probability propagation 83

The clique C contains


φ↓S φC ↓S
φC = φ = φ↓C
φ↓S
C
φS D
since, as before,
 ↓C
φC φD φC ↓C φC ↓S
= φ = φ .
φS φS D φS D
Note that any further messages between C and D are neutral! Nothing will change if a
message is repeated.
3.2.5 Message scheduling
We now schedule the message passing for the entire junction tree in two phases
(i) C OLLECT E VIDENCE: messages are sent from leaves towards arbitrarily chosen
root R. After C OLLECT E VIDENCE, the root potential φR satisfies
φR (xR ) = κ↓R (xR ) = p(xR , x∗E ).
(ii) D ISTRIBUTE E VIDENCE: messages are sent from root R towards leaves. After
C OLLECT E VIDENCE and subsequent D ISTRIBUTE E VIDENCE, it holds for all
B ∈ C ∪ S that
φB (xB ) = κ↓B (xB ) = p(xB , x∗E ).
Hence p(x∗E ) = xS φS (xS ) for any S ∈ S and p(xv | x∗E ) can readily be computed
P
from any φS with v ∈ S.
[Link] Correctness of algorithm The correctness of the algorithm is easily
established by induction: The previous considerations in fact establish correctness for a
junction tree with only two cliques since we have found that after two messages all
messages are neutral and every clique or separator contains the marginal of the joint
potential.
Now consider a leaf clique L of the junction tree and let V ∗ = ∪C:C∈C\{L} C. We can
then think of L and V ∗ forming a junction tree of two cliques with separator
S ∗ = L ∩ C ∗ where C ∗ is the neighbour of L in the junction tree.
After a message has been sent from L to V ∗ in the C OLLECT E VIDENCE phase, φV ∗ is
equal to the V ∗ -marginal of κ.
By induction, when all messages have been sent except the one from the neighbour
clique C ∗ to L, all cliques other than L contain the relevant marginal of κ, and
Q
C:C∈C\{L} φC
φV ∗ = Q .
S:S∈S\{S ∗ } φS

Now let V ∗ send its message back to L. To do this, it needs to calculate φ↓S
V ∗ . But

since S ∗ ⊆ C ∗ , and φC ∗ = φ↓C
V ∗ we have
∗ ∗
φ↓S ↓S
V ∗ = φC ∗

and sending a message from V ∗ to L is thus equivalent to sending a message from C ∗


to L. Thus, after this message has been sent, φL = κ↓L as desired.
84 Local computation

3.2.6 Alternative scheduling of messages


There are many other valid ways of scheduling the messages. One alternative is known
as local control:

[Link] Local control: Allow clique to send message if and only if it has already
received message from all other neighbours. Such messages are live.
Using this protocol, there will be one clique who first receives messages from all its
neighbours. This is effectively the root R in C OLLECT E VIDENCE and
D ISTRIBUTE E VIDENCE.
Additional messages never do any harm (ignoring efficiency issues) as κ is invariant
under message passing.
Exactly two live messages along every branch is needed.

3.2.7 Alternative computations


There are many other variants of the message passing procedure, one important being
that of maximization of a function. To do this by the schemes above, we simply replace
sum-marginal with A–maxmarginal:

φ↓A
B (x) = max φB (y)
yB :yA∩B =xA∩B

This also satisfies consonance and distributivity and C OLLECT E VIDENCE yields
maximal value f . Further, D ISTRIBUTE E VIDENCE yields configuration with maximum
probability.
Since (3.1) remains invariant under both kinds of message passing, one can switch
freely between max- and sum-propagation.

3.2.8 An example
To illustrate the previous developments, we consider in detail a simple example. More
precisely, consider the directed acyclic graph in Fig. 3.1. and consider the Bayesian

B D B D

A F A F

C E C E

F IG . 3.1. A directed acyclic graph to be used as base for a Bayesian network and its
moral graph.

network with all variables taking values in {0, 1} and conditional probabilities
Probability propagation 85

P (A = 1) = 3/4;
P (B = 1 | A = 1) = 3/4; P (B = 1 | A = 0) = 1/4;
P (C = 1 | A = 1) = 2/3; P (C = 1 | A = 0) = 1/2;
P (D = 1 | B = 1) = 3/4; P (D = 1 | B = 0) = 1/2;
P (E = 1 | C = 1) = 3/5; P (E = 1 | C = 0) = 1/2;
P (F = 1 | B, C) = (B + C)/2.

We now wish to calculate, for example, P (B = 1 | E = 1, F = 1) by probability


propagation and proceed through each of the steps previously described.
Moralization yields the undirected graph to the right in Fig. 3.1. As this graph is
already chordal, there is no need for triangulation.
Next, the cliques of the graph are arranged in a junction tree, for example as displayed
in Fig. 3.2. For the initialization we assign nodes A, B, C to ABC, D to BD, E to

ABC BC BCF B BD

CE

F IG . 3.2. Junction tree for the moral graph of the Bayesian network in Fig. 3.1.

EC, and F to BCF which yields the clique potentials in Table 3.1, whereas the
separator potentials all are initialized with values 1.
We have now initialized the system so we can calculate any conditional probability of
interest.
To obtain P (B = 1 | E = 1, F = 1), we first incorporate the information that
E = F = 1 into the tables and obtain the updated tables in Table 3.2. This is simply
done by replacing entries corresponding to values of E = 0 or F = 0 by zero.
We are now ready for message passing, but need to choose a root clique; if we only
want to get P (B = 1 | E = 1, F = 1), we can make things easy for ourselves by
choosing a root clique containing B, for example BD. Then we can avoid
D ISTRIBUTE E VIDENCE as C OLLECT E VIDENCE to BD alone yields the correct BD
marginal. D ISTRIBUTE E VIDENCE is only needed if we wish to calculate more
probabilities.
86 Local computation

TABLE 3.1. Initial clique potentials for the junction tree in Fig. 3.2.
Clique State Potential
ABC 1 1 1 3/4 × 3/4 × 2/3 = 3/8
1 1 0 3/4 × 3/4 × 1/3 = 3/16
1 0 1 3/4 × 1/4 × 2/3 = 1/8
1 0 0 3/4 × 1/4 × 1/3 = 1/16
0 1 1 1/4 × 1/4 × 1/2 = 1/32
0 1 0 1/4 × 1/4 × 1/2 = 1/32
0 0 1 1/4 × 3/4 × 1/2 = 3/32
0 0 0 1/4 × 3/4 × 1/2 = 3/32
BCF 1 1 1 1
1 1 0 0
1 0 1 1/2
1 0 0 1/2
0 1 1 1/2
0 1 0 1/2
0 0 1 0
0 0 0 1
BD 1 1 3/4
1 0 1/4
0 1 1/2
0 0 1/2
CE 1 1 3/5
1 0 2/5
0 1 1/2
0 0 1/2
Probability propagation 87

TABLE 3.2. Revised clique potentials for the junction tree in Fig. 3.2 after incorporat-
ing information that E = F = 1.
Clique State Potential
ABC 1 1 1 3/8
1 1 0 3/16
1 0 1 1/8
1 0 0 1/16
0 1 1 1/32
0 1 0 1/32
0 0 1 3/32
0 0 0 3/32
BCF 1 1 1 1
1 1 0 0
1 0 1 1/2
1 0 0 0
0 1 1 1/2
0 1 0 0
0 0 1 0
0 0 0 0
BD 1 1 3/4
1 0 1/4
0 1 1/2
0 0 1/2
CE 1 1 3/5
1 0 0
0 1 1/2
0 0 0
88 Local computation

For C OLLECT E VIDENCE we now first send messages from ABC to BCF and from
CE to BCF . We find the separator potential on BC by marginalizing the ABC
potential over A and similarly for the separator C. We obtain the separator potentials
in Table 3.3.
TABLE 3.3. Separator potentials after sending messages from ABC to BCF and from
CE to BCF .
Sep State Pot Sep State Pot Sep State Pot
BC 1 1 3/8 + 1/32 = 13/32 C 1 3/5 B 1 1
1 0 3/16 + 1/32 = 7/32 0 1/2 0 1
0 1 1/8 + 3/32 = 7/32
0 0 1/16 + 3/32 = 5/32

The clique potentials in clique BCF then changes after message passing from ABC
to BCF and from CE to BCF as in Table 3.4.
TABLE 3.4. Clique potential for BCF after incorporating E = F = 1 and sending
messages from ABC to BCF and from CE to BCF .
Clique State Potential
BCF 1 1 1 1 × 13/32 × 3/5 = 39/160
1 1 0 0
1 0 1 1/2 × 7/32 × 1/2 = 7/128
1 0 0 0
0 1 1 1/2 × 7/32 × 3/5 = 21/320
0 1 0 0
0 0 1 0
0 0 0 0

Finally, C OLLECT E VIDENCE is completed after sending the last message from BCF
to BD, yielding the separator potentials in Table 3.5 and the clique potentials in
Table 3.6.
TABLE 3.5. Separator potentials after completion of C OLLECT E VIDENCE to the root
BD.
Sep State Pot Sep State Pot Sep State Pot
BC 1 1 13/32 C 1 3/5 B 1 39/160+7/128=191/640
1 0 7/32 0 1/2 0 21/320
0 1 7/32
0 0 5/32
Probability propagation 89

TABLE 3.6. Clique potentials for the junction tree in Fig. 3.2 after incorporating infor-
mation that E = F = 1 and C OLLECT E VIDENCE to the root BD.
Clique State Potential
ABC 1 1 1 3/8
1 1 0 3/16
1 0 1 1/8
1 0 0 1/16
0 1 1 1/32
0 1 0 1/32
0 0 1 3/32
0 0 0 3/32
BCF 1 1 1 39/160
1 1 0 0
1 0 1 7/128
1 0 0 0
0 1 1 21/320
0 1 0 0
0 0 1 0
0 0 0 0
BD 1 1 3/4 × 191/640 = 573/2560
1 0 1/4 × 191/640 = 191/2560
0 1 1/2 × 21/320 = 21/640
0 0 1/2 × 21/320 = 21/640
CE 1 1 3/5
1 0 0
0 1 1/2
0 0 0

The root clique BD now contains the correct (unnormalized) marginal potential and
the normalizing constant can be obtained by adding clique potentials in clique BD to
yield

P (E = 1, F = 1) = 573/2560+191/2560+21/640+21/640 = 932/2560 = 233/640.

The conditional probability we were looking for is then obtained by normalizing the
clique potential of BD and adding appropriate entries
640
P (B = 1 | E = 1, F = 1) = (573/2560 + 191/2560) = 191/233 ≈ 0.81974
233
90 Local computation

After C OLLECT E VIDENCE we can find the remaining conditional probabilities by


D ISTRIBUTE E VIDENCE, sending messages away from the root, should we so wish.
The first message is sent to BCF , changing the separator potential in B to be the
B-marginal of BD, i.e.

φB (1) = 573/2560 + 191/2560 = 764/2560 = 191/640,


φB (0) = 21/640 + 21/640 = 21/320,

and the BCF clique is then updated by the ratio of the new potential to the old, to
yield Table 3.7; note that indeed this does not change the BCF potential as the original
BD potential was not modified, so the BD clique has nothing new to report to BCF .

TABLE 3.7. Potential for BCF after incorporating E = F = 1, C OLLECT E VIDENCE


to BD, and sending messages from BD to BCF .
Clique State Potential
BCF 1 1 1 39/160 × 191/640 × 640/191 = 39/160
1 1 0 0
1 0 1 7/128 × 191/640 × 640/191 = 7/128
1 0 0 0
0 1 1 21/320 × 21/320 × 320/21 = 21/320
0 1 0 0
0 0 1 0
0 0 0 0

We next calculate separator potentials associated with messages from BCF to ABC
and CE and display these in Table 3.8.

TABLE 3.8. Final separator potentials after incorporating evidence E = F = 1, C OL -


LECT E VIDENCE , and subsequent D ISTRIBUTE E VIDENCE .

Sep State Pot Sep State Pot Sep State Pot


BC 1 1 39/160 C 1 39/160+21/320=99/320 B 1 191/640
1 0 7/128 0 7/128 0 21/320
0 1 21/320
0 0 0

Note that all separator potentials add up to the general normalizing constant 233/640.
Probability propagation 91

Finally, updating the clique potentials in ABC and CE yields the potentials in
Table 3.9.
TABLE 3.9. Final clique potentials after incorporating information that E = F = 1,
C OLLECT E VIDENCE, and subsequent D ISTRIBUTE E VIDENCE.
Clique State Potential
ABC 1 1 1 3/8 × 39/160 × 32/13 = 9/40
1 1 0 3/16 × 7/128 × 32/7 = 3/64
1 0 1 1/8 × 21/320 × 32/7 = 3/80
1 0 0 1/16 × 0 = 0
0 1 1 1/32 × 39/160 × 32/13 = 3/160
0 1 0 1/32 × 7/128 × 32/7 = 1/128
0 0 1 3/32 × 21/320 × 32/7 = 9/320
0 0 0 0
BCF 1 1 1 39/160
1 1 0 0
1 0 1 7/128
1 0 0 0
0 1 1 21/320
0 1 0 0
0 0 1 0
0 0 0 0
BD 1 1 573/2560
1 0 191/2560
0 1 21/640
0 0 21/640
CE 1 1 3/5 × 99/320 × 5/3 = 99/320
1 0 0
0 1 1/2 × 7/128 × 2/1 = 7/128
0 0 0

Again we note that all clique potentials add up to 233/640 and if we wish to calculate,
say P (A = 1 | E = 1, F = 1), we simply add up and normalize
640
P (A = 1 | E = 1, F = 1) = (9/40 + 3/64 + 3/80) = 198/233 ≈ 0.84979.
233
Suppose we instead wish to identify the most probable configuration of the variables
A, B, C, D given E = 1 and F = 1. This can be found by using maximum in the
marginalizations instead of sums. We do not need to start afresh, as the current
92 Local computation

potentials in the junction tree have all information needed. For a change, we might now
choose the clique BCF as root and the first step is then to send messages from all the
other cliques to BCF yielding new separator potentials as displayed in Table 3.10.

TABLE 3.10. Separator potentials after incorporating evidence E = F = 1, standard


C OLLECT E VIDENCE and D ISTRIBUTE E VIDENCE, and subsequent max-messages to
new root clique BCF .
Sep State Pot Sep State Pot Sep State Pot
BC 1 1 9/40 C 1 99/320 B 1 573/2560
1 0 3/64 0 7/128 0 21/640
0 1 3/80
0 0 0

The updated clique potential for BCF is displayed in Table 3.11.

TABLE 3.11. Potential for BCF after incorporating E = F = 1, C OLLECT E VI -


DENCE and D ISTRIBUTE E VIDENCE, and sending max-messages to BCF .
Clique State Potential
BCF 1 1 1 39/160 × 9/40 × 160/39 × 99/320 × 320/99 × 573/2560 × 640/191 = 27/160
1 1 0 0
1 0 1 7/128 × 3/64 × 128/7 × 7/128 × 128/7 × 573/2560 × 640/191 = 9/256
1 0 0 0
0 1 1 21/320 × 3/80 × 320/21 × 99/320 × 320/99 × 21/640 × 320/21 = 3/160
0 1 0 0
0 0 1 0
0 0 0 0

Next, for D ISTRIBUTE E VIDENCE, we send max-messages away from BCF to obtain
the final separator potentials, displayed in Table 3.12.

TABLE 3.12. Final separator potentials after incorporating E = F = 1, standard C OL -


LECT E VIDENCE and D ISTRIBUTE E VIDENCE , and subsequent full max-propagation.

Sep State Pot Sep State Pot Sep State Pot


BC 1 1 27/160 C 1 27/160 B 1 27/160
1 0 9/256 0 9/256 0 3/160
0 1 9/320
0 0 0
Probability propagation 93

The final step is incorporating the messages in the other cliques, the results being
displayed in Table 3.13

TABLE 3.13. Final clique potentials after incorporating information that E = F = 1,


and a full max-propagation.
Clique State Potential
ABC 1 1 1 9/40 × 27/160 × 40/9 = 27/160
1 1 0 3/64 × 9/256 × 64/3 = 9/256
1 0 1 3/80 × 9/320 × 80/3 = 9/320
1 0 0 0
0 1 1 3/160 × 27/160 × 40/9 = 9/640
0 1 0 1/128 × 9/256 × 64/3 = 3/512
0 0 1 9/320 × 9/320 × 320/9 = 9/320
0 0 0 0
BCF 1 1 1 27/160
1 1 0 0
1 0 1 9/256
1 0 0 0
0 1 1 3/160
0 1 0 0
0 0 1 0
0 0 0 0
BD 1 1 573/2560 × 27/160 × 2560/573 = 27/160
1 0 191/2560 × 27/160 × 2560/573 = 9/160
0 1 21/640 × 3/160 × 640/21 = 3/160
0 0 21/640 × 3/160 × 640/21 = 3/160
CE 1 1 99/320 × 27/160 × 320/99 = 27/160
1 0 0
0 1 7/128 × 9/256 × 128/7 = 9/256
0 0 0

Note again that all clique and separating potentials have the same maximal value
which is the probability of the most likely configuration jointly with the evidence

P (A = B = C = D = E = F = 1) = 27/160 ≈ .16875

and hence

P (A = B = C = D = 1 | E = F = 1) = 27/160 × 640/233 = 108/233 ≈ .54936.


94 Local computation

3.3 Exercises
Exercise 3.1 Consider the DAG D with arrows
A → C, B → C, B → D, C → E, D → F, E → G, E → H, F → G, G → J, I → J.
(a) Find the moral graph Dm of D;

(b) Find a minimal chordal cover G of Dm , i.e. a chordal graph G ⊃ Dm with the property that
removal of any edge in G which is not an edge in Dm will not be chordal;

(c) Arrange the cliques of G in a junction tree;

(d) For a specification of all conditional distributions pv | pa(v) , v ∈ V , allocate appropriate


potentials to the junction tree to prepare for probability propagation.
Exercise 3.2 Consider random variables X1 , . . . , X6 taking values in {−1, 1} and having
distribution P with joint probability mass function determined as

p(x) ∝ exp{θ(x1 x2 + x2 x3 + x2 x5 + x3 x4 + x3 x5 + x3 x6 )},

where θ 6= 0.
(a) Find the dependence graph of P determined as the smallest graph G so that P is Markov
(pairwise, local, and globally) w.r.t. G and identify its cliques;

(b) Verify that G is chordal;

(c) Set up an appropriate junction tree for probability propagation;

(d) Allocate potentials to cliques;

(e) Calculate P (X6 = 1 | X1 = 1, X4 = 1) by probability propagation.


4
MULTIVARIATE NORMAL MODELS

4.1 Basic facts and concepts


4.1.1 Notation
The graphical models in this chapter have a particularly simple interpretation and a
rather detailed statistical theory. The models assume that the variables observed follow
a regular multivariate normal distribution. Conditional independence restrictions in the
multivariate normal distribution can be expressed in a simple fashion through zero
restrictions on the inverse covariance matrix.
We will need some special notation for vectors in R|Γ| and matrices with entries
indexed by Γ. An arbitrary element of R|Γ| is denoted as any of
y = yΓ = (yγ )γ∈Γ ,
and for an arbitrary subset d ⊆ Γ we let
yd = (yγ )γ∈d
denote a |d|-dimensional subvector of y.
A |Γ| × |Γ| matrix with entries indexed by Γ is written as any of
A = AΓ = AΓΓ = {aγµ }γ,µ∈Γ ,
whereas for two arbitrary subsets d and e of Γ we let
Ade = {aγµ }γ∈d,µ∈e
denote a |d| × |e| submatrix of A. For a partitioning Γ = d ∪ e with d ∩ e = ∅ we can
then use any of the block matrix notations
! !
Ad Ade Add Ade
A= = .
Aed Ae Aed Aee

For a |d| × |e| matrix A = {aγµ }γ∈d,µ∈e we let [A]Γ denote the matrix obtained from
A by filling up with zero entries to obtain full dimension |Γ| × |Γ|, i.e.
(
Γ
 aγµ if γ ∈ d, µ ∈ e
[A] γµ =
0 otherwise.
When matrix operations are combined with forming submatrices, we use the
convention that the matrix operation is performed first, i.e.
A−1 −1

d = A d
.
96 Multivariate normal models

4.1.2 The saturated model


The model where no conditional independence restrictions are assumed to hold is
called the saturated model as in the previous chapter. This model is concerned with a
sample (y 1 , . . . , y n ) of independent random vectors from a multivariate normal
distribution N|Γ| (0, Σ), where Σ is unknown and arbitrary apart from the restriction
that Σ is assumed to be positive definite. The case where also the mean ξ is unknown is
not much different, but the notation is considerably more cumbersome.

[Link] Exact results Using (D.1), we get the likelihood function, expressed in the
parameter K as
n
Y
L(K) = (2π)−n|Γ|/2 (det K)n/2 exp {−hy ν , Ky ν i/2}
ν=1
( n
)
X
n/2 ν > ν
∝ (det K) exp − (y ) K(y )/2
ν=1

= (det K)n/2 exp − tr(Ky > y/2)



(4.1)

We have let y be the n × |Γ| matrix with (y ν )> as rows. For later use we introduce the
matrix of sum of squares and products W as
n
X
w= y ν (y ν )> = y > y.
ν=1
.
To maximize the likelihood function, we choose to take advantage of the theory of
exponential models. Although it is unnecessary in this particular case, it turns out to be
convenient when we later discuss graphical models with conditional independence
restrictions.
The expression (4.1) identifies the statistical model determined by the family of
multivariate normal distributions with unknown concentration matrix K as an
exponential model. To see this, we first recall from (C.5) that

hA, Bi = tr(A> B)

defines an inner product on the vector space of matrices of any fixed dimension, in
particular also on the subspace S|Γ| of symmetric |Γ| × |Γ| matrices.
We define the canonical parameter as θ = K, the base measure µ as Lebesgue measure
on Rn×|Γ| , and the canonical statistic as t(y) = −w/2. Then the exponent in (4.1) can
be written as
− tr(Kw/2) = hθ, t(y)i.
The cumulant function is found as

ψ(K) = log{(2π)n|Γ|/2 (det K)−n/2 } = (n|Γ|/2) log(2π) − (n/2) log det K. (4.2)
Basic facts and concepts 97

Since the integral Z


>
e−y Ky/2
dy
R|Γ|
is finite if and only if K is positive definite, it follows that the model is a regular
exponential model.
The basic estimation result for the saturated model is given in the theorem below.
Theorem 4.1 In the saturated multivariate normal model, the maximum likelihood
estimate of the unknown covariance matrix exists if and only if

w = y> y

is positive definite. This happens with probability one if n ≥ |Γ| and never when
n < |Γ|. When the estimate exists it is given as

Σ̂ = w/n = y > y/n.

Proof The rank of W is at most n by construction, so if n < |Γ| the maximum


likelihood estimate does not exist. The matrix W is positive semidefinite if and only if
one of its principal minors (subdeterminants along the diagonal) is equal to zero. The
set of y’s such that this happens is thus the intersection of a set of polynomial
equations, also known as an algebraic variety. Such a set is either everything (which
happens when n < |Γ|) or a Lebesque null-set. If we choose y ν , ν = 1, . . . , n to
contain at least n linearly independent vector, W = w(y) is positive definite, so if
n ≥ |Γ| it must be a Lebesgue null-set.
The main result about estimation in exponential models asserts that if the maximum
likelihood estimate exists it is determined by the equation

E(−Y > Y /2) = −nΣ/2 = −y > y/2

which completes the proof. 2

4.1.3 Conditional independence


Before the graphical models are described in detail, it seems appropriate to clarify the
connection between conditional independence and the multivariate normal distribution.
Let Y = (Yγ )γ∈Γ be a random vector in R|Γ| following a multivariate normal
distribution with mean 0 and covariance matrix Σ. Assume the covariance to be regular
such that the concentration matrix K = Σ−1 is well defined. Conditional independence
in the multivariate normal distribution is simply reflected in the concentration matrix
of the distribution through zero entries. This fact is formalized below.
Proposition 4.2 Assume that Y ∼ N|Γ| (0, Σ), where Σ is regular. Then it holds for
γ, µ ∈ Γ with γ 6= µ that

Yγ ⊥
⊥ Yµ | YΓ\{γ,µ} ⇐⇒ kγµ = 0,

where K = {kαβ }α,β∈Γ = Σ−1 is the concentration matrix of the distribution.


98 Multivariate normal models

Proof This is a direct consequence (1.8) which identifies the matrix


!
kγγ kγµ
K{γ,µ} = (4.3)
kµγ kµµ

as the concentration matrix of the conditional distribution of Y{γ,µ} given YΓ\{γ,µ} .


The covariance matrix of this conditional distribution is therefore equal to
!
1 kµµ −kγµ
Σγ,µ | Γ\{γ,µ} = . (4.4)
det K{γ,µ} −kµγ kγγ

The desired independence now follows from Corollary D.5. 2


This fundamental relation forms the basis for all models treated in this chapter.
Corresponding to the different Markov properties studied in Chapter 2, we have
multivariate normal models defined through restricting particular elements in suitable
concentration matrices to be equal to zero.
The entries in the concentration matrix K have a simple interpretation. It follows from
(1.4) and (1.5) that the diagonal elements kγγ are reciprocals of the conditional
variances, given the remaining variables, i.e.

kγγ = V(Yγ | YΓ\{γ} )−1

for all γ ∈ Γ. Let further C = {cαβ }α,β∈Γ be the matrix obtained by scaling K to have
all diagonal elements equal to one,
kγµ
cγµ = p .
kγγ kµµ

Then cγµ , the off-diagonal elements in C, are equal to the negative partial correlation
coefficients

Cov(Yγ , Yµ | YΓ\{γ,µ} )
ργµ | Γ\{γ,µ} = = −cγµ .
V(Yγ | YΓ\{γ,µ} )1/2 V(Yµ | YΓ\{γ,µ} )1/2

This follows from (4.4) since


kµµ
V(Yγ | YΓ\{γ,µ} ) =
kγγ kµµ − (kγµ )2

and
−kγµ
Cov(Yγ , Yµ | YΓ\{γ,µ} ) = .
kγγ kµµ − (kγµ )2
Note that it also holds that
2 2 det Σ det ΣΓ\{γ,µ}
ργµ | Γ\{γ,µ} = (cγµ ) = 1 − . (4.5)
det ΣΓ\{γ} det ΣΓ\{µ}
Covariance selection models 99

This follows from the relations

det Σ = det ΣΓ\{γ} V(Yγ | YΓ\{γ} ) = det ΣΓ\{γ} /kγγ

and
kµµ
det ΣΓ\{µ} = det ΣΓ\{γ,µ} V(Yγ | YΓ\{γ,µ} ) = det ΣΓ\{γ,µ} ,
kγγ kµµ − (kγµ )2
which both are easy consequences of (1.7). From Example 1.20 we have that the
conditional distribution of Yγ given YΓ\{γ} = yΓ\{γ} is univariate normal. Writing the
conditional expectation as
X
ξγ + βγµ | Γ\{γ} (yµ − ξµ )
µ∈Γ\{γ}

and using (1.6) we find the partial regression coefficient as

βγµ | Γ\{γ} = −kγµ /kγγ .

4.1.4 Interaction
It is illuminating to investigate the additive terms in the logarithm of the normal
density, thereby highlighting the analogy to interaction expansions of discrete models.
Using the expression (D.1) for the multivariate normal density we get
1X X
log f (y) = c − hy, K(y)i/2 = c − kγγ yγ2 − kγµ yγ yµ (4.6)
2
γ∈Γ {γ,µ}

where {γ, µ} in the sum above represent all unordered pairs of elements of Γ, and c is
a constant.
The expansion shows that the logarithm of the density is additively composed of
quadratic main effects with coefficients −kγγ /2and quadratic interactions with
coefficients −kγµ . We will sometimes use the terms interactions and main effects
referring directly to the coefficients and also omit the negative signs and the division
by two. So, for example, we will refer to kγγ as the quadratic main effect of the
variable γ, although this, strictly speaking, should refer to −kγγ yγ2 /2.
We emphasize that the interaction terms of highest order in (4.6) involve pairs of
variables, and there are no terms involving groups of variables with three or more
elements. This is in contrast to the discrete case and it follows in particular that within
the normal distribution there are no hierarchical interaction models which are not
conformal.

4.2 Covariance selection models


The interaction models for the multivariate normal distribution are called covariance
selection models. They are determined by assuming conditional independence of
selected pairs of variables, given the remaining ones.
100 Multivariate normal models

Thus, if G = (Γ, E) is an undirected graph and Y = YΓ is a random variable taking


values in R|Γ| , the Gaussian graphical model or covariance selection model for Y with
graph G is given by assuming that Y follows a multivariate normal distribution which
obeys the undirected pairwise Markov property with respect to G. Since the density is
positive and continuous, this implies the global and local Markov properties and the
density factorizes.
It follows from Proposition 4.2 that this is equivalent to assuming the quadratic
interactions kγµ to be equal to zero for all pairs γ, µ which are not adjacent in G. The
expression (4.6) for the normal density then reduces to
1X X
log f (y) = c − kγγ yγ2 − kγµ yγ yµ .
2
γ∈Γ γµ∈E

Let S(G) denote the set of symmetric matrices A satisfying for all γ, µ ∈ Γ that

γ 6∼ µ =⇒ aγµ = 0

and S + (G) those elements of S(G) that are positive definite. Then the covariance
selection model for Y can be compactly described as

Y ∼ N|Γ| (0, Σ), Σ−1 ∈ S + (G).

4.2.1 Maximum likelihood estimation


[Link] The likelihood equations Consider a sample (y 1 , . . . , y n ) from a covariance
selection model. The likelihood function is obtained from (4.1):

L(K) ∝ (det K)n/2 exp − tr(Ky > y/2) .




For an arbitrary matrix A, we let A(G) denote the matrix with entries
(
0 if γ 6∼ µ
A(G)γµ =
aγµ otherwise.

Exploiting that K ∈ S(G) we find that

tr(Ky > y) = tr{Kw(G)},

where we have let w = y > y. Thus the likelihood function reduces to

L(K) ∝ (det K)n/2 exp [− tr{Kw(G)/2}] . (4.7)

The restriction which is imposed on the distribution of Y by the model is linear in the
canonical parameter K. Hence the hypothesis K ∈ S + (G) is an affine hypothesis and
it follows that a covariance selection model is itself a regular exponential model with
canonical statistic equal to −w(G)/2. The following result about maximum likelihood
estimation then follows directly.
Covariance selection models 101

Theorem 4.3 In the covariance selection model, the maximum likelihood estimate of
the unknown covariance matrix exists if

w = y> y

is positive definite. If n ≥ |Γ| this happens with probability one. When the estimate
exists it is determined as the unique solution to the system of equations

nσ̂ρρ = wρρ , nσ̂γµ = wγµ , ρ ∈ Γ, {γ, µ} ∈ E,

which also satisfies the model restriction Σ−1 ∈ S + (G).


Proof The maximum likelihood estimates are obtained directly as for the saturated
model:
E{−SS(G)/2} = −nΣ(G)/2 = −w(G)/2
whence the result follows. 2
Note that the condition n ≥ |Γ| for existence of the maximum likelihood estimate in
this case is only sufficient, not necessary. From the likelihood equations it follows that
a necessary condition is that n ≥ maxC∈C |C|, as otherwise wC would not all be
positive definite. However, this condition is not sufficient for the existence. The
problem has been studied in some detail by Buhl (1993), Uhler (2012), and Gross and
Sullivant (2018). We shall return to a discussion of this issue later in Section 4.3.2.
An alternative way of writing the estimating equations is

nΣ̂cc = wcc for all c ∈ C, (4.8)

where C is the set of cliques of G.


In a general covariance selection model no exact distributional results concerning the
estimate of the covariance matrix are available.
The asymptotic distribution of the maximum likelihood estimate is multivariate normal
from standard exponential family theory. The asymptotic covariance in the case of a
general covariance selection model is less straightforward.

[Link] Iterative proportional scaling Theorem 4.3 identifies which equations to


solve in order to maximize the likelihood function, but it gives no advice on doing so.
In general the equations concerning the estimates for the covariance matrix have to be
solved by iterative methods. Below we describe one of these, which is based upon the
method of iterative partial maximization described in Section A.4. It consists of
iteratively and successively adjusting the covariance matrices for the clique marginals
appearing in (4.8). The algorithm was discussed in detail by Speed and Kiiveri (1986)
along with other algorithms.
Let w from a sample (y 1 , . . . , y n ) be given, and consider a covariance selection model
with graph G. For K ∈ S + (G) and c ∈ C, define the operation of ‘adjusting the
c-marginal’ by

(Tc K)cc = Kcc + n(wcc )−1 − (Kcc


−1 −1
) = Kcc + n(wcc )−1 − (Σcc )−1 , (4.9)
102 Multivariate normal models

leaving all other entries of K unchanged. This operation is clearly well defined if wcc
is positive definite. If we let a = Γ \ c and exploit (C.2) we find
−1
(K −1 )cc = Σcc = Kcc − Kca (Kaa )−1 Kac

, (4.10)

giving the alternative expression


!
n(wcc )−1 + Kca (Kaa )−1 Kac Kca
Tc K = . (4.11)
Kac Kaa

If a is large and c is small, the expression (4.11) is computationally heavy as a large


matrix Kaa needs to be inverted, so it may be easier to calculate the update using (4.9).
The latter demands that Σcc is available. After updating K, Σ can be updated simply
using (C.3) with ∆ = n(wcc )−1 − (Σcc )−1 and C > = (Ic : 0a ) so that
C∆C > = [∆]Γ . We then get

Tc Σ = Σ − Σ[H]Γ Σ

where H = (∆−1 + (Σcc )−1 )−1 .


Using the expression (4.11) for Tc K, we find the covariance Σ̃cc corresponding to the
adjusted concentration matrix

Σ̃cc = (Tc K)−1


cc
−1
= n(wcc )−1 + Kca (Kaa )−1 Kac − Kca (Kaa )−1 Kac


= wcc /n, (4.12)

hence Tc K does indeed adjust the marginals. From (4.9) it is seen that the pattern of
zeros in K is preserved, i.e. Tc K is in S(G) if K is, and applying Lemma C.1 to (4.11)
shows that it stays positive definite. Hence the adjusted concentration matrix Tc K is in
S + (G) if K is.
In fact, it is not difficult to see that the operation Tc also scales proportionally in the
sense that
f (yc | wcc /n)
f {y | (Tc K)−1 } = f (y | Σ) .
f (yc | Σcc )
This clearly demonstrates the analogy to the procedure used for hierarchical log–affine
models.
Next we choose any ordering (c1 , . . . , ck ) of the cliques in G. Choose further an
arbitrary starting value K0 ∈ S + (G) and define recursively for r = 0, 1, . . .

Kr+1 = (Tc1 · · · Tck )Kr . (4.13)

Then we have
Theorem 4.4 Consider a sample from a covariance selection model with graph G and
assume that w is such that the maximum likelihood estimate K̂ of K exists. Then

K̂ = lim Kr .
r→∞
Decomposable models 103

Proof We must realize that this is a special instance of iterative partial maximization,
discussed in Section A.4. To do this, we let
Θ0 = K ∈ S + (G) | L(K) ≥ L(K0 ) ,


where K0 ∈ S + (G) is chosen arbitrarily, for example as K0 = I. Since a covariance


selection model is a regular exponential model and the maximum likelihood estimate is
assumed to exist, Θ0 is compact.
It is obvious that the transformation Tc is continuous for all c ∈ C and, as mentioned,
also that it maps S + (G) into itself.
Next we establish that Tc K maximizes the likelihood function over the section
Θc = Θc (K) = A ∈ S + (G) | Aaa = Kaa , Aac = Kac ,


where we have let a = Γ \ c. In Θc it holds that


tr{Kw(G)/2}
= tr{Kcc wcc /2} + tr{Aaa w(G)aa /2} + tr{Aac w(G)ca }.
Using the expression (4.7) for the likelihood function, we identify the subfamily
determined by the section as an exponential family with canonical statistic −wcc /2,
leading to the likelihood equations
−nΣcc /2 = −wcc /2.
Using (4.12) identifies Tc (K) as maximizer. Since we know already that the global
maximum of L is unique, the theorem now follows from Proposition A.15. 2

4.3 Decomposable models


Here we study the special features of covariance selection models whose interaction
graphs are decomposable. Theorem B.14 implies that these models are built up from
saturated models by successive direct joins. This structure makes it possible to break
down the statistical analysis of a decomposable model into small analyses of saturated
submodels in an elegant way.

4.3.1 Basic factorizations


As shown in Proposition B.10, we can number the cliques of a decomposable graph G
to form a perfect sequence, i.e. a sequence C1 , . . . , Ck where each combination of
subgraphs induced by Hj−1 = C1 ∪ · · · ∪ Cj−1 and Cj is a decomposition. Repeated
use of (2.27) gives
Qk Q
j=1 f (yCj ) f (yC )
f (y) = Qk = Q C∈C ν(S)
, (4.14)
j=2 f (ySj ) S∈S f (yS )

where Sj = Hj−1 ∩ Cj is the sequence of separators and ν(S) is the multiplicity of S,


i.e. the number of times S occurs in a perfect sequence; see Proposition B.18 and
Corollary B.18. We further find
104 Multivariate normal models

X Γ
X Γ
K = Σ−1 = [KC ] − ν(S) [KS ]
C∈C S∈S
Xh iΓ X h iΓ
−1 −1
= (ΣC ) − ν(S) (ΣS )
C∈C S∈S

as well as Q
C∈Cdet ΣC
det Σ = Q . (4.15)
S∈S (det ΣS )ν(S)

4.3.2 Maximum likelihood estimation


[Link] Exact results Previously we derived a formula for combining maximum
likelihood estimates of concentration matrices in two covariance selection models to
find the estimate in the model formed by their direct join.
Combining this with the usual simple estimates in the saturated models, explicit
formulae for the maximum likelihood estimate in a decomposable covariance selection
model can be derived. More precisely we find that
 
k h k h
X −1 iΓ X −1 iΓ 
K̂ = n wCj − wSj . (4.16)
 
j=1 j=2

Using the alternative expression where the separators and cliques are not numbered
and the expression for the determinant (4.15), we also get
Proposition 4.5 In a decomposable covariance selection model with graph G, the
maximum likelihood estimate of the mean vector and concentration matrix exists with
probability one if and only if n > maxC∈C |C|. It is then given as
( )
Xh iΓ X h iΓ
−1 −1
ξˆ = ȳ, K̂ = n (wC ) − ν(S) (wS ) , (4.17)
C∈C S∈S

where C is the set of cliques of G and S the separators with multiplicities ν(S). The
determinant of the estimate can be calculated as
Q ν(S)
(det wS )
det K̂ = n|Γ| S∈S
Q . (4.18)
C∈C det wC

4.4 The graphical lasso


The graphical lasso maximizes a penalized likelihood function

2`pen (K)/n = log det K − tr(KS) − λ||K||1

where S = W/n. There are efficient methods for solving this problem, using lasso
regression and techniques from convex optimization. The maximizing value K̂ λ will
The graphical lasso 105

λ
typically have k̂uv = 0 for several uv and will thus identify an independence graph. In
that way, the graphical lasso is often used for graphical model selection.
It is important to realize that the graphical lasso is not scale-invariant. More precisely,
if we let Y = A−1 X, where A is a diagonal matrix, then Y has covariance
ΣY = A−1 ΣX A−1 and SY = A−1 SX A−1 ; similarly, the concentration matrix of Y is
K Y = AK X A. Thus
X
2`pen (K Y )/n = 2 log au + log det K X
− tr(AK X AA−1 SA−1 ) − λ||AK X A||1
= const + log det K X − tr(K X SX ) − λ||AK X A||1
∼ 2`pen (K X )/n − λ(||AK X A||1 − ||K X ||1 ).

Data are therefore often first scaled by using the empirical correlation matrix R as
input instead of the covariance matrix S = W/n, yielding a scale-invariant procedure.

4.4.1 A constrained optimization problem


Consider the convex optimization problem for c > 0:

minimize − log det(K) + tr(KS)


subject to ||K||1 ≤ c,

The Lagrangian for this problem is

L(K, λ) = − log det(K) + tr(KS) + λ(||K||1 − c)

which, save for a constant and a sign, is the lasso-penalized likelihood.


The KKT conditions for an optimal pair (K ∗ , λ∗ ) are thus

λ∗ (||K ∗ ||1 − c) = 0; S − Σ∗ + λ∗ Γ∗ = 0

where Σ∗ = (K ∗ )−1 and Γ∗ ∈ sign(K ∗ ). Thus the constrained problem is


‘equivalent’ to the penalized problem, through the correspondence c ↔ λ∗ . Note in
particular the subgradient equation for optimality:

S − Σ + λ∗ Γ = 0

which is simply the subgradient equation for the lasso-penalized likelihood.

4.4.2 Blocking the subgradient equation


If we write the subgradient equation in block matrix form with the lower right corner
being 1 × 1 we get
! ! !
S11 s12 Σ11 σ12 Γ11 γ12
− +λ = 0.
s>
12 s22
>
σ12 σ22 >
γ12 1
106 Multivariate normal models

Focusing on the upper right block of this equation we get

s12 − σ12 + λγ12 = 0.


−1
Using the identity (Σ11 )−1 σ12 = −k22 k12 = β and thus sign(k12 ) = − sign(β) we
can rewrite this equation as

Σ11 β − s12 + λ sign(β) = 0. (4.19)

Now recall that the lasso regression problem is

minimize (y − Zβ)> (y − Zβ)/2n + λ||β||1 .

The subgradient equation for this problem becomes


1
Z > Zβ − Z > y + λ sign(β) = 0.

(4.20)
n
Comparing this to the subgradient equation (4.19) for the graphical lasso we see that
they differ only by using Z > Z/n instead of Σ11 since Z > y/n = s12 .
There is a simple iterative cyclic descent algorithm for solving the lasso equation
(4.20), and the same algorithm can therefore be used to solve equation (4.19). Define
the soft threshold function as

T (x, t) = sign(x)(|x| − t)+ .

The algorithm then becomes:

Algorithm 4.1 G RAPHICAL LASSO for maximizing the penalized Gaussian likelihood
Input: Empirical covariance matrix S; penalty parameter λ;
Output: Glasso estimate K̂ λ ; concentration graph Ĝ λ .
1. Initialize Σ ← S + λI; βuv ← 0, u, v ∈ V .
2. Repeat for v ∈ V until convergence
(a) For u ∈ V \ v until convergence: 
P
βuv ← T suv − w6=v σuw βwv ; λ /σvv ;
P
(b) For u ∈ V \ {v} do σuv ← w6=v σuw βwv ;
3. For v ∈ V do:
P
(a) kvv ← 1/(σvv − w6=v σvw βwv )
(b) For u ∈ V \ v do kuv ← −βuv kvv .
4. Return K and incidence graph of K.

An alternative algorithm for maximizing the penalized likelihood is just modifying IPS
updates on 2 × 2 matrices. More precisely, we are simply iteratively maximizing the
penalized likelihood over Kcc for c = {u, v}, keeping (Kca , Kaa ) fixed, where
The graphical lasso 107

Algorithm 4.2 Modified 2 × 2 IPS algorithm for computing K̂ λ with lasso penalty.
Input: Graph G = (V, E), sample covariance matrix S, penalty parameter λ.
Output: Glasso estimate K̂ λ ; concentration graph Ĝ λ .

1. Initialize S = S + λI, K = {diag(S)}−1 , Σ = diag(S);


2. Repeat for each c = {u, v} until convergence:
Calculate: ∆ = (Scc )−1 − (Σcc )−1 .
And further
( p
2 s s
∗ ( 1 + 4δuv uu vv − 1)/(2δuv ) if δuv 6= 0
suv =
0 otherwise

and further 

 suv + λ if suv + λ < suv

s̃uv = suv − λ if suv − λ > s∗uv
 ∗

suv otherwise.
and further
!
suu s̃uv ˜ = (S̃cc )−1 − (Σcc )−1
S̃cc = , ∆
s̃uv svv

˜ H = {∆
Update Kcc = Kcc + ∆; ˜ −1 + (Σcc )−1 }−1 ; Σ − Σ[H]Γ Σ
3. Return K, Σ, and incidence graph of K.

a = V \ c, and then cycling through all pairs c until convergence. This algorithm is
again a special case of iterative partial maximization and it is described in more detail
in Algorithm 4.2.
To see that this algorithm is convergent, we just need to verify that each update
depends continuously on its input and use Proposition A.15, since the algorithm is a
special case of Iterative Partial Maximization.
108 Multivariate normal models

4.5 Exercises
Exercise 4.1 Show that any independence model generated by a regular Gaussian distribution is
a compositional graphoid.

Exercise 4.2 A positive definite symmetric matrix K is an M-matrix (after Minkowski) if all
off-diagonal elements are non-positive, i.e. kαβ ≤ 0 for all α 6= β. Let Σ = K −1 .
Show that if K is a M-matrix, all off-diagonal elements of Σ are non-negative i.e. σαβ ≥ 0 for
all α 6= β.

Exercise 4.3 Let X1 , X2 , X3 , X4 , X5 be independent with Xi ∼ N (0, 1). Define recursively

Y1 ← X1 , Y2 ← X2 + Y1 , Y3 ← 2X3 + Y2 , Y4 ← X4 + Y3 , Y5 ← X5 + 2Y4 .

(a) Find the covariance matrix Σ of Y ;

(b) Find the concentration matrix K = Σ−1 of Y .

(c) Construct the dependence graph of Y ;

(d) Find the conditional distribution of Y3 given Y1 = y1 , Y2 = y2 , Y4 = y4 , Y5 = y5 .

Exercise 4.4 Consider a Gaussian distribution N5 (0, Σ) with K = Σ−1 satisfying the
conditional independence restrictions of the graph G = (V, E) with V = {1, 2, 3, 4, 5} and
E = {{1, 2}, {1, 3}, {1, 4}, {1, 5}}.
(a) Show that the determinant of Σ satisfies

5
Y 5
Y
det Σ = σii (1 − ρ21j )
i=1 j=2

where ρij is the correlation between Xi and Xj ;

(b) Express the covariance σ23 in terms of the variances σ11 , σ22 , σ33 , σ44 , σ55 and the covariances
σ12 , σ13 , σ14 , σ15 .

Exercise 4.5 Consider a Gaussian distribution N4 (0, Σ) with K = Σ−1 satisfying the
conditional independence restrictions of the graph G = (V, E) with V = {1, 2, 3, 4} and
E = {{1, 2}, {2, 3}{1, 4}{3, 4}}.
(a) Find two equations of degree 3 in σ13 and σ24 expressing these in terms of σ11 , σ22 , σ33 , σ44
and the covariances σ12 , σ13 , σ14 , σ15 ;
Hint: Express the appropriate inverse element of the covariance matrix as a cofactor;

(b) Consider the likelihood equations based on observing a Wishart matrix W = w with
W ∼ W(n, Σ). Use the answer under (a) to establish an equation of degree 5 for the maximum
likelihood estimate of σ13 .

(c) Assume next that σ11 = σ22 = σ33 = σ44 = 1 and σ12 = σ23 = σ34 = ρ and σ14 = −ρ.
Show that then ρ2 < 1/2.
Exercises 109

Exercise 4.6 Consider a Gaussian distribution N4 (0, Σ) with K = Σ−1 satisfying the
conditional independence restrictions of the graph G = (V, E) with V = {1, 2, 3, 4} and
E = {{1, 2}, {2, 3}, {3, 4}, {1, 4}}. Assume that the following Wishart matrix has been
observed, with 10 degrees of freedom:
 
5 1 4 4
1 10 2 5
.
 

4 2 10 2
4 5 2 8

(a) Perform one full cycle of the IPS algorithm to find the MLE of the concentration matrix, starting
with K = I.

(b) Assume next that K = Σ−1 satisfies the conditional independence restrictions of the graph
G ∗ = (V, E ∗ ) with V = {1, 2, 3, 4} and E ∗ = {{1, 2}, {2, 3}, {3, 4}}. Find the maximum
likelihood estimate of the concentration matrix.
110 Multivariate normal models
APPENDIX A
SOME MATHEMATICAL PREREQUISITES

A.1 Measurable spaces


In this section we recall some of the main definitions and results from measure theory
that are used throughout the book. Consider a set X and let E be a collection of subsets
of X .
Definition A.1 We say that E is a σ–algebra on X , if it holds that
• X ∈E
• If A ∈ E, then Ac ∈ E
• If A1 , A2 , . . . ∈ E, then ∪∞
n=1 An ∈ E
If X is some set, and E is a σ–algebra on X , then we say that the pair (X , E) is a
measurable space. If D is a collection of subsets of X , then we define σ(D) to be the
smallest σ–algebra on X that contains D. For a σ–algebra E on X and a collection H
of subsets of X , we say that H is a generating system for E, if E = σ(H).
If it for some collection H of subsets of X holds for all A, B ∈ H that A ∩ B ∈ H,
then we say that H is stable under finite intersections.
Definition A.2 We say that H is a Dynkin class on X , if it holds that
1) X ∈ H ,
2) If A, B ∈ H with A ⊆ B, then B \ A ∈ H
3) If A1 , A2 , . . . ∈ H with A1 ⊆ A2 ⊆ . . ., then ∪∞
n=1 An ∈ H
We have
Theorem A.3. (Dynkin’s lemma) Let D ⊆ H ⊆ E be collections of subsets of X .
Assume that E = σ(D) and that D is stable under finite intersections. If furthermore H
is a Dynkin class, then H = E.
Definition A.4 Let (X , E) be a measurable space. We say that a function
µ : H → [0, ∞] is a measure (on (X , H)), if
1) µ(∅) = 0
P∞
2) If A1 , A2 , . . . ∈ H are pairwise disjoint sets, then µ(∪∞
n=1 An ) = n=1 µ(An )

We say that a measure µ on (X , E) is a probability measure, if µ(X ) = 1. In the


affirmative we call (X , E, µ) a probability space.
Theorem A.5. (Uniqueness theorem for probability measures) Let µ and ν be two
probability measures on (X , E). Let H be a generating system for E which is stable
under finite intersection. If µ(A) = ν(A) for all A ∈ H, then µ(A) = ν(A) for all
A ∈ E.
112 Some mathematical prerequisites

Let (X , E) and (Y, K) be two measurable spaces. Then we can consider the product
space (X × Y, E ⊗ K). Here the product σ–algebra E ⊗ K is generated by the system
of all product sets
D = {A × B : A ∈ E, B ∈ K}
Note that D is stable under intersections. If λ and λ̃ are two measures on
(X × Y, E ⊗ K) that are equal on product sets

λ(A × B) = λ̃(A × B)

for all A ∈ E and B ∈ K, then according to Theorem A.5 we have λ = λ̃.


Let µ be a measure on (X , E) and ν a measure on (Y, K). Then µ ⊗ ν denotes the
uniquely determined measure defined by (µ ⊗ ν)(A × B) = µ(A)ν(B).
Theorem A.6. (Tonelli’s theorem) Let µ be a probability measure on (X , E) and ν
be probability measure on (Y, K), and assume that f is nonnegative and E ⊗ K
measurable. Then
Z ZZ
f (x, y)d(µ ⊗ ν)(x, y) = f (x, y)dν(y)dµ(x).

Theorem A.7. (Fubini’s theorem) Let µ be a probability measure on (X , E) and ν be


probability measure on (Y, K), and assume that f is E ⊗ K measurable and µ ⊗ ν
integrable. Then y 7→ f (x, y) is integrable with respect to ν for µ-almost all x, the set
where this is the case is measurable, and it holds that
Z ZZ
f (x, y)d(µ ⊗ ν)(x, y) = f (x, y)dν(y)dµ(x).

We will also need the following abstract change-of-variable theorem


Theorem A.8 Let µ be a measure on (X , E) and let (Y, K) be some other measurable
space. Let t : X → Y be measurable, and let f : Y → R be Borel measurable. Then f
R t(µ)-integrable
is R if and only if f ◦ t is µ-integrable, and in the affirmative, it holds that
f dt(µ) = f ◦ tdµ.
Assume that (Ω, F, P ) is a probability space and (X , E) is some measurable space. We
say that X : Ω → X is a random variable on (Ω, F) with values in (X , E), if it is
F − E–measurable. That is

X −1 (A) = (X ∈ A) ∈ F

for all A ∈ E. For a random variable X on (Ω, F) with values in (X , E) we define


σ(X) to be the smallest σ–algebra that makes X measurable. Then σ(X) is the
sub-σ–algebra of F given by

σ(X) = {(X ∈ A) : A ∈ E}

We then have the following useful result


Möbius inversion 113

Theorem A.9 Assume that X is a random variable with values in (X , E) and that Z
is a real–valued random [Link] Z is σ(X)–measurable if and only if there
exists a measurable function φ : (X , E) → (R, B) such that Z = φ ◦ X.
We further need the following concept. Let (Ω, F) be a measurable space.
Definition A.10 A subset I ⊆ F is a σ-ideal in F if
i) ∅ ∈ I;
S∞
ii) A1 , . . . , An , . . . ∈ I =⇒ 1 Ai ∈ I;
iii) A ∈ I, F ∈ F =⇒ A ∩ F ∈ I.
Note that {∅} is always a σ-ideal, the trivial σ-ideal. We shall in particular be
interested in the σ-ideal IP of P -null sets where
I = IP = {F ∈ F : P (F ) = 0}
which clearly is a σ-ideal. We shall typically write I for IP when it is clear from the
context.
The null-extension A is the smallest σ-algebra generated by A and I. We have the
following Lemma.
Lemma A.11 Assume that X is a random variable on (Ω, F, P ) and A and B are
sub-σ-algebras of F. If there is an A-measurable random variable Y and a
B-measurable Z so that X = Y = Z almost surely, then there is a random variable W
so that X = W almost surely and W is A ∩ B-measurable.
Proof We have X = Y = Z except on the set D = DY ∪ DZ where DY and DZ are
null-sets. Now define W = X(1 − 1D ) = Y (1 − 1D ) = Z(1 − 1D ). Clearly, W is
A ∩ B-measurable and W = X almost surely. 2

A.2 Möbius inversion


An important combinatorial trick is contained in the following
Lemma A.12. (Möbius inversion) Let Ψ and Φ be functions defined on the set of all
subsets of a finite set V , taking values in an Abelian group. Then the following two
statements are equivalent:
P
(1) for all a ⊆ V : Ψ(a) = b:b⊆a Φ(b);
(2) for all a ⊆ V : Φ(a) = b:b⊆a (−1)|a\b| Ψ(b).
P

Proof We show (2) =⇒ (1):


X X X
Φ(b) = (−1)|b\c| Ψ(c)
b:b⊆a b:b⊆a c:c⊆b
 
X  X 
= Ψ(c) (−1)|b\c|
 
c:c⊆a b:c⊆b⊆a
 
X  X 
= Ψ(c) (−1)|h| .
 
c:c⊆a h:h⊆a\c
114 Some mathematical prerequisites

The latter sum is equal to zero unless a \ c = ∅, i.e. if c = a, because any finite,
non-empty set has the same number of subsets of even as of odd cardinality. The proof
of (1) =⇒ (2) is performed analogously. 2
The Abelian group referred to in the lemma can be the real numbers, but often also just
the additive group of a real vector space L, the vector space of linear maps on L or a
vector space S of symmetric matrices, etc. More general versions of the lemma exist
that relate to general lattices rather than the lattice of subsets of a set; see for example
Aigner (1979).

A.3 Convexity and optimization


This section contains a brief summary of some important elements in the theory of
convex optimization. We refer the reader to Boyd and Vandenberghe (2004) for further
details, proofs not given here, and general algorithms for solving convex optimization
problems.

A.3.1 Convex sets and functions


A subset C ⊆ V of a finite-dimensional vector space V is said to be convex if it
contains the line segment connecting any two points of C, i.e. if

c1 , c2 ∈ C =⇒ tc1 + (1 − t)c2 ∈ C for all t with 0 ≤ t ≤ 1. (A.1)

Thus the empty set is convex and any singleton set is convex. Convexity of sets is
closed under intersection so ∩α∈A Cα is convex if all Cα are convex.
A real-valued function f : C → R, defined on a convex set C is said to be convex if it
for all x1 , x2 ∈ C satisfies the inequality

f (tx1 + (1 − t)x2 ) ≤ tf (x1 ) + (1 − t)f (x2 ) ∈ C for all t with 0 < t < 1. (A.2)

We say that f is if the inequality in (A.2) is strict unless x1 = x2 . The real functions
f (x) = |x| and f (x) = x2 are examples of strictly convex functions. For any convex
function it holds that the level sets

Ca = {x : f (x) ≤ a}, a ∈ R

are all convex sets. Note that the converse to this statement is false in general unless
L = R.
It can be practical to define f for all x ∈ V by letting f (x) = ∞ for x 6∈ C; the
inequality (A.2) is then satisfied for all x1 , x2 ∈ V . If we do not explicitly say
otherwise, we shall always consider f extended in this way. The domain of f is the set
of points where f is finite.

dom f = {x ∈ V : f (x) < ∞}.

A function f is concave if −f is convex. So if f is concave, we have


dom f = {x ∈ V : f (x) > ∞} and the level sets {x : f (x) ≥ a are convex. If f is
both concave and convex it is affine.
Convexity and optimization 115

Suppose V is a Euclidean space with inner product h·, ·i and that f is convex with
dom f open and f is differentiable for all x ∈ dom f . It then holds for all
x, y ∈ dom f that
f (y) ≥ f (x) + h∇f (x), y − xi (A.3)
where the gradient ∇f (x) is determined as


f (x + tu) = h∇f (x), ui.
∂t t=0

If f is not differentiable everywhere, we consider its subgradient ∂f (x) as the set of


vectors v ∈ V such that

f (y) ≥ f (x) + hv, y − xi for all y. (A.4)

If f is differentiable at x we have ∂f = {∇f }. For the function f (x) = |x| we have


∂f (x) = sign(x), where sign(x) = {1} if x > 0, sign(x) = {−1} if x < 0, and
sign(0) = [−1, 1].
If f is convex, then (A.4) implies that x∗ is a global minimum for f if and only if
0 ∈ ∂f (x∗ ). If f is strictly convex, this mimimum is unique. These facts are behind
importance of convexity in optimization problems.
If f is twice differentiable, we consider the Hessian Hf (x) of x:

∂2
f (x + su + tv) = hu, Hf (x)vi.
∂s∂t s=t=0

Then a twice differentiable real-valued function f with dom f = C is convex if and


only if dom f is convex and −Hf is positive semidefinite for all x ∈ dom f ; it is
strictly convex if and only if −Hf is positive definite.

A.3.2 Convex optimization problems


We shall consider a convex optimization problem in standard form:

minimize f (x)
subject to gi (x) ≤ 0, i = 1, . . . , k, (A.5)
hi (x) = 0, j = 1, . . . , l,

where f is a convex objective function, gi , i = 1, . . . , k are convex inequality


constraint functions, and hj , j = 1, . . . , l are affine equality constraint functions.
Either or both types of constraint function may be absent; in the latter case we have an
unconstrained problem. Similarly, a concave optimization problem has standard form

maximize f (x)
subject to gi (x) ≥ 0, i = 1, . . . , k, (A.6)
hi (x) = 0, j = 1, . . . , l,
116 Some mathematical prerequisites

where f and gi are concave and hi affine. Clearly any concave problem can be
modified into a convex problem by appropriate sign changes. The domain of the
problems is in both cases the convex set D where
k
\
D = dom f dom gi .
i=1

A point x ∈ D is feasible if it satisfies all the constraints. The set F of feasible points
is convex. The problem is said to be feasible if F is non-empty. Thus, in a convex
optimization problem we are minimizing the convex function f over the convex set F.
The optimal value of the problem is

f ∗ = inf{f (x) | x ∈ F}

which may be −∞ or ∞, the latter if F = ∅. A point x∗ ∈ D is a solution to the


problem or an optimum if x∗ is feasible and if f (x∗ ) = f ∗ . If there is a feasible point
x̃ ∈ int F with 0 ∈ ∂f (x̃), then x̃ is a solution to the problem.

A.3.3 Duality and optimality


We shall associate a dual problem to any primal convex problem in standard form. The
dual problem is sometimes better behaved that the primal problem and the magic of
convex optimization is that in many cases the solution to the dual problem has the
same optimum value as the primal. Finally, there is often a simple way of recovering
the solution to the primal problem from the dual.
The fundamental function that exposes this duality is the Lagrangian associated with
the primal problem (A.5) defined as
k
X l
X
L(x, λ, ν) = f (x) + λi gi (x) + νj hj (x), (A.7)
i=1 j=1

with dom L = D × (R)k × Rl . The Lagrangian incorporates information from the


constraint functions into the objective function by adding linear combinations of these.
The variables λ, ν are Lagrange multipliers and are also known as the dual variables
of the convex problem.
The Lagrange dual function d is simply the minimum value of the Lagrangian over x:

d(λ, ν) = inf L(x, λ, ν). (A.8)


x∈D

The dual function is concave and may in principle take the value −∞. Also, if λi ≥ 0
for all i we have for any feasible point x ∈ F that L(x, λ, ν) ≤ f (x) so then

d(λ, ν) = inf L(x, λ, µ) ≤ inf L(x, λ, ν) ≤ f ∗


x∈D x∈F

for all (λ, ν) with λi ≥ 0, i = 1, . . . , k; therefore we obtain a lower bound on the


optimal value by maximizing the dual function in the following concave problem
Convexity and optimization 117

maximize d(λ, ν)
subject to λi ≥ 0, i = 1, . . . , k. (A.9)
This optimization problem is the dual problem to (A.5) which is then called the primal
problem. The pair (λ, ν) is said to be dual feasible if λi ≥ 0 for all i and
d(λ, ν) > −∞. A pair (λ∗ , ν ∗ ) that is optimal for (A.9) is dual optimal and the the
optimum value shall be denoted d∗ . We thus always have
d∗ ≤ f ∗ .
For most, but not all, convex problems we also have f ∗ = d∗ and this phenomenon is
referred to as strong duality. Strong duality is ensured by what is known as Slater’s
condition (Slater, 1950). A feasible point x ∈ F is said to be strictly feasible if for all
non-affine gi , i = 1, . . . , k it holds that gi (x) < 0, i.e. the inequality constraints are
strict.
Theorem A.13. (Slater) If there is an x ∈ ri D which is strictly feasible, then there is
a dual optimum (λ∗ , ν ∗ ) with
−∞ < d(λ∗ , ν ∗ ) = d∗ = f ∗ .
Proof See Section 5.3.2 in Boyd and Vandenberghe (2004). 2
Next we need to know how we can recognize optima for the dual and primal problems.
If x is primal feasible and (λ, ν) are dual feasible, then we always have
f (x) − f ∗ ≤ f (x) − d(λ, ν)
and the upper bound on the right hand side is known as the duality gap associated with
x and (λ, ν). If this gap is equal to zero, then x is primal optimal and (λ, ν) is dual
optimal. Such pairs of primal-dual optima are characterized by what is known as the
Karush–Kuhn–Tucker conditions (KKT conditions). More precisely:
Theorem A.14. (Karush–Kuhn–Tucker) Consider a convex optimization problem
satisfying Slater’s condition. Then (x∗ , λ∗ , ν ∗ ) is a primal-dual optimal pair with zero
duality gap if and only if x∗ and (λ∗ , ν ∗ ) are feasible and satisfy:
λ∗i gi (x∗ ) = 0 for all i = 1, . . . , k, (A.10)
k
X l
X
0 ∈ ∂f (x∗ ) + λ∗i ∂gi (x∗ ) + νj∗ ∂hj (x∗ ). (A.11)
i=1 j=1

Proof Since λ∗i ≥ 0, the Lagrangian L(x, λ∗ , ν ∗ ) is convex in x and is therefore


minimized at x = x∗ if and only if (A.11) holds. We then get
k
X l
X
d(λ∗ , ν ∗ ) = L(x∗ , λ∗ , ν ∗ ) = f (x∗ ) + λ∗i gi (x∗ ) + νj∗ hj (x∗ ) = f (x∗ )
i=1 j=1

where the last equality holds if and only if (A.10) holds since hj (x∗ ) = 0, λ∗i ≥ 0, and
gi (x∗ ) ≤ 0. Hence the KKT conditions are satisfied if and only if the duality gap
f (x∗ ) − d(λ∗ , ν ∗ ) is equal to zero. 2
118 Some mathematical prerequisites

The conditions (A.10) are referred to as complementary slackness as they express that
at most one of the constraints gi (x) ≤ 0 and λi > 0 is active. The condition (A.11) is
stationarity of the Lagrangian.

A.4 Iterative partial maximization


For computation of maximum likelihood estimates we shall rely on procedures
involving iterative partial maximization in the sense that the likelihood function is
maximized over different sections in the parameter space. This is then repeated
cyclically.
We consider a continuous real-valued function L on a compact set Θ, and assume that
the value θ̂ that maximizes L is uniquely determined.
We assume further that there for all θ∗ ∈ Θ are sections Θi (θ∗ ), i = 1, . . . , k in Θ in
such a way that L is globally maximized at θ∗ if and only if L is maximized over all of
the sections.
Finally we assume that the operations of maximizing L over sections is continuous and
well defined, i.e. there are continuous transformations Ti of Θ into itself such that if
θ ∈ Θi (θ∗ ) for i = 1, . . . , k,
L{Ti (θ∗ )} > L(θ), if θ 6= Ti (θ∗ ).
In other words, Ti (θ∗ ) is the uniquely determined point where L is maximized over the
section Θi (θ∗ ).
Now let θ0 be arbitrary and define recursively
θn+1 = T1 · · · Tk (θn ), n ≥ 0.
Then we can show
Proposition A.15 Under the assumptions given above the sequence (θn ) converges to
θ̂, the unique point where L attains its maximum.
Proof Since Θ is assumed compact, the sequence (θn ) has a convergent subsequence
(θnk ) with limit θ∗ , say. We need to show that θ̂ = θ∗ . Let S = T1 · · · Tk . Since each
T -operation is a partial maximization, L(θn ) must be non-decreasing in n. Since also
each operation is continuous, we have
L{S(θ∗ )} = lim L{S(θnk )} ≤ lim L(θnk+1 ) = L(θ∗ ).
k→∞ k→∞

But using that Ti partially maximizes L gives


L{S(θ∗ )} ≥ L{T2 · · · Tk (θ∗ )} ≥ · · · ≥ L(θ∗ ).
Thus there must everywhere be equality. Uniqueness of the partial maxima yields,
when the chain of inequalities is read from right to left, that
θ∗ = Tk (θ∗ ) = · · · = T1 (θ∗ ).
Finally, since the global maximum was uniquely determined by maximizing L over all
sections, the proof is complete. 2
Iterative partial maximization 119

The above result is the basis of a class of algorithms used to maximize likelihood
functions. Sections are chosen appropriately such that the partial maximization
problems are relatively simple. A starting value θ0 is found and is iteratively changed
by partial maximization over sections. In all cases the existence, uniqueness and
necessary continuity properties will be established separately, but convergent
algorithms necessarily appear.
120 Some mathematical prerequisites
APPENDIX B
SOME GRAPH THEORY

B.1 Notation and terminology


A graph, as we use it throughout this book, is a triple G = (V, E, ) consisting of a
finite set V of vertices or nodes, a finite set E of edges and a map  : E → V × V that
with each edge associates two vertices as its endpoints. The endpoints may not
necessarily be distinct in which case the edge is a loop. When nodes α and β are the
endpoints of an edge, they are adjacent and we write α ∼ β and we say the edge is
between its two endpoints. Vertices and edges may have additional attributes. Vertices
can for example be discrete or continuous. Edges can for example be undirected,
directed, or bidirected, or have other types. We write α − β, α → β, and α ↔ β to
denote undirected, directed, and bidirected edges. Note that the endpoints of a directed
edge is an ordered pair (α, β), whereas endpoints of undirected and bidirected edges
are unordered pairs {α, β}. In the latter case we shall often write the edge as αβ. A
graph can be visually represented by a picture, where nodes are represented by circles,
and edges by lines, arrows, and arcs, and we shall often refer to the edges by these
names. We note that our graphs are labelled so that the two graphs in Fig. B.1 below
are considered different.

α β γ β γ α

F IG . B.1. Two different labelled graphs.

In most cases our graphs are simple, i.e. there are no multiple edges between endpoints
and they have no loops. For simple graphs we can identify the edge set E with the set
of its endpoints and represent the graph as the ordered pair G = (V, E).
If the graph has only undirected edges it is an undirected graph, if all edges are
directed, the graph is said to be directed, and if all if all edges are bidirected, it is a
bidirected graph.
A graph G 0 with vertex set V 0 and edge set E 0 is a subgraph of a graph G with vertices
V and edges E if V 0 ⊆ V , E 0 ⊆ E, and every edge in E 0 has the same endpoints in G 0
as in G. If A ⊆ V is a subset of the vertex set, it induces a subgraph GA = (A, EA ),
where the edge set EA consists of the edges in E with both endpoints in A. Similarly, a
subset F ⊆ E induces a subgraph GF = (VF , F ), where VF are the endpoints of edges
in F .
A graph is complete if all vertices are adjacent. A subset is complete if it induces a
complete subgraph. A complete subset that is maximal (with respect to inclusion ⊆) is
called a clique.
122 Some graph theory

If there is an arrow from α pointing towards β, α is said to be a parent of β and β a


child of α. The set of parents of β is denoted as pa(β) and the set of children of α as
ch(α). If there is a line between α and β, α and β are said to be neighbours, and if
α ↔ β they are spouses. The neighbours of a vertex α is denoted as ne(α) and the
spouses of α are sp(α). The expressions pa(A), ch(A), ne(A), and sp(A) denote the
collection of parents, children, neighbours, and spouses of vertices in A that are not
themselves elements of A:
pa(A) = ∪α∈A pa(α) \ A
ch(A) = ∪α∈A ch(α) \ A
ne(A) = ∪α∈A ne(α) \ A
sp(A) = ∪α∈A sp(α) \ A.
The boundary bd(A) of a subset A of vertices is the set of vertices in V \A that are
adjacent to vertices in A. In symbols we then have bd(A) = pa(A) ∪ ne(A) ∪ sp(A).
The closure of A is cl(A) = A ∪ bd(A). The skeleton ske(G) of a graph G is the
undirected graph where α − β in ske(G) if and only if α ∼ β in G. See Fig. B.2 for
illustration of various graphtheoretic concepts.

β  β 

α δ χ α δ χ

γ φ γ φ

(a) (b)

F IG . B.2. Illustration of graph theoretic concepts. In (a) we have α → γ, δ − ,


and χ ↔  but α 6→ β, δ 6∼ χ whereas, for example,  ∼ φ. Also
pa(χ) = {φ}, ch(γ) = {α}, sp() = {β, χ}, bd() = {β, δ, χ, φ}, and
cl({β, }) = {α, β, δ, , χ, φ}. The graph in (b) is the skeleton of the graph in (a).

A walk ω of length n from α to β or between α and β is a sequence


ω = (α = α0 , e1 , α1 , . . . , en , αn = β) of vertices and edges such that for 1 ≤ i ≤ n,
the edge ei has endpoints αi−1 and αi . Note that the walk is uniquely determined by
its sequence of edges so we may occasionally omit the vertices and write
ω = (e1 , . . . , en ) or, for example, ω = (α, e1 , . . . , en , β) to emphasize the endpoints
of the walk. If the graph is simple, a walk is also uniquely determined by its sequence
of vertices and we shall then write ω = (α0 , α1 , . . . , αn ).
A section ρ of a walk ω is a maximal undirected subwalk. Thus, a walk has a unique
decomposition into sections; sections may also be single nodes. A section ρ is a
collider on a walk ω if two arrowheads meet on the walk at ρ, i.e. if either of the
following situations occur w = (· · · , → ρ ←, · · · ), w = (· · · , ↔ ρ ←, · · · ),
w = (· · · , → ρ ↔, · · · ), or w = (· · · , ↔ ρ ↔, · · · ).
Notation and terminology 123

A path is a walk with no repeated vertex, i.e. a path does not intersect itself. An
n-cycle is a path of length n with the modification that it begins and ends in the same
point, i.e. as (α, e1 , . . . , en , α). If π1 = (α, e1 , . . . , en , β) and
π2 = (β, en+1 , . . . , en+m , γ) are paths, their combination ω12 = π1 ◦ π2 is the walk
ω12 = (α, e1 , . . . , ep , δ, eq , . . . , en+m , γ), where δ is the first node of π1 which is on
both paths and an endpoint of both ep and eq . If δ = β then ω12 is simply the
concatenation (α, e1 , . . . , en+m , γ) of the two paths. In general, the concatenation of
two paths will be a walk and not a path as the paths may intersect in more than one
point.
Two vertices α and β are said to connect in G if there is a walk or, equivalently, a path
from α to β in G in which case we write α β. Clearly, is an equivalence relation
and the corresponding equivalence classes [α] where

β ∈ [α] ⇐⇒ α β

are the connected components of G. If α ∈ A ⊆ V , the symbol [α]A denotes the


connected component of α within GA . Note also that α β in a graph G if and only if
α β in the skeleton ske(G).
A walk w = (α = α0 , e1 , α1 , . . . , en , αn = β) from α to β or path is directed if all
edges ei are directed from αi−1 to αi . It is semi-directed if it has no arcs and all
directed edges ei point from αi−1 to αi . If there is a directed walk or path from α to β
we write α 7→ β. The vertices α such that α 7→ β are the ancestors an(β) of β, and the
descendants de(α) of α are the vertices β such that α 7→ β. The non-descendants are
nd(α) = V \ (de(α) ∪ {α}). If pa(α) ⊆ A for all α ∈ A we say that A is an ancestral
set. In a directed graph the set A is ancestral if and only if an(α) ⊆ A for all α ∈ A.
The intersection of a collection of ancestral sets is again ancestral. Hence, for any
subset A of vertices there is a smallest ancestral set containing A which is denoted by
An(A). Note that in an undirected graph, ancestral sets are simply unions of connected
components.
Certain types of graph are of special interest to us. A tree is a simple, connected,
undirected graph without cycles. It has a unique path between any two vertices. A
forest is an undirected graph where all connected components are trees. We have also
interest in directed acyclic graphs which are simple, directed graphs without directed
cycles. A rooted tree is the directed acyclic graph obtained from a tree by choosing a
vertex as root and directing all edges away from this root.
For an directed acyclic graph D we define its moral graph Dm as the simple,
undirected graph with the same vertex set but with α and β adjacent in Dm if and only
if either α ∼ β in D or if α and β have common child. This operation, known as
moralization is illustrated in Fig. B.3.
If no edges have to be added to form the moral graph, the DAG is said to be perfect.
Thus a DAG is perfect if and only if its moral graph and its skeleton coincide
Dm = ske(D). We warn the reader that the notion of a perfect graph in most graph
theory literature refers to something quite different.
A vertex γ in a DAG D said to be terminal if none of the vertices in C have children. A
DAG has always at least one terminal chain component.
124 Some graph theory

α γ  α γ 

β δ φ β δ φ

D Dm

F IG . B.3. A directed acyclic graph D and its moral graph.

B.2 Undirected graphs


This section is devoted to studying special issues associated with undirected graphs
and we shall assume these to be simple, i.e. without loops or multiple edges.

B.2.1 Separation and connectivity


A subset S ⊆ V is said to be an (α, β)-separator in an undirected graph G if all paths
(or, equivalently, all walks) from α to β intersect S. Thus, in an undirected graph, C is
an (α, β)-separator if and only if [α]V \C 6= [β]V \C . The subset S is said to separate A
from B in G if it is an (α, β)-separator for every α ∈ A, β ∈ B; if this is the case we
write A ⊥G B | S.

B.2.2 Decomposition
In this subsection we study decompositions and decomposable graphs. Since the
notion is fundamental, we state formally
Definition B.1 A triple (A, B, C) of disjoint subsets of the vertex set V of an
undirected, graph G is said to form a decomposition of G if V = A ∪ B ∪ C,
A ⊥G B | C, and C is a complete subset of V .
When this is the case we say that (A, B, C) decomposes G into the components GA∪C
and GB∪C . Note that we allow any of the sets in (A, B, C) to be empty. If the sets A
and B in (A, B, C) are both non-empty, we say that the decomposition is proper. A
graph is said to be prime if no proper decomposition exists. Fig. B.4 shows an example
of a prime graph and an example of a decomposition is shown in Fig. B.5. It holds that

2 4

1 5 7

3 6

F IG . B.4. An example of a prime graph. This graph has no complete separators.

any finite undirected graph can be recursively decomposed into its uniquely defined
prime components (Wagner, 1937; Tarjan, 1985; Diestel, 1987; Diestel, 1990), as
illustrated in Fig. B.6.
A decomposable graph is one that can be successively decomposed into its cliques or,
in other words, a graph with only cliques as its prime components. Again we choose to
state this formally through a recursive definition as
Undirected graphs 125

2 4 2 2 4

1 5 7 1 5 5 7

3 6 3 6

F IG . B.5. Decomposition with A = {1, 3}, B = {4, 6, 7} and C = {2, 5}.

2 2 4
2 4
1 5 5 7
1 5 7 5 7
3
3 6 6

F IG . B.6. Decomposition of a graph into its unique prime components.

Definition B.2 An undirected graph is said to be decomposable if it is complete, or if


there exists a proper decomposition (A, B, C) into decomposable subgraphs GA∪C and
GB∪C .
Note that the definition makes sense because the decomposition is assumed to be
proper, such that both subgraphs GA∪C and GB∪C have fewer vertices than the original
graph G.
A chordal graph is an undirected graph with the property that every cycle of length
n ≥ 4 possesses a chord, i.e. two non-consecutive vertices that are neighbours.
Chordal graphs are sometimes also known as triangulated graphs (Berge, 1973; Rose,
1970; Lauritzen, 1996) or rigid circuit graphs (Dirac, 1961). As this defines a chordal
graph in terms of forbidden subgraphs, it follows immediately that the property must
be stable under the operation of taking subgraphs, stated formally below.
Proposition B.3 If G is chordal and A ⊂ V , then GA is chordal.
A classical result states that decomposable graphs are chordal and vice versa:
Proposition B.4 The following conditions are equivalent for an undirected graph G:
(i) G is decomposable;
(ii) G is chordal;
(iii) every minimal (α, β)-separator is complete.
Proof We show this partly by induction on the number of vertices |V | of G. The result
is trivial for a graph with no more than three vertices since the three conditions then are
automatically fulfilled. So assume the result holds for all graphs with |V | ≤ n and
consider a graph G with n + 1 vertices. We then argue cyclically as
(i) =⇒ (ii) =⇒ (iii) =⇒ (i).
First we show (i) =⇒ (ii). Suppose that G is decomposable. If it is complete, it is
obviously chordal. Otherwise it can be decomposed into decomposable subgraphs
GA∪C and GB∪C , both with fewer vertices. The inductive assumption implies that
these are chordal. Thus the only possibility for a chordless cycle is one that intersects
126 Some graph theory

both A and B. But, because C separates A from B, such a cycle must intersect C at
least twice. But then it contains a chord because C is complete.
Then (ii) =⇒ (iii). Let C be a minimal (α, β)-separator. If C has only one vertex, it is
complete. If not it contains at least two, γ1 and γ2 , say. Since C is a minimal separator,
there will be paths from α to β via γ1 and back via γ2 . The sequence
(α, . . . , γ1 , . . . , β, . . . , γ2 , . . . , α)
forms a cycle, with the modification that it can have repeated points. These, and chords
other than a link between γ1 and γ2 , can be used to shorten the cycle, still leaving at
least one vertex in the component [α]V \C and one in [β]V \C . This produces a cycle of
length at least 4, which must have a chord. Hence we get γ1 ∼ γ2 . Repeating the
argument for all pairs of vertices in C gives that C is complete.
And finally that (iii) =⇒ (i). Suppose that every minimal (α, β)-separator is
complete. If G is complete there is nothing to show. Else it has at least two
non-adjacent vertices α and β. Let C be a minimal (α, β)-separator and partition the
vertex set into [α]V \C , [β]V \C , C, and the set of remaining vertices D. Then, since C
is complete, the triple (A, B, C), where A = [α]V \C ∪ D, and B = [β]V \C , form a
decomposition of G. But each of the subgraphs GA∪C and GB∪C must be
decomposable. For if C1 is a minimal (α1 , β1 )-separator in GA∪C , it is contained in a
minimal (α1 , β1 )-separator in G which is complete by assumption and C1 is therefore
itself complete. The inductive assumption implies then that GA∪C is decomposable,
and similarly with GB∪C . Thus we have decomposed G into decomposable subgraphs
and the proof is complete. 2
The smallest graph that is not decomposable is therefore a 4-cycle and shown in Fig.
B.7.

1 2

4 3

F IG . B.7. The smallest graph that is not decomposable.

B.2.3 Simplicial subsets and perfect sequences


Closely related to the notion of a decomposition is the notion of a simplicial subset,
which is a subset B with complete boundary bd(B). Clearly, when a subset is
simplicial the triple (V \ cl(B), B, bd(B)) is a decomposition of G. A vertex α is said
to be simplicial if the subset {α} is. The notion is illustrated in Fig. B.8. The following
lemma, due to Dirac (1961), plays a central role.
Lemma B.5. (Dirac) Let G be a chordal graph with at least two vertices. Then G has
at least two simplicial vertices. If G is not complete these can be chosen to be
non-adjacent.
Proof Induction on |V |. If |V | = 2 the lemma is obviously true. Assume that the
lemma holds for all graphs with |V | ≤ n and let |V | = n + 1. If G is complete the
Undirected graphs 127

bd(B) B bd(B) B

(a) (b)

F IG . B.8. Simplicial subsets. In (a), B is simplicial. In (b), B is not simplicial because


bd(B) is not complete.

statement is obvious. Otherwise there exists a proper decomposition (A, B, C) of G.


The induction assumption used on GA∪C yields a pair (α1 , α2 ) of non-adjacent
vertices that are simplicial in GA∪C . At least one of these, α1 say, must then be in A,
because C is complete. By symmetry there is a vertex β in B that is simplicial in
GB∪C . Because C separates A from B, (α1 , β) must be a pair of non-adjacent vertices
that are simplicial in G. 2
Let now B1 , · · · , Bk be a sequence of subsets of the vertex set V of an undirected
graph G. Let

Hj = B 1 ∪ · · · ∪ B j , Rj = Bj \ Hj−1 , Sj = Hj−1 ∩ Bj .

The sequence is said to be perfect if the following conditions are fulfilled:


(i) for all i > 1 there is a j < i such that Si ⊆ Bj ;
(ii) the sets Si are complete for all i;
The condition (i) is known as the running intersection property. We term the sets Hj
the histories, Rj the residuals, and Sj the separators of the sequence. The justification
for the use of the term separator is based on Lemma B.6 below. A perfect numbering
of the vertices V of G is a numbering α1 , . . . , αk such that

Bj = cl(αj ) ∩ {α1 , . . . , αj }, j≥1

is a perfect sequence of sets. Note that this implies that the sets Bj are all complete.
Perfect sequences and numberings play important roles in the understanding and
manipulation of decomposable graphs, partly because, as we shall see in
Proposition B.10, their existence is a characteristic for decomposable graphs, but also
because they form the basis for recursive computational procedures. Before we show
the characterization results, we need the following lemmas:
Lemma B.6 Let B1 , . . . , Bk be a perfect sequence of sets which contains all cliques
of an undirected graph G. Then for every j, Sj separates Hj−1 \ Sj from Rj in GHj
and hence (Hj−1 , Rj , Sj ) decomposes GHj .
Proof Let p be the highest number such that Bp is a clique. Then Hp = V and hence
Rj = ∅, so the separation is trivial for j > p. Next we must show that Sp separates
Hp−1 \ Sp from Rp in G. But suppose there were an edge between α ∈ Rp and
β ∈ Bj \ Sp for some j < p. Then {α, β} must be subset of some clique of G. But this
128 Some graph theory

cannot be Bp , as β 6∈ Bp and not Bi for some i < p as α 6∈ Hp−1 . Since all cliques are
in the sequence, the edge can therefore not exist and Sp must separate Hp−1 \ Sp from
Rp .
Now B1 , . . . , Bp−1 is a perfect sequence of sets that contains all cliques of GHp−1 . For
Sp ⊆ Bi for some i < p and hence, if Rp = ∅ then Bi = Bp is a clique. If Rp 6= ∅ the
subgraph GHp−1 has one clique fewer. We repeat the argument and continue until the
sequence is reduced to a single set. 2
If a perfect sequence of sets does not contain all cliques, the sets Sj may not separate;
see Fig. B.9.

1 2

4 3

F IG . B.9. A perfect sequence of sets that does not decompose the graph.

Lemma B.7 Let C1 , . . . , Cp be the cliques of G and assume that they form a perfect
sequence. Next let the vertices of G be numbered with first those in C1 , then those in
R2 , R3 and so on. The numbering α1 , . . . , αk so obtained is perfect.
Proof This is immediate. 2
The ‘converse’ to Lemma B.7 is false in the sense that the sequence of cliques induced
by a perfect numbering of the vertices might not be perfect. The induced sequence is
here formed by numbering the cliques according to their highest numbered vertex. A
counterexample is provided in Fig. B.10.

1 2 3 4

F IG . B.10. A perfect vertex numbering that does not induce a perfect clique num-
bering. The numbering of the vertices is perfect, but the cliques, numbered as
({1, 2}, {3, 4}, {2, 3, 5}), do not form a perfect sequence of sets.

Lemma B.8 Let C1 , . . . , Ck be a perfect sequence. Assume that Ct ⊆ Cp for some


t 6= p and that p is minimal with this property for fixed t. Then
(i) if p < t then C1 , . . . , Ct−1 , Ct+1 , . . . , Ck is a perfect sequence;
(ii) if p > t then C1 , . . . , Ct−1 , Cp , Ct+1 , . . . , Cp−1 , Cp+1 , . . . , Ck is a perfect
sequence.
Proof Case (i) is immediate. In case (ii) we first argue that Sp = Ct . For we have

Sp = Cp ∩ (C1 ∪ · · · ∪ Cp−1 ) ⊇ Cp ∩ Ct = Ct
Undirected graphs 129

but also that Sp ⊆ Ck for some k < p from the running intersection property. Hence

Ct ⊆ Sp ⊆ Ck .

The minimality of p then implies k = t. Next

S ∗ = Cp ∩ Ht−1 ⊆ Sp = Ct ,

whereby also S ∗ = St , as then

S ∗ = (Cp ∩ Ht−1 ) ∩ Ct = St .

Hence S ∗ is complete and contained in some Ck for k < t.


For t < k < p we have

Ck ∩ (Ht−1 ∪ Cp ∪ Ct+1 ∪ · · · ∪ Ck−1 ) = Ck ∩ (Hk−1 ∪ Cp )


= Sk ∪ {Ck ∩ (Cp \ Ct )} .

But as Ck ∩ Cp ⊆ Sp = Ct , then {Ck ∩ (Cp \ Ct )} = ∅ and therefore

Ck ∩ (Ht−1 ∪ Cp ∪ Ct+1 ∪ · · · ∪ Ck−1 ) = Sk .

For k > p the separators in the new sequence are trivially identical to those in the
original sequence. 2
Perfect sequences of vertices contain all cliques as stated below.
Lemma B.9 Let α1 , . . . , αk be a perfect numbering of the vertices of an undirected
graph G. Then the sets Bj = cl(αj ) ∩ {α1 , . . . , αj } form a perfect sequence that
contains all cliques of G.
Proof The sequence B1 , . . . , Bk is perfect by definition. Bk is necessarily a clique.
An induction argument now gives the result, as α1 , . . . αk−1 is a perfect numbering of
the vertices of GV \{αk } and the cliques of G consist of Bk and those cliques of
GV \{αk } that are not subsets of Bk . 2
We now have a way of constructing a perfect sequence of cliques from a perfect
sequence of vertices by thinning, i.e. simply by using Lemma B.8 to remove redundant
sets from the sequence constructed in Lemma B.9. As a consequence we obtain a
recursive characterization of decomposable graphs:
Proposition B.10 For an undirected, graph G, the following conditions are equivalent
(i) The graph G is decomposable.
(ii) For any α ∈ V , the vertices of G admit a perfect numbering with α1 = α;
(iii) The vertices of G admit a perfect numbering;
(iv) The cliques of G can be numbered to form a perfect sequence;
Proof That (i) implies (ii) is seen by induction on the number of vertices as follows.
If G is decomposable, then by Lemma B.5 G has a simplicial vertex other than α and
130 Some graph theory

we can label this as αk . The induction assumption gives us a perfect numbering of the
remaining k − 1 vertices with α1 = α.
Clearly, (ii) implies (iii).
Also (iii) implies (iv) by using Lemma B.9 and the thinning procedure described in
Lemma B.8. That (iv) implies (i) follows by Lemma B.6 and the definition of
decomposability. 2
A perfect numbering of the vertices of G induces a linear ordering of these and
therefore a directed acyclic version G < of G with arrows pointing from vertices with
low numbers to vertices with high numbers. Since this graph is clearly perfect, G < is
called a perfect directed version of G.
Proposition B.10 implies that an undirected graph is chordal if and only if it has a
perfect directed version. It follows that the skeleton ske(D) of a perfect directed
acyclic graph D is chordal.
The statement (ii) in Proposition B.10 can be strengthened and also perfect sequences
of cliques can be arranged to begin anywhere. More precisely we have the useful
lemma below.
Lemma B.11 Let C ∗ be a clique in a chordal graph G. Then the cliques of G can be
ordered as a perfect sequence C1 , . . . , Ck with C1 = C ∗ .
Proof We use induction on the number of vertices n = |V | of G. For n ≤ 2 the
statement is obvious. Assume then the lemma to hold for all graphs with n ≤ p and let
G have p + 1 vertices. If G is complete the lemma is obviously true. Otherwise, by
Dirac’s Lemma B.5, G has at least two non-adjacent simplicial vertices, i.e. one of
them, say α, is not in C ∗ . This vertex must be a member of exactly one clique Cα . The
cliques of G 0 are the cliques of G except Cα , possibly with Cα \ {α} adjoined. The
inductive assumption implies that the cliques of G 0 = GV \{α} admit a perfect
numbering C1 , . . . , Ck−1 or C1 , . . . , Ck−1 , Ck0 with C1 = C ∗ . Letting Ck = Cα we
obtain a perfect numbering of the cliques of G with the desired property. 2

B.3 Hypergraphs
B.3.1 Basic concepts
A hypergraph is a collection H of subsets of a finite set H, the base set. The elements
of H are called hyperedges. In most cases of interest to us, the base set will be the
union of the hyperedges, i.e. H = ∪h∈H h. This will henceforth be assumed to be the
case, when not otherwise explicitly stated.
A typical hypergraph is a set of complete subsets of a graph G, for example the set of
cliques C(G) of the graph, denoted the clique hypergraph of G. A hypergraph is simple
if it has only one hyperedge. A simple hypergraph is the clique hypergraph of a
complete graph.
If all hyperedges in H are pairwise incomparable in the sense that none is a subset of
the other, we say that H is reduced. The examples above are reduced hypergraphs. The
operation red H produces a reduced hypergraph from H by removing all hyperedges
that are contained in other hyperedges. If we define join and meet operations for two
hypergraphs as
Hypergraphs 131

H1 ∨ H2 = red(H1 ∪ H2 )
H1 ∧ H2 = red{h1 ∩ h2 | h1 ∈ H1 , h2 ∈ H2 },
the class of reduced hypergraphs forms a distributive lattice with the partial order
H1  H2 ⇐⇒ for all h1 ∈ H1 there exists an h2 ∈ H2 with h1 ⊆ h2 .
Two arbitrary hypergraphs are equivalent if their reductions are equal:
(H1  H2 and H1  H2 ) ⇐⇒ red(H1 ) = red(H2 ).
The join H = H1 ∨ H2 of two hypergraphs is said to be direct if their meet is simple,
i.e. if H1 ∧ H2 = {h}. Note that then necesssarily h = H1 ∩ H2 .
B.3.2 Graphs and hypergraphs
As mentioned above, each undirected graph G has an associated clique hypergraph
C(G), but conversely with any hypergraph H we can associate its graph
G(H) = (V, E), where V = H and
(α, β) ∈ E ⇐⇒ {α, β} ⊆ h for some h ∈ H.
Clearly we have
G {C(G)} = G and H  C {G(H)} .
If it also holds that H contains the cliques of G(H),
C {G(H)}  H,
we say that the hypergraph H is conformal. Then the reduced hypergraph red(H)
consists exactly of the cliques of G(H). It obviously holds that
H1  H2 =⇒ G(H1 ) ⊆ G(H2 )
G1 ⊆ G2 =⇒ C(G1 )  C(G2 ).
Further, one readily verifies from the definitions that
G(H1 ∨ H2 ) = G(H1 ) ∪ G(H2 ) (B.1)
G(H1 ∧ H2 ) = G(H1 ) ∩ G(H2 ) (B.2)
C(G1 ∩ G2 ) = C(G1 ) ∧ C(G2 ), (B.3)
whereas in general
C(G1 ∪ G2 )  C(G1 ) ∨ C(G2 ). (B.4)
In the case of direct joins and decompositions we have
Lemma B.12 If H is the direct join of hypergraphs H1 and H2 , then the triple
(H1 \ H2 , H2 \ H1 , H1 ∩ H2 ) is a decomposition of G(H). If conversely (A, B, C) is
a decomposition of the graph G, then
C(G) = C (GA∪C ∪ GB∪C ) = C (GA∪C ) ∨ C (GB∪C ) (B.5)
and the join is direct.
132 Some graph theory

Proof It follows from (B.1) that H1 ∩ H2 separates H1 \ H2 from H2 \ H1 . Since the


join is direct, (B.2) gives that H1 ∩ H2 is complete.
In the case where (A, B, C) forms a decomposition, (B.4) implies that it is enough to
show that
C(G)  C (GA∪C ) ∨ C (GB∪C ) .
But if c ∈ C(G), it must be contained in either A ∪ C or B ∪ C since C separates A
from B in G. Assume then c ⊆ A ∪ C. Because c is a clique it is in C(GA∪C ). 2
An important corollary to this is
Corollary B.13 If H is the direct join of conformal hypergraphs H1 and H2 , then H
is itself conformal.
Proof We must show that C {G(H)}  H. We find
C {G(H)} = C {G(H1 ) ∨ G(H2 )}
= C {G(H1 )} ∨ C {G(H2 )} = H1 ∨ H2 = H,
where we have used (B.5) to obtain the second equality. 2
A decomposable hypergraph H is a hypergraph that either is simple or can be obtained
by direct joins of hypergraphs that have fewer hyperedges. We then have the following
central result.
Theorem B.14 A hypergraph H is decomposable if and only if it is the clique
hypergraph of a decomposable graph. In particular, all decomposable hypergraphs are
conformal.
Proof Simple hypergraphs are obviously conformal with complete graphs as their
graphs. Corollary B.13 ensures that this continues to hold when forming direct joins.
From Lemma B.12 we have that direct joins of hypergraphs match decompositions of
the associated graphs. Thus decomposable graphs must correspond to decomposable
hypergraphs and vice versa. 2
B.3.3 Junction trees and forests
An important structure associated with computational aspects of decomposable
hypergraphs is a tree with a particular property. More precisely, a tree T with the set H
of hyperedges as vertices of the tree is called a junction tree for H if it holds for any
two hyperedges a and b in H and any h on the unique path in T between a and b that
a ∩ b ⊆ h. (B.6)
We refer to (B.6) as the junction property. It can alternatively be expressed as follows.
The subset of hyperedges that contain a given subset a ⊆ V forms a connected subtree
Ta of T for all a.
A junction forest for H is a collection F of trees Ti that are junction trees for Hi , with
H = ∨i Hi and
Hi ∧ Hj = ∅ for i 6= j.
Hence, hyperedges a and b that are in different trees of a junction forest are disjoint,
and thus if a ∩ b 6= ∅ there is a path in F between a and b.
Hypergraphs 133

Consider an arbitrary forest F with the hyperedges H as vertex set and two hyperedges
h1 and h2 which are adjacent in F. If the link between h1 and h2 is removed, then the
tree containing these two hyperedges disconnects. Let H1 be the set of hyperedges that
are still connected to h1 and let H2 denote the set of remaining hyperedges in H. The
key to the relation between decomposability and junction trees and forests is the
following lemma.
Lemma B.15 If F is a junction forest for a reduced hypergraph H then for any
neighbours h1 and h2 in F, H is the direct join of the components H1 and H2 .
Proof Choose two neighbours h1 and h2 in F and define H1 and H2 as above. We
recall that
H1 ∧ H2 = red{a ∩ b | a ∈ H1 , b ∈ H2 }.
Assume first that F is a junction forest for H. For any a ∈ H1 and b ∈ H2 with
a ∩ b 6= ∅, both h1 and h2 are on the unique path between a and b in F. Hence, by the
junction property (B.6),
a ∩ b ⊆ h1 ∩ h2
and hence
H1 ∧ H2 = {h1 ∩ h2 },
whereby H is the direct join of H1 and H2 . 2
Proposition B.16 A reduced hypergraph H is decomposable if and only if there is a
junction forest F for H.
Proof The proof is by induction on the number of hyperedges in H. The statement is
trivial for a simple hypergraph. Assume then that the statement holds for any
hypergraph with at most n hyperedges and let H have n + 1 hyperedges.
First let H be decomposable. Then it is the direct join of reduced hypergraphs H1 and
H2 where both of these have fewer hyperedges. As the join is direct we can choose
h1 ∈ H1 and h2 ∈ H2 such that

H1 ∧ H2 = {h1 ∩ h2 }.

The inductive assumption gives two junction forests F1 and F2 for H1 and H2 . Form
now F from F1 and F2 by taking their union and adding an edge between h1 and h2 if
h1 ∩ h2 6= ∅. We must show that F is a junction forest for H. So let a, b ∈ H. If both
are in H1 or both in H2 and h is on the path between a and b, (B.6) follows from the
fact that F1 and F2 were junction forests. Else we might assume that a ∈ H1 and
b ∈ H2 . Since H is the direct join of H1 and H2 we have

a ∩ b ⊆ h1 ∩ h2 .

If a ∩ b 6= ∅ we have also that a ∩ h1 6= ∅ and there is therefore a path from a to h1 in


F1 and similarly a path from b to h2 in forest F2 , hence a path from a to b in F. If h is
134 Some graph theory

on the path between a and b it is either on the path from a to h1 or from b to h2 . In the
former case we find
a ∩ b ⊆ a ∩ h1 ∩ h2 ⊆ a ∩ h1 ⊆ h,
where the junction property of F1 has been used to give the last inclusion. If h is on
the path from b to h2 we argue analogously. Hence the junction property for F is
established.
Assume conversely that F is a junction forest for H. By Lemma B.15, H is the direct
join of hypergraphs H1 and H2 that both have fewer hyperedges. Clearly, the induced
subgraphs F1 = FH1 and F2 = FH2 are junction forests. Hence H1 and H2 are
decomposable by the inductive assumption. As H is the direct join of decomposable
hypergraphs it is itself decomposable. 2
Let now F be a junction forest for the clique hypergraph C of a decomposable graph G
and let S denote the set of intersections of pairs of neighbours in F
S = {Ci ∩ Cj : Ci ∼ Cj }.
Further, let Fi , Fj be the base sets of the components Ci and Cj as in Lemma B.15. We
then have
Corollary B.17 Every set Sij = Ci ∩ Cj separates Fi \ Sij from Fj \ Sij in G and
thus (Fi \ Sij , Fj \ Sij , Sij ) forms a decomposition of G.
Proof Lemma B.15 yields that C is the direct join of Ci and Cj ; the statement now
follows from Lemma B.12. 2
In fact, although there in general are many possible junction forests for C, the set
S = SF of separators in the junction tree does not depend on the particular junction
forest chosen. Also, if we let νF (S) = |{ij ∈ E(F) : S = Ci ∩ Cj }| denote the
number of times S occurs in SF we have:
Proposition B.18 If F and F 0 are two junction forests for C then SF = SF 0 and
νF (S) = νF 0 (S) for all S ⊆ V .
Proof The proof is induction after the cardinality of C. For two cliques this is
obviously true. Let L be a leaf in F with associated separator S ∈ SF . Then
L ∩ C ⊆ S for all C ∈ C− = C \ {F } and hence L is also a leaf in F 0 and S a
separator in SF 0 . Using the inductive assumption on C− with associated junction
forests F− and F− 0
yields the result. 2
Thus it makes sense to say that S is the set of separators of C or of G(C) and
νF (S) = ν(S) are the multiplicities of S.
Corollary B.19 For each S, the multiplicity ν(S) is equal to the number of times S
occurs in any perfect sequence.
Proof This again follows by induction as any leaf of a junction tree can be the last
clique in some perfect sequence. 2
The multiplicities ν(S) satisfy a number of combinatorial identities. More precisely,
we have
Hypergraphs 135

Proposition B.20 Let C be a decomposable hypergraph with base set V , S the


associated separators, and ν(S) their multiplicities. We then have
X X X
|C| = |V | + |S|ν(S), |C| = |F| + ν(S), (B.7)
C∈C S∈S S∈S

where |F| denotes the number of trees in any junction forest for C.
Proof We use induction on the number |C| of hyperedges. For |C| = 2 this is
obviously true. Let L be a leaf in F with associated separator SL ∈ S. Let
C ∗ = C \ {L}, with base set V ∗ and let S ∗ , and ν ∗ denote the separators and
multiplicities for C ∗ . Using now the inductive assumption we have
X X X
|C| = |L| + |C| = |L| + |V ∗ | + |S|ν ∗ (S).
C∈C C∈C ∗ S∈S ∗

Now, |L| + |V | = |V | + |SL | and S = S ∪ {SL }. Further, ν(S) = ν ∗ (S) for


∗ ∗

S 6= SL ; if SL 6= ∅ we have ν(SL ) = ν ∗ (SL ) + 1 and ν(SL ) = ν ∗ (SL ) otherwise; the


first relation follows. The second relation follows similarly by noting that |F ∗ | = |F|
if SL 6= ∅ and have |F| = |F ∗ | + 1 otherwise. 2
Finally we wish to emphasize the fundamental relation between junction forests and
sequences of sets satisfying the running intersection property.
Consider a sequence B1 , . . . , Bk of finite and distinct sets that satisfies the running
intersection property, i.e. for all i > 1 there is a j < i such that Si ⊆ Bj where
Si = Bi ∩ (B1 ∪ · · · ∪ Bi−1 ),
and define the hypergraph H = {B1 , . . . , Bk }. Construct then an undirected graph F
with these sets as vertices by successively choosing j for each i such that Si ⊆ Bj and
then letting i ∼ j.
Proposition B.21 The graph F is a junction forest for H.
Proof We use induction on the number k of sets in the sequence. The statement is
trivial for k ≤ 2. Assume the statement to hold for sequences of length at most n and
assume k = n + 1.
Using the construction until Bk−1 gives a graph Fk−1 which is a junction forest by the
inductive assumption. Adding the edge from Bk to B ∗ , where Sk ⊆ B ∗ , produces
clearly a forest but the junction property must be checked. It is enough to consider
a ∈ Fk−1 , b = Bk and h on the path between them. Obviously, then h is also on the
path from a to B ∗ . Using that a ⊆ B1 ∪ · · · ∪ Bk−1 and the junction property of Fk−1
we obtain
a ∩ Bk ⊆ a ∩ (B1 ∪ · · · ∪ Bk−1 ) ∩ Bk ⊆ a ∩ B ∗ ⊆ h.
Hence F is a junction forest. 2
Conversely, let F be a junction forest and choose roots arbitrarily in all trees, thereby
directing all edges in F. This induces a natural partial order on the vertices of F by
having a before b if there is a directed path from a to b. Assume now that b1 , . . . , bk is
any numbering of the vertices of F that is compatible with this ordering.
136 Some graph theory

Proposition B.22 The sets b1 , . . . , bk have running intersection property.

Proof Consider bi for i > 1 and assume this to be part of the tree T in F with chosen
root R. All sets on the path from R to bi must be among b1 , . . . bi−1 or the numbering
would not be compatible. Let b∗ be the hyperedge on this path which is nearest to bi .
Suppose bl for 1 < l < i − 1 is in a different tree. Then bi ⊆ bl = ∅. Else b∗ is on the
path between bl and bi . The junction property thus implies bl ∩ bj ⊆ b∗ and therefore

bi ∩ (b1 ∪ · · · ∪ bi−1 ) ⊆ b∗ ,

which shows that we can choose bj = b∗ and have the running intersection property.
2

In this way there is a simple relation between all possible perfect orderings of the
cliques of a decomposable graph and all junction forests for such graphs.

B.4 Algorithms
B.4.1 Identifying chordal graphs
There are several algorithms for identifying chordal graphs. The most straight-forward
algorithm is a greedy algorithm for checking chordality based on the fact that chordal
graphs are those that admit perfect numberings:

Algorithm B.1 G REEDY ALGORITHM for checking chordality of a graph and identify-
ing a perfect numbering
Input: An undirected graph G.
Output: If V is chordal: a perfect numbering of V ; FALSE if V is not chordal.
1. Look for a vertex v ∗ with bd(v ∗ ) complete
2. If no such vertex exists return FALSE
3. Number v ∗ as v ∗ = |V | and let G = GV \v∗
4. If V 6= ∅ go to 1
5. Else return numbering.

The worst-case complexity of this algorithm is O(|V |2 ) as |V | − k vertices must be


queried to find the vertex to be numbered as |V Z| − k. The algorithm is illustrated in
Fig. B.11 and Fig. B.12.
The next simple algorithm is due to Tarjan and Yannakakis (1984) and has complexity
O(|V | + |E|) as for every node, all neighbours of that node must be visited. It checks
chordality of the graph and generates a perfect numbering if the graph is chordal. In
addition, as we shall see below, the cliques of the chordal graph can be identified as the
algorithm runs. It begins by initiating the first vertex in a perfect sequence, rather than
the last vertex. The algorithm is illustrated in Fig. B.14 and Fig. B.13.
Algorithms 137

5
t t t t t t
@ @ @ @ 6 @ @ 6
t @t @t t @t @t t @t @t
@ @ @ @ @ @
@t @t @t @t @t @t
7 7 7

F IG . B.11. The greedy algorithm at work. This graph is not chordal, as there is no
candidate for number 4.

5 5
t t t t
@ @ 6 3 @ @ 6
t @t @t t @t @t
@ @ @ @
@t @t @t @t
4 7 4 7
5 1 5
t t t t
3 @ 2 @ 6 3 @ 2 @ 6
t @t @t t @t @t
@ @ @ @
@t @t @t @t
4 7 4 7

F IG . B.12. The greedy algorithm at work. Initially the algorithm proceeds as in


Fig. B.11. This graph is chordal and the numbering obtained is a perfect numbering.

B.4.2 Finding cliques and constructing a junction tree


Finding the cliques of a general graph is an NP-complete problem. But the cliques of a
chordal graph can be found in a simple fashion from a MCS numbering
V = {1, . . . , |V |}. More precisely we let

Algorithm B.2 M AXIMUM C ARDINALITY S EARCH for checking chordality of a graph


and identifying a perfect numbering
Input: An undirected graph G.
Output: If V is chordal: a perfect numbering of V ; FALSE if V is not chordal.
1. Choose v0 ∈ V arbitrarily and number v0 as v0 = 1;
2. When vertices {1, 2, . . . , j} have been identified, choose v = j + 1 among
V \ {1, 2, . . . , j} with highest cardinality of its numbered neighbours
3. If bd(j + 1) ∩ {1, 2, . . . , j} is not complete, return FALSE
4. If |V | = j + 1 the graph is chordal and the numbering is perfect
5. Else repeat from 2.
138 Some graph theory

* 1
s s s s
@ * @ *
s @s @s s @s @s
@ @

@s @s @s @s
@ @ @ @

2 1 2 1
s s s s
* @ ** @ * * @ 3 @ **
s @s @s s @s @s
@s @s @s @s
@ @ @ @
* *
2 1 2 1
s s s s
* @ 3 @ 4 * @ 3 @ 4
s @s @s s @s @s
@s @s @s @s
@ @ @ @
* ** * 5
2 1 2 1
s s s s
6 @ 3 @ 4 6 @ 3 @ 4
s @s @s s @s @s
@s @s @s @s
@ @ @ @
** 5 7 5

F IG . B.13. Maximum Cardinality Search at work. When a vertex is numbered, a


counter for each of its unnumbered neighbours is increased with one, marked here
with the symbol ∗. The counters keep track of the numbered neighbours of any ver-
tex and are used to identify the next vertex to be numbered. This graph is not chordal
as discovered at the last step because 7 does not have a complete boundary.

Bλ = bd(λ) ∩ {1, . . . , λ − 1}

and πλ = |Bλ |. Say that λ is a ladder vertex if λ = |V | or if πλ+1 < πλ + 1 and let Λ
be the set of ladder vertices.
It then holds that the cliques of G are Cλ = {λ} ∪ Bλ , λ ∈ Λ. For a proof of this
assertion see e.g. Cowell et al. (1999, page 56).
Example B.25 For the MCS ordering in Fig. B.14 we find πλ = (0, 1, 2, 2, 2, 1, 1)
yielding the ladder nodes {3, 4, 5, 6, 7} and the corresponding cliques

C = {{1, 2, 3}, {1, 3, 4}, {3, 4, 5}, {2, 6}, {6, 7}}.

A junction tree can be constructed directly from the MCS ordering Cλ , λ ∈ Λ. More
precisely, since
Bλ = bd(λ) ∩ {1, . . . , λ − 1}
Algorithms 139

2 1
t t
6 @ 3 @ 4
t @t @t
@ @
@t @t
7 5

F IG . B.14. MCS numbering for a chordal graph. The algorithm runs essentially as in
the non-chordal case.
is complete for all λ ∈ Λ it holds that

Cλ ∩ (∪λ0 <λ Cλ0 ) = Cλ ∩ Cλ∗ = Sλ

for some λ∗ < λ. A junction tree is now easily constructed by attaching Cλ to any Cλ∗
satisfying the above. Although λ∗ may not be uniquely determined, Sλ is. Indeed, the
sets Sλ are the minimal complete separators and the numbers ν(S) are
ν(S) = |{λ ∈ Λ : Sλ = S}|. Junction trees can be constructed in many other ways as
well (Jensen and Jensen, 1994).

B.4.3 Junction trees of prime components


In general, the prime components of any undirected graph can be identified and
arranged in a junction tree in a similar way using an algorithm of Tarjan (1985), see
also Leimer (1993).
Then every pair of neighbours (C, D) in the junction tree represents a decomposition
of G into GC̃ and GD̃ , where C̃ is the set of vertices in cliques connected to C but
separated from D in the junction tree, and similarly with D̃.
Tarjan’s algorithm is based on first numbering the vertices by a slightly more
sophisticated algorithm (Rose et al., 1976) known as Lexicographic Search (LEX)
which runs in O(|V |2 ) time.
140 Some graph theory
APPENDIX C
LINEAR ALGEBRA AND RANDOM VECTORS

C.1 Matrix results


For a block matrix of the form !
AB
E=
CD
where A and D are p × p and q × q matrices respectively and D is regular, we define
the Schur complement of D within E, denoted (E/D) to be the matrix
(E/D) = A − BD−1 C.
It then holds that
Lemma C.1 A symmetric block matrix E is positive definite if and only if (E/D) and
D are both positive definite.
Proof Since Σ is symmetric, we have C = B > . If we then let
!
x
u=
y − D−1 B > x
we have a one-to-one correspondence between u and (x, y). Further we find
u> Eu = x> Ax + 2x> B(y − D−1 B > x)
+(y − D−1 B > x)> D(y − D−1 B > x)
= x> (A − BD−1 B > )x + y > Dy = x> (E/D)x + y > Dy.
Hence the result follows. 2
Similarly we have that if D is non-singular, the determinant of a partitioned matrix can
be factorized as !
AB
det E = det = det(E/D) det D. (C.1)
CD
The correctness of (C.1) follows from the calculation
! ! !
AB AB Ip 0
det = det det =
CD CD −D−1 C Iq
( ! !)
AB Ip 0
= det
CD −D−1 C Iq
!
(E/D) B
= det = (det E/D)(det D).
0 D
142 Linear algebra and random vectors

Further, the inverse of a partitioned matrix is given as


!−1 !
−1 AB (E/D)−1 −(E/D)−1 G
E = = . (C.2)
CD −F (E/D)−1 D−1 + F (E/D)−1 G

The inverse on the left-hand side exists if and only if the inverses on the right-hand
side exist. Here F = D−1 C, and G = BD−1 . Performing the multiplication shows the
correctness. Finally, we shall make use of the following formula — known as
Harville’s variant of the Woodbury matrix identity — valid for a non-singular
symmetric matrix M of order m, a symmetric matrix ∆ of order d, and C being any
m × d matrix:

(M + C∆C > )−1 = M −1 − M −1 C∆(I + C > M −1 C∆)−1 C > M −1 . (C.3)

This formula is useful when M has previously been inverted and d is much smaller
than m. To see that (C.3) is correct, we let Q = (I + C > M −1 C∆) and multiply the
right-hand side with (M + C∆C > ) from the left to get

(M + C∆C > )(M −1 − M −1 C∆Q−1 C > M −1 ) =


I + C∆C > M −1 − C∆Q−1 C > M −1 − C∆C > M −1 C∆Q−1 C > M −1
I + C∆C > M −1 − C∆(I + C > M −1 C∆)Q−1 C > M −1 = I.

C.2 Random vectors


It seems convenient for the purposes in this book to deal with multivariate distributions
in some generality, allowing these to be discussed in general Euclidean vector spaces
V rather than in the particular case of V = Rn with the standard inner product. In
particular, when discussing the exact and asymptotic distribution of maximum
likelihood estimates, it is most natural to work with random variables that, for
example, take values in the vector space of symmetric matrices.
We do not intend to dwell on formal details of the theory. Therefore it will create few
difficulties and indeed be very close to the more usual matrix formulation. The reader
is referred to Eaton (1983) for a comprehensive and detailed exposition along similar
lines.
First we have to discuss the notion of mean and covariance of a random vector X
taking values in V , where V is a Euclidean space with inner product h·, ·i.
Definition C.2 An element ξ of V is said to be the mean vector or expectation of X if
it holds that
hv, ξi = Ehv, Xi for all v ∈ V .
We allow ourselves to write ξ = EX and have therefore that hv, EXi = Ehv, Xi.
Definition C.3 A bilinear form Σ on V is said to be the covariance of X if it holds
that
Cov (hu, Xi, hv, Xi) = Σ(u, v) for all u, v ∈ V .
Random vectors 143

We write VX = Σ. Note that the covariance, as well as any other bilinear form, is
determined from its values on the diagonal Σ(u, u), for the bilinearity gives

1
Σ(u, v) = {Σ(u + v, u + v) − Σ(u − v, u − v)} .
4
To any such bilinear form there is a linear operator, which we also denote by Σ, such
that
Σ(u, v) = hu, Σvi.
This is referred to as the covariance operator of X. If (e1 , . . . , ep ) is an orthonormal
basis of V , we let

σij = Σ(ei , ej ) = hei , Σej i = Cov (hei , Xi, hej , Xi) .

The p × p-matrix of these numbers is the covariance matrix of X and we also denote
this by VX = Σ. So the same symbol is used to refer to the covariance, the covariance
operator and the covariance matrix, and the context will determine the exact meaning
of the symbol.
The covariance Σ is called regular if Σ(u, u) > 0 for all u 6= 0. In this case its matrix
is positive definite and the covariance determines an inner product on V which we
shall denote as h·, ·iΣ , i.e.

hu, viΣ = Σ(u, v) = hu, Σvi.

When the covariance is regular, the inverse operator K = Σ−1 is called the
concentration operator and its matrix with respect to a chosen basis is called the
concentration matrix. The concentration operator determines a symmetric bilinear
form as usual by
K(u, v) = hu, Kvi.
This bilinear form is called the concentration of the distribution.
The concentration operator K is equivalently defined through the relation

hu, vi = hKu, Σvi. (C.4)

If Σ is not regular, any K which satisfies Σ = ΣKΣ, i.e. K is a generalized inverse to


Σ, can be used as the concentration operator, and the relation (C.4) then holds for all
u, v in the range of Σ, since

hKΣx, ΣΣyi = hΣKΣx, Σyi = hΣx, Σyi.

Note that the concentration and the covariance operator depend on the given inner
product on V , and the covariance and concentration matrices further depend on a
chosen orthonormal basis. A fully invariant approach to random vectors and the
normal distribution on vector spaces avoids introducing the first inner product, but we
have chosen not to proceed to this level of abstraction.
144 Linear algebra and random vectors

In most cases the space V will be Rn with the usual inner product and standard
orthonormal basis, but we also frequently deal with the space Rn×p of n × p-matrices
with inner product
hA, Bi = tr(A> B) (C.5)
and canonical basis formed by the matrices Eij with ij-th entry equal to one and the
remaining entries equal to zero. In the case where n = p, an interesting subspace is
formed by the set Sp of symmetric p × p matrices where the transpose in (C.5)
becomes unnecessary. An orthonormal basis for this space consists of the symmetric
matrices √
Ẽii = Eii , Ẽij = (Eij + Eji ) / 2 for i 6= j. (C.6)
If V = Rn , the mean vector is of the form ξ = (ξ1 , . . . , ξn )> and we have

hei , ξi = Ehei , Xi = ξi = EXi ,

where X = (X1 , . . . , Xn )> . Similarly for the covariance we get

σij = Σ(ei , ej ) = Cov (hei , Xi, hej , Xi) = Cov(Xi , Xj ).

These formulae indicate how the notation conforms with that used in most statistical
literature.
Suppose we have two Euclidean spaces V and W where to avoid confusion we denote
their inner products by h·, ·iV and h·, ·iW respectively. Let A be a linear map from V to
W and b an element of W . Then Y = AX + b is a random vector in W . Its mean and
covariance are given below.
Proposition C.4 If the random vector X has mean ξ and covariance Σ, then the mean
and covariance operator of Y are

EY = Aξ + b, VY = AΣA> .

In the special case of V = Rn and W = Rm , the same expressions hold for matrices.
Proof Direct calculation gives

Ehw, Y iW = Ehw, AX + biW = EhA> w, XiV + hw, biW


= hA> w, ξiV + hw, biW = hw, Aξ + biW ,

which gives the result for the mean, and similarly,

Cov (hw, Y iW , hy, Y iW ) = Cov (hw, AXiW , hy, AXiW )


= Cov hA> w, XiV , hA> y, XiV


= hA> w, ΣA> yiV = hw, AΣA> yiW ,

which gives the covariance operator. We abstain from repeating the calculations in the
matrix case. 2
Random vectors 145

Finally we mention that the distribution of a random vector is uniquely determined by


the distribution of all linear functions of the vector. More precisely, the following
holds.
Proposition C.5 If X and Y are two random vectors in V and
D
hv, Xi = hv, Y i for all v in V ,
D
then X = Y .
This is essentially equivalent to the fact that the characteristic function of X,

ψ(v) = Eeihv,Xi ,

determines the distribution. Here i is the complex unit, i.e. i2 = −1. This result can be
found in Cramér (1946). That this is equivalent to the statement in Proposition C.5
follows from the uniqueness of the Fourier transform in the case where V = R.
146 Linear algebra and random vectors
APPENDIX D
THE MULTIVARIATE NORMAL DISTRIBUTION

The exposition of the multivariate normal distribution and derived distributions is close
to that given in Eaton (1983). Proofs not given here can be found there or in Anderson
(1984).

D.1 Basic properties


We first formally define what it means for a random vector in V to be normally
distributed:
Definition D.1 A random vector X on a Euclidean space V is said to have a normal
distribution on V if there exists an element ξ ∈ V and a bilinear form Σ on V such that
hv, Xi ∼ N {hv, ξi, Σ(v, v)} for all v in V ,
where N (µ, σ 2 ) denotes the univariate normal distribution with mean µ and variance
σ2 .
From Proposition C.5 it follows that the definition is unambiguous and the preceding
pages show that then ξ is the mean and Σ the covariance of the random vector X. If X
is normally distributed on V we write
X ∼ NV (ξ, Σ).
In the special cases V = Rp and V = Rn×p we write
X ∼ Np (ξ, Σ) and X ∼ Nn×p (ξ, Σ).
The mean ξ and covariance Σ determine a unique normal distribution on V .
Conversely, to any pair (ξ, Σ), where ξ is a vector in V and Σ is a bilinear form on V
which is non-negative, i.e. Σ(v, v) ≥ 0 for all v ∈ V , there is a normal distribution
with these as mean and covariance.
If Σ is regular, the normal distribution has density with respect to the Lebesgue
measure on V that gives mass 1 to a unit cube. This density is equal to
fξ,Σ (x) = (2π)−p/2 (det Σ)−1/2 e−hx−ξ,K(x−ξ)i/2 , (D.1)
where K = Σ−1 is the concentration operator of the normal distribution. If h·, ·i is
standard inner product on Rn , we have in matrix notation that
hx − ξ, K(x − ξ)i = (x − ξ)> K(x − ξ),
where K is the inverse of the covariance matrix. Note that we have then assumed an
orthonormal basis in V to be chosen and K depends on this choice.
148 The multivariate normal distribution

Adding two independent normal random vectors gives a normal random vector. More
accurately:
Proposition D.2 If X1 ∼ NV (ξ1 , Σ1 ) and X2 ∼ NV (ξ2 , Σ2 ) are independent, then
X1 + X2 ∼ NV (ξ1 + ξ2 , Σ1 + Σ2 ).
Proof For v ∈ V it holds that
hv, X1 + X2 i = hv, X1 i + hv, X2 i.
The terms on the right-hand side are independent and univariate normal. Hence the sum
is univariate normal. Definition D.1 implies that X1 + X2 is a normal random vector
and the expressions for mean and covariance follow by direct calculation. 2
Another important fact about the normal distribution is that an affine transformation of
a normal random vector is itself a normal random vector. We consider a situation
analogous to that in Proposition C.4.
Proposition D.3 If A is a linear map from V to W , b an element of W , and
X ∼ NV (ξ, Σ), then
Y = AX + b ∼ NW (Aξ + b, AΣA> ).
Proof The mean and covariance of Y have been given in Proposition C.4. What
remains to be established is that Y follows a normal distribution. But for all w ∈ W
we have
hw, Y iW = hw, AX + biW = hA> w, XiV + hw, biW .
Since X has a normal distribution, hA> w, XiV is univariate normally distributed. This
is not changed by adding the constant hw, biW . Definition D.1 then establishes the
result. 2
A special case of this result is of interest. Suppose V = Rn and assume the random
vector X partitioned into components X1 and X2 , where X1 ∈ Rp and X2 ∈ Rq with
p + q = n. The mean vector and covariance matrix can then be partitioned accordingly
into blocks as ! !
ξ1 Σ11 Σ12
ξ= and Σ =
ξ2 Σ21 Σ22
such that Σ11 has dimensions p × p and so on. If A in Proposition D.3 is the linear map
that sends X into X2 , we obtain:
Proposition D.4 Let X be distributed as Nn (ξ, Σ), where X, ξ and Σ are partitioned
as above. Then the marginal distribution of X2 is Nq (ξ2 , Σ22 ).
Proposition D.5 Let X be distributed as Nn (ξ, Σ), where X, ξ and Σ are partitioned
as above. Then X1 and X2 are independent if and only if Σ12 = 0. If Σ is regular, this
holds if and only if K12 = 0.
Proof The first statement follows directly from the expression for the conditional
mean ξ1|2 in Example 1.20. The second statement then follows from (1.6). 2
REFERENCES

Aigner, M. (1979). Combinatorial Theory. Springer-Verlag, New York.


Anderson, T. W. (1984). An Introduction to Multivariate Statistical Analysis (2nd
edn). John Wiley and Sons, New York.
Averintsev, M. B. (1970). Ob odnom sposobe opisanie sluqanyh pole s
diskretnym argumentom (On one method of describing random fields with a
discrete argument). Problemy Peredaqi Informacii (Problems of
Information Transmission), 6, 100–108. In Russian.
Bahl, L., Cocke, J., Jelinek, F., and Raviv, J. (1974). Optimal decoding of linear
codes for minimizing symbol error rate. IEEE Transactions on Information
Theory, 20, 284–287.
Baum, L. E. (1972). An equality and associated maximization technique in statistical
estimation for probabilistic functions of Markov processes. Inequalities, 3, 1–8.
Berge, C. (1973). Graphs and Hypergraphs. North-Holland, Amsterdam. Translated
from French by E. Minieka.
Besag, J. (1972). Nearest-neighbour systems and the auto-logistic model for binary
data. Journal of the Royal Statistical Society, Series B, 34, 75–83.
Besag, J. (1974). Spatial interaction and the statistical analysis of lattice systems
(with discussion). Journal of the Royal Statistical Society, Series B, 36, 192–236.
Boyd, S. and Vandenberghe, L. (2004). Convex Optimization. Cambridge University
Press, Cambridge, UK.
Buhl, S. L. (1993). On the existence of maximum likelihood estimators for graphical
Gaussian models. Scandinavian Journal of Statistics, 20, 263–270.
Cannings, C., Thompson, E. A., and Skolnick, M. H. (1976). Recursive derivation of
likelihoods on pedigrees of arbitrary complexity. Advances in Applied
Probability, 8, 622–625.
Clifford, P. (1990). Markov random fields in statistics. In Disorder in Physical
Systems. (ed. G. R. Grimmett and D. J. A. Welsh), pp. 19–32. Clarendon Press,
Oxford. A volume in honour of John M. Hammersley on the occasion of his 70th
birthday.
Cowell, R. G., Dawid, A. P., Lauritzen, S. L., and Spiegelhalter, D. J. (1999).
Probabilistic Networks and Expert Systems. Springer-Verlag, New York.
Cramér, H. (1946). Mathematical Methods of Statistics. Princeton University Press,
Princeton, N.J.
Diestel, R. (1987). Simplicial decompositions of graphs – some uniqueness results.
Journal of Combinatorial Theory, Series B, 42, 133–145.
Diestel, R. (1990). Graph Decompositions. Clarendon Press, Oxford.
Dirac, G. A. (1961). On rigid circuit graphs. Abhandlungen Mathematisches Seminar
Hamburg, 25, 71–76.
Eaton, M. L. (1983). Multivariate Statistics. A Vector Space Approach. John Wiley
150 References

and Sons, New York.


Elston, R C and Stewart, J (1971). A general model for the genetic analysis of
pedigree data. Human Heredity, 21, 523–542.
Grimmett, G. R. (1973). A theorem about random fields. Bulletin of the London
Mathematical Society, 5, 81–84.
Gross, E. and Sullivant, S. (2018). The maximum likelihood threshold of a graph.
Bernoulli, 24, 386–407.
Hammersley, J. M. and Clifford, P. E. (1971). Markov fields on finite graphs and
lattices. Unpublished manuscript.
Hansen, E. (2009). Measure Theory (4th edn). Department of Mathematical
Sciences, University of Copenhagen.
Jensen, F. V. and Jensen, F. (1994). Optimal junction trees. In Proceedings of the 10th
Conference on Uncertainty in Artificial Intelligence (ed. R. L. de Mantaras and
D. Poole), San Francisco, CA, pp. 360–366. Morgan Kaufmann Publishers.
Jensen, F. V., Lauritzen, S. L., and Olesen, K. G. (1990). Bayesian updating in causal
probabilistic networks by local computation. Computational Statistics Quarterly, 4,
269–282.
Kalman, R. E. and Bucy, R. (1961). New results in linear filtering and prediction.
Journal of Basic Engineering, 83 D, 95–108.
Kong, A. (1986). Multivariate Belief Functions and Graphical Models. Ph.D. Thesis,
Department of Statistics, Harvard University, Massachusetts.
Koster, J. T. A. (1994). Gibbs–factorization and the Markov property. Unpublished
manuscript.
Koster, J. T. A. (2002). Marginalizing and conditioning in graphical models.
Bernoulli, 8(6), 817–840.
Lauritzen, S. L. (1996). Graphical Models. Clarendon Press, Oxford, United
Kingdom.
Lauritzen, S. L. and Jensen, F. V. (1997). Local computation with valuations from a
commutative semigroup. Annals of Mathematics and Artificial Intelligence, 21,
51–69.
Lauritzen, S. L. and Spiegelhalter, D. J. (1988). Local computations with
probabilities on graphical structures and their application to expert systems (with
discussion). Journal of the Royal Statistical Society, Series B, 50, 157–224.
Leimer, H.-G. (1993). Optimal decomposition by clique separators. Discrete
Mathematics, 113, 99–123.
Parter, S. (1961). The use of linear graphs in Gauss elimination. SIAM Review, 3,
119–130.
Pearl, J. (1986). Fusion, propagation and structuring in belief networks. Artificial
Intelligence, 29, 241–288.
Pearl, J. (1988). Probabilistic Reasoning in Intelligent Systems. Morgan Kaufmann
Publishers, San Mateo.
Pearl, J. and Paz, A. (1987). Graphoids: A graph based logic for reasoning about
relevancy relations. In Advances in Artificial Intelligence—II (ed. B. D. Boulay,
D. Hogg, and L. Steel), Amsterdam, pp. 357–363. North-Holland.
References 151

Rose, D. J. (1970). Triangulated graphs and the elimination process. Journal of


Mathematical Analysis and its Applications, 32, 597–609.
Rose, D. J., Tarjan, R. E., and Lueker, G. S. (1976). Algorithmic aspects of vertex
elimination on graphs. SIAM Journal on Computing, 5, 266–283.
Schilling, R. (2005). Measures, Integrals and Martingales. Cambridge University
Press, Cambridge, UK.
Shenoy, P. P. and Shafer, G. (1986). Propagating belief functions using local
propagation. IEEE Expert, 1, 43–52.
Shenoy, P. P. and Shafer, G. R. (1990). Axioms for probability and belief-function
propagation. In Uncertainty in Artificial Intelligence 4 (ed. R. D. Shachter, T. S.
Levitt, L. N. Kanal, and J. F. Lemmer), Amsterdam, The Netherlands, pp. 169–198.
North-Holland.
Slater, M. (1950). Lagrange multipliers revisited. Cowles Commission Discussion
Paper: Mathematics: 403.
Speed, T. P. and Kiiveri, H. (1986). Gaussian Markov distributions over finite graphs.
The Annals of Statistics, 14, 138–150.
Spitzer, F. (1971). Markov random fields and Gibbs ensembles. American
Mathematical Monthly, 78, 142–154.
Studený, M. (1992). Conditional independence relations have no finite complete
characterization. In Transactions of the 11th Prague Conference on Information
Theory, Statistical Decision Functions and Random Processes, Prague, pp.
377–396. Academia.
Tarjan, R. E. (1985). Decomposition by clique separators. Discrete Mathematics, 55,
221–232.
Tarjan, R. E. and Yannakakis, M. (1984). Simple linear-time algorithms to test
chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic
hypergraphs. SIAM Journal on Computing, 13, 566–579.
Thiele, T. N. (1880). Om Anvendelse af mindste Kvadraters Methode i nogle
Tilfælde, hvor en Komplikation af visse Slags uensartede tilfældige Fejlkilder giver
Fejlene en ‘systematisk’ Karakter. Vidensk. Selsk. Skr. 5. Rk., naturvid. og mat.
Afd., 12, 381–408. French version: Sur la Compensation de quelques Erreurs
quasi-systématiques par la Méthode des moindres Carrés. Reitzel, København,
1880.
Uhler, C. (2012). Geometry of maximum likelihood estimation in Gaussian graphical
models. Annals of Statistics, 40, 238–261.
Viterbi, A. J. (1967). Error bounds for convolutional codes and an asymptotically
optimum decoding algorithm. IEEE Transactions on Information Theory, 13,
260–269.
Wagner, K. (1937). Über eine Eigenschaft der ebenen Komplexe. Mathematische
Annalen, 114, 570–590.
152 References
INDEX

σ–algebra, 111 conditional independence


d-separation, 56 normal distribution, 97
g-separation, 54 and conditional expectation, 44
m-separation, 56 asymmetric formulation, 44
of σ-algebras, 42
acceptance–rejection algorithm, 34 of events, 40
adjacent, 121 random variables, 46
affine hypothesis, 100 conditional variance, 27
ancestor, 123 conformal hypergraph, 131
ancestral set, 123 connected components, 123
arc, 121 convex
arrow, 121 function, 114
optimization, 114
Bayes’ formula, 15 set, 114
Bayesian model, 16 strictly, 114
Bayesian network, 66 covariance, 142
boundary, 122 matrix, 143
operator, 143
canonical parameter, 100 covariance selection model, 99
change-of-variable formula, 112 decomposable, 103
characteristic function, 145 estimation, 104
child, 122 estimation, 101, 102
chord, 125 likelihood equations, 101
clique, 121 likelihood function, 100
closure, 122 covered arrow, 70
collider, 122 cycle, 123
combination
recursive, 66 DAG
compilation, 80 perfect, 69, 123
complete decomposable
graph, 121 graph, 124
subset, 121 hypergraph, 132
concentration, 143 decomposition, 124
matrix, 97, 143 proper, 124
operator, 143 descendant, 123
conditional covariance, 73 direct join, 131
conditional distribution domain, 114
and conditional expectation, 25 Dynkin class, 111
and densities, 13 Dynkin’s lemma, 111
and independence, 10
definition, 9 edge, 121
given X = x, 9 bidirected, 121
given discrete variable, 11 directed, 121
transformation, 16 undirected, 121
conditional expectation, 23, 39 expectation, 142
and conditional independence, 44
transformation, 26 factorization
154 Index

density lasso
recursive, 68 graphical, 104
recursive, 67 line, 121
faithful, 59
Fisherian model, 15 Möbius inversion, 63, 113
forest, 123 Markov equivalence, 69
junction, 132 Markov kernel, 1
Fubini’s theorem, 112 combination, 46
Fubini, extended, 8 Markov property
directed
Gaussian graphical model, 100 global, 65
generalized inverse, 143 local, 65
generating system for σ-algebra, 111 ordered, 64
graph, 121 global, 59
bidirected, 121 undirected, 100
chordal, 125 decomposition, 63
complete, 121 factorization, 61, 62
decomposable, 124 global, 60
directed, 121 local, 60
moral, 123 pairwise, 60, 62
rigid circuit, 125 positive, 62
simple, 121 mean, 142
triangulated, 125 mixture, 4
undirected, 121
graphical lasso, 104 neighbour, 122
graphoid, 52 node, 121
compositional, 52 non-descendant, 123
normal distribution, 147
history, 127 concentration, 147
hyperedge, 130 conditional independence, 97
hypergraph, 130 covariance, 147
clique, 130 density, 147
conformal, 131 marginal, 148
decomposable, 132
reduced, 130 optimization
simple, 130 convex, 114
ordering
independence model, 52 topological, 64
integration
of Markov kernel, 3 parent, 122
uniqueness, 5 partial correlation coefficient, 98
integration, the, 3 partial regression coefficient, 99
interaction, 99 path, 123
IPS-algorithm, 101 perfect, 69
iterative partial maximization, 103, 118 DAG, 123
iterative proportional scaling directed version, 130
covariance selection model, 101 numbering, 127
sequence, 127
join potential, 81
direct, 131 predecessor, 64
junction
forest, 132 residual, 127
property, 132 running intersection property, 127, 135
tree, 132
saturated model
Lagrangian, 116 Gaussian, 96
Index 155

estimation, 97 Tonelli’s theorem, 112


likelihood function, 96 Tonelli, extended, 7
Schur complement, 141 tree, 123
section, 122 junction, 132
semi-graphoid, 52 trivial σ-algebra, 40
separate, 124
separator, 124, 127 unshielded collider tripath,collider
simplicial, 126 unshielded, 71
update function
skeleton, 122
existence, 19, 21
Slater’s condition, 117
spouse, 122
vertex, 121
stability under finite intersections, 111 simplicial, 126
strictly terminal, 123
feasible, 117
structural equation,equation walk, 122
structural, 67 active, 54
subgraph, 121 blocked, 54
induced, 121 directed, 123
substitution theorem, 16 semi-directed, 123

You might also like