Professional Documents
Culture Documents
Class Notes 04apr2023
Class Notes 04apr2023
Madhavan Mukund
https://www.cmi.ac.in/~madhavan
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 2/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 3/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
x ?y |z
x and y are independent given z
P(x ^ y | z) = P(x | z) · P(y | z)
P(x(y,z) P(x(z) =
P(y(x,2) 0(y)2)
=
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 3/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
x ?y |z
x and y are independent given z
P(x ^ y | z) = P(x | z) · P(y | z)
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 3/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
x ?y |z
x and y are independent given z
P(x ^ y | z) = P(x | z) · P(y | z)
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 3/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
x ?y |z
⑧
x and y are independent given z
P(x ^ y | z) = P(x | z) · P(y | z)
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 3/9
Conditional independence
x ? y — x and y are independent
P(x ^ y ) = P(x) · P(y )
x ?y |z
x and y are independent given z
P(x ^ y | z) = P(x | z) · P(y | z)
Fundamental assumption
A node is conditionally independent
of non-descendants, given its parents
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 4/9
Student example
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 5/9
Student example
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 5/9
Student example
Can we calculate
conditional independence
from the graph?
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 5/9
Student example
Can we calculate
conditional independence
from the graph?
In general, check if
X ? Y | Z for sets of
variables X , Y , Z
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 5/9
Conditional independence
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 6/9
Conditional independence
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 6/9
Conditional independence
*x X
i
y
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 6/9
Conditional independence
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
Basic trails
(a), (b) and (c): Z blocks flow
between X and Y , by semantics of
:)
Bayesian networks
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
Basic trails
(a), (b) and (c): Z blocks flow
between X and Y , by semantics of
Bayesian networks
In (d), knowing Z allows influence to
flow
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
Basic trails
(a), (b) and (c): Z blocks flow
between X and Y , by semantics of
Bayesian networks
In (d), knowing Z allows influence to
flow
Z : Car does not start
X : Low Battery, Y : No Fuel
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
Basic trails
(a), (b) and (c): Z blocks flow
between X and Y , by semantics of
Bayesian networks
In (d), knowing Z allows influence to
flow
Z : Car does not start
X : Low Battery, Y : No Fuel
Z : Grass is wet
X : Overnight rain, Y : Sprinkler ran
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
Basic trails
-
(a), (b) and (c): Z blocks flow
between X and Y , by semantics of
Bayesian networks
In (d), knowing Z allows influence to
flow
Z : Car does not start
to
X : Low Battery, Y : No Fuel
Z : Grass is wet
X : Overnight rain, Y : Sprinkler ran
Simplest form of V-structure
x
1 Y/u?
x
=+ y1z
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 7/9
D-Separation
Check if X ? Y | Z
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
**
xyx
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
- /Y
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
----. O -
->
x
v 2 y
A
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
For (d), need Z absent
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
For (d), need Z absent
&
In general, V-structure includes
descendants of the bottom node
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
For (d), need Z absent
In general, V-structure includes
descendants of the bottom node
x and y are D-separated given z if all trails are blocked
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
For (d), need Z absent
In general, V-structure includes
descendants of the bottom node
x and y are D-separated given z if all trails are blocked
Variation of breadth first search (BFS) to check if y is reachable from x through
some trail
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
Best
Search
Reachability on a
graph
me?
Is
y
reachable from
reachable
neighbours of
is
-Mack all
as
wbrs uses
- Mark
of
-
No new marks
Is Y marked?
... -
W
N I
.....
fixe
vy.--
v
D-Separation
Check if X ? Y | Z
Dependence should be blocked on
every trail from X to Y
Each undirected path from X to Y
is a sequence of basic trails
For (a), (b), (c), need Z present
For (d), need Z absent
In general, V-structure includes
descendants of the bottom node
x and y are D-separated given z if all trails are blocked
Variation of breadth first search (BFS) to check if y is reachable from x through
some trail
Extends to sets — each x 2 X is D-separated from each y 2 Y
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 8/9
Conditional independence, example
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 9/9
Conditional independence, example
Madhavan Mukund Lecture 22: 4 April, 2023 DMML Jan–Apr 2023 9/9