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

The axioms of probability, mutually exclusive events, conditional probability, and the generalized chain rule. It also includes examples of probability calculations using dice and Netflix user data. The document mentions Stanford University and CS106A course. The typology of the document is lecture notes. The document could be useful for university students as study notes, summary, or exam preparation. The possible academic course is Probability Theory, and the possible academic year is 2022. more useful for university students. The related university topics are Probability Theory, Statistics, and Data Science.

Typology: Lecture notes

2021/2022

Uploaded on 05/11/2023

eekanath
eekanath 🇺🇸

4.7

(18)

270 documents

1 / 62

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
pf39
pf3a
pf3b
pf3c
pf3d
pf3e

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!

Piech, CS106A, Stanford University

Conditional Probability

Recall: S = all possible outcomes. E = the event.

Axioms of Probability

  • Axiom 1: 0 £ P ( E ) £ 1
  • Axiom 2: P ( S ) = 1
  • Axiom 3: P ( E c ) = 1 – P(E) Aside: axiom 3 is often stated as the probability of mutually exclusive events. We’ll come back to that later in the lecture…

Mutually Exclusive Events

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

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

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

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

P (E [ F ) =

Mutually Exclusive Events

If events are mutually exclusive probability of OR is easy!

P ( E

c

) = 1 – P ( E )?

P ( E ∪ E

c

) = P ( E ) + P ( E

c

Since E and E c are mutually exclusive

P (S) = P ( E ) + P ( E

c

Since everything must either be in E or E c

1 = P ( E ) + P ( E

c

P ( E

c

) = 1 – P ( E )

Axiom 2 Rearrange

Piech, CS106A, Stanford University

• 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

Piech, CS106A, Stanford University

Dice – Our Misunderstood Friends

  • Two people each roll a die, yielding D 1

and D

2

You win if D

1

+ D

2

  • Q: What do you think is the best outcome for D 1
  • Your Choices: § A. 1 and 3 tie for best § B. 1, 2 and 3 tie for best § C. 2 is the best § D. Other/none/more than one

Piech, CS106A, Stanford University

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) =

Piech, CS106A, Stanford University

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) =

Shorthand notation for set intersection (aka set “and”)

Piech, CS106A, Stanford University

• 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

Piech, CS106A, Stanford University

Conditional Paradigm

Piech, CS106A, Stanford University

Netflix and Learn

P ( E )

S = {Watch, Not Watch} E = {Watch} P(E) = ½? What is the probability that a user will watch Life is Beautiful?

Piech, CS106A, Stanford University What is the probability that a user will watch Life is Beautiful? P ( E )

Netflix and Learn