Docsity

Probability Theory: σ-Algebras, Conditional Probability, and Graphical Models - Prof. Srid, Study notes of Computer Science

Partial preview of the text

Download Probability Theory: σ-Algebras, Conditional Probability, and Graphical Models - Prof. Srid and more Study notes Computer Science in PDF only on Docsity!

CMPSCI 689: Probability Distributions

Sridhar Mahadevan [email protected] University of Massachusetts

CMPSCI 689 – p.1/

Topics

Review of probability theory

Discrete and continuous distributions

Graphical models

CMPSCI 689 – p.2/

Probability Axioms

Given a sample space

S

and an associated

σ

-algebra

B

, we can define a

probability

function on

B

as follows:

P

A

)^

for every

A

∈ B

P

S

(note that

S

must be in every

σ

-algebra).

If

A

1

,... , A

n

∈ B

is a collection of

pairwise-disjoint

subsets, then

P

Ai

) =i

P

i^

P

A

)i

CMPSCI 689 – p.4/

Conditional Probability and Bayes Rule

Given two events

A

and

B

in some sample space

S

, the

conditional probability

P

A

|B

P

( A

∩

B

)

P

( B

)

Example: Let

B

denote the event of getting an even roll, and let

A

denote the

event of getting a

.^

P

A

|B

1636

1 3

Note that

P

A

|B

)P

B

P

A

B

P

B

A

P

B

|A

)P

A

This immediately gives us the celebrated

Bayes rule

P

A

|B

P

B

|A

)P

A

P

B

CMPSCI 689 – p.5/

Random Variables

A

random variable

X

is a function from a sample space

S

into the real numbers

R

We denote the value of the variable by

X

(s

)^

for element

s

S

of the sample

space.

A random variable

X

induces a probability function

P

X

S

→ X

where

X

is the

range of

X

P

X

X

x

) =i

P

s j^

S

X

(s

j^

x

}i

Examples of random variables: Number of heads in an experiment where a coin istossed

times, number of times the word “student” appeared in an email

document etc.

CMPSCI 689 – p.7/

Graphical Models

A

graph

G is a pair

V, E

)^

where

V

is a set of

vertices

or

nodes

, and

E

is a set of

edges

If the graph is

directed

, the edges are a set of ordered pairs of vertices.

If the graph is

undirected

, the edges are a set of unordered pairs of vertices.

We want to define probability distributions on graphs, and we will do this informally(for the moment).

CMPSCI 689 – p.8/

Discrete (Undirected) Graphical Model

C

B

A

The joint distribution over this graph factorizes as

P

A, B, C

1 Z

φ

A,B

φ

B,C

Here

Z

is a normalization constant, and

φ

A

and

φ

B

are arbitrary

real-valued

potential functions of the form

φ

(x

exp

−

H

(x

)

If the graph is undirected, the probability distribution is called a

random field

CMPSCI 689 – p.10/

Three Canonical Graphical Models

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

A

B

C

A

B

C

diverging

converging

serial

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

P(B,C) = P(B) P(C)

B

C

A

CMPSCI 689 – p.11/

D-separation for Directed Graphs

A set of nodes

X

is said to be

d-separated

from another set of nodes

Y

, given a

conditioning set

Z

, if and only if the following is true of of

every

undirected path

from a node in

X

to a node in

Y

The path includes a diverging or serial node

V

, and

V

Z

The path includes a converging node

V

, and neither

V

nor any of its

descendants

Z

The

Markov blanket

of a node is the set of all its parents, its children, and the

parents of its children.

A node is d-separated from all other nodes in a graph given its Markov blanket.

CMPSCI 689 – p.13/

Example of D-separation

H

C

E

G

A

D

B F

What is the Markov blanket of node D?

Assume the immediate neighbors of node E are observed. Is E d-separated fromB? How about A?

CMPSCI 689 – p.14/

Example Graphical Model

Spark Plugs

Fuel

Gauge

Start

P

Gauge

|F uel

)^

Fuel = yes

Gauge = full

Gauge = half

Gauge = empty

P

Starts

yes

|F uel, SparkP lugs

)^

Fuel = yes

Fuel = no

Spark Plugs = yes

Spark Plugs = no

CMPSCI 689 – p.16/

Example Graphical Model

Spark Plugs

Fuel

Gauge

Start

P

F uel

Fuel = yes

P

SparkP lugs

Spark Plugs = yes

CMPSCI 689 – p.17/

Inference by Enumeration in Automobile

Model

0.

+

+

+


*****^

*****^

*****^

*****^


P(SP = No)

P(SP=Yes)

0.

0.

0.

P(F=yes)

P(G=empty|F=yes)

P(G=full|F=yes)

P(G=empty|F=yes)

P(G=full|F=yes)

P(G=1/2|F=yes)

P(G=1/2|F=yes)

P(S=Yes|F=yes, SP=No)

P(S=Yes|F=yes, SP=No)

P(S=Yes|F=yes, SP=No)

P(S=Yes|F=yes,SP=yes)

P(S=Yes|F=yes,SP=yes)

P(S=Yes|F=yes,SP=yes)

0.

0.

0.

0.

0.

0.

0.

0.

0.

0.

0.

(0.98)({[(0.01)(0.01) + (0.6)(0.01) + (0.39)(0.01)]}(0.04)

+

{(0.39)(0.99) + (0.6)(0.99) + (0.01)(0.99)}(0.96)})

=0.

CMPSCI 689 – p.19/

Eliminating Redundant Steps

Inference by enumeration is an exponential

O

n

algorithm.

If we examine the steps carefully, we notice there are many redundant or repeatedcalculations in the calculation

X^ SP

X^ G

P

F

yes

)P

SP

P

G

|F

yes

)P

Starts

yes

|F

yes, SP

In particular, with some thought, we can reorder the computation of the numeratoras

P

F

yes

)^

X^ SP

P

SP

P

Starts

yes

|F

yes, SP

X

G

P

G

|F

yes

We can simplify even further, by noting that the sum over

G

, giving us

P

F

yes

)^

X^ SP

P

SP

P

Starts

yes

|F

yes, SP

CMPSCI 689 – p.20/