cs221 probability theory

28
Probability Theory Review CS221: Introduction to Artificial Intelligence Naran Bayanbat 10/14/2011 Slides used material from CME106 course reader and CS229 handouts

Upload: darwinrlo

Post on 05-Dec-2014

409 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Cs221 probability theory

Probability Theory Review

CS221: Introduction to Artificial IntelligenceNaran Bayanbat

10/14/2011

Slides used material from CME106 course reader and CS229 handouts

Page 2: Cs221 probability theory

Topics

• Axioms of Probability• Product and chain rules • Bayes Theorem• Random variables• PDFs and CDFs• Expected value and variance

Page 3: Cs221 probability theory

Introduction

• Sample space - set of all possible outcomes of a random experiment– Dice roll: {1, 2, 3, 4, 5, 6}– Coin toss: {Tails, Heads}

• Event space - subsets of elements in a sample space– Dice roll: {1, 2, 3} or {2, 4, 6}– Coin toss: {Tails}

Page 4: Cs221 probability theory

Introduction

• Axioms of Probability– for all

Page 5: Cs221 probability theory

Set operations

• Let and • and

• Properties:

• If then

Page 6: Cs221 probability theory

Conditional Probability

• probability of A given B

A B

Page 7: Cs221 probability theory

Conditional Probability

• probability of A given B

A BΩ

Page 8: Cs221 probability theory

Conditional Probability

• A and B are independent if•

• A and B are conditionally independent given C if

Page 9: Cs221 probability theory

Conditional Probability

• Joint probability:

• Product rule:•

• Chain rule of probability:

Page 10: Cs221 probability theory

Conditional Probability

• probability of A given B• Example:– probability that school is closed – probability that it snows– probability of school closing if it snows– probability of snowing if school is closed

Page 11: Cs221 probability theory

Conditional Probability

• probability of A given B• Example:– probability that school is closed – probability that it snows

P(A, B) 0.005

P(B) 0.02

P(A|B) 0.25

𝑃 ( 𝐴∨𝐵 )= 𝑃 ( 𝐴∩𝐵 )𝑃 (𝐵 )

Page 12: Cs221 probability theory

Bayes Theorem

• We can relate P(A|B) and P(B|A) through Bayes’ rule:

Page 13: Cs221 probability theory

Bayes Theorem

• We can relate P(A|B) and P(B|A) through Bayes’ rule:

Posterior Probability Likelihood

Normalizing Constant

Prior Probability

Page 14: Cs221 probability theory

Bayes Theorem

• We can relate P(A|B) and P(B|A) through Bayes’ rule:

• can be eliminated with law of total probability:

=

Page 15: Cs221 probability theory

Random Variables

• Random variable X is a function s.t.

• Examples:– Russian roulette: X = 1 if gun fires and X = 0 otherwise and – X = # of heads in 10 coin tosses

Do ya feel lucky, punk?

Page 16: Cs221 probability theory

Cumulative Distribution Functions

• Defined as such that • Properties:

Page 17: Cs221 probability theory

Probability Density Functions

• For discrete random variables, defined as:

• Relates to CDFs:

• =

Page 18: Cs221 probability theory

Probability Density Functions

• For continuous random variables, defined as:

• Relates to CDFs:

Page 19: Cs221 probability theory

Probability Density Functions

• Example:• Let X be the angular position of freely spinning pointer on

a circle

Page 20: Cs221 probability theory

Probability Density Functions

• Example:• Let X be the angular position of freely spinning pointer on

a circle f(X)

1/2

2

X

Page 21: Cs221 probability theory

Probability Density Functions

• Example:• Let X be the angular position of freely spinning pointer on

a circle f(X)

1/2

2

X

Page 22: Cs221 probability theory

Probability Density Functions

• Example:• Let X be the angular position of freely spinning pointer on

a circle

• for

f(x)

1/2

2

x

F(x)

1

2

x

Page 23: Cs221 probability theory

Probability Density Functions

• Example:• Let X be the angular position of freely spinning pointer on

a circle

• for • =

f(x)

1/2

2

x

F(x)

1

2

x

Page 24: Cs221 probability theory

Expectation

• Given a discrete r.v. X and a function

• For a continuous r.v. X and a function

Page 25: Cs221 probability theory

Expectation

• Expectation of a r.v. X is known as the first moment, or the mean value, of that variable ->

• Properties:• for any constant • for any constant • +

Page 26: Cs221 probability theory

Variance

• For a random variable X, define:

• Another common form:

• Properties:• for any constant • for any constant

Page 27: Cs221 probability theory

Gaussian Distributions

• Let , then

where represents the mean and the variance• Occurs naturally in many phenomena– Noise/error– Central limit theorem

Page 28: Cs221 probability theory

Questions?