Conditional Probability and Bayes' Theorem: A Comprehensive Guide with Examples, Lecture notes of Probability and Statistics

Conditional probability and the generalized chain rule. It provides examples of mutually exclusive events and calculating probabilities of events given other events have already occurred. The document also briefly touches on machine learning and includes a probability problem related to Netflix. likely related to courses in probability, statistics, and machine learning.

Typology: Lecture notes

2021/2022

Uploaded on 05/11/2023

shailen_555cell
shailen_555cell šŸ‡ŗšŸ‡ø

4.6

(21)

264 documents

1 / 56

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Piech, CS106A, Stanford University
Conditional Probability
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38

Partial preview of the text

Download Conditional Probability and Bayes' Theorem: A Comprehensive Guide with Examples and more Lecture notes Probability and Statistics in PDF only on Docsity!

Conditional Probability

Mutually Exclusive Events

P (E [ F ) = P (E) + P (F )

If events are mutually exclusive, probability of OR is simple:

Today’s Lesson

• Roll two 6-sided dice, yielding values D

1

and D

2

• Let E be event: D

1

+ D

2

• What is P(E)?

§ |S| = 36, E = {(1, 3), (2, 2), (3, 1)}

§ P(E) = 3/36 = 1/

• Let F be event: D

1

• P(E, given F already observed)?

§ S = {(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6)}

§ E = {(2, 2)}

§ P(E, given F already observed) = 1/

Dice – Our Misunderstood Friends

  • Conditional probability is probability that E occurs

given that F has already occurred ā€œConditioning on Fā€

  • Written as

§ Means ā€œP(E, given F already observed)ā€

§ Sample space, S, reduced to those elements

consistent with F (i.e. S Ƈ F)

§ Event space, E, reduced to those elements

consistent with F (i.e. E Ƈ F)

Conditional Probability

P (E|F )

With equally likely outcomes:

P(E | F) =

of outcomes in E consistent with F

of outcomes in S consistent with F

F

EF

SF

EF

Conditional Probability

P (E|F ) =

P (E) =

• General definition of Chain Rule:

1 2 3 n

P E E E E

1 2 1 3 1 2 1 2 - 1

n n

P E P E E P E E E P E E E E

Generalized Chain Rule

  • Learn

What is the probability that a user will watch Life is Beautiful? P ( E )

Netflix and Learn

What is the probability that a user will watch Life is Beautiful? P ( E )

Netflix and Learn

P ( E ) = 10,234,231 / 50,923,123 = 0.

P (E) = lim n! n(E) n

#people who watched movie #people on Netflix

Netflix and Learn

What is the probability that a user will watch Life is Beautiful, given they watched Amelie? P ( E|F ) P (E|F ) =

P (EF )

P (F )

#people who watched both #people on Netflix #people who watched F #people on Netflix

P (E|F ) =

P (EF )

P (F )

#people who watched both #people on Netflix #people who watched F #people on Netflix

Netflix and Learn

P ( E|F )

What is the probability that a user will watch Life is Beautiful, given they watched Amelie? P (E|F ) =

P (EF )

P (F )

#people who watched both #people on Netflix #people who watched F #people on Netflix

Netflix and Learn

Let E be the event that a user watched the given movie, Let F be the event that the same user watched Amelie: P ( E | F ) =

P ( E | F ) =

P ( E | F ) =

P ( E | F ) =

P ( E | F ) =

Machine Learning

Machine Learning is:

Probability + Data + Computers