bayes’ rule lecture 8 - purdue university › ~huang251 › slides8.pdf · lecture 8 bayes’...

22
Bayes’ Rule Bayes’ Rule Review 8.1 Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4.4 STAT 225 Introduction to Probability Models February 2, 2014 Whitney Huang Purdue University

Upload: others

Post on 27-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.1

Lecture 8Bayes’ RuleText: A Course in Probability by Weiss 4.4

STAT 225 Introduction to Probability ModelsFebruary 2, 2014

Whitney HuangPurdue University

Page 2: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.2

Agenda

1 Bayes’ Rule

2 Review

Page 3: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.3

Motivating example

Example (The Monty Hall Problem)

There was an old television show called Let’s Make a Deal,whose original host was named Monty Hall. The set–up is asfollows. You are on a game show and you are given the choiceof three doors. Behind one door is a car, behind the others aregoats. You pick a door, and the host, who knows what isbehind the doors, opens another door (not your pick) which hasa goat behind it. Then he asks you if you want to change youroriginal pick. The question we ask you is, “Is it to youradvantage to switch your choice?"

Page 4: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.4

The Monty Hall Problem

Page 5: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.5

The Monty Hall Problem

Solution.

Page 6: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.5

The Monty Hall Problem

Solution.

Page 7: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.6

Bayes’ Rule

Let A1,A2, · · · ,Ak form a partition of the sample space. Thenfor every event B in the sample space,

P(Aj |B) =P(B|Aj )× P(Aj )∑ki=1 P(B|Ai )× P(Ai )

, j = 1,2, · · · , k

Page 8: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.7

Example 24

Let us assume that a specific disease is only present in 5 out ofevery 1,000 people. Suppose that the test for the disease isaccurate 99% of the time a person has the disease and 95% ofthe time that a person lacks the disease. What is the probabilitythat the person has the disease given that they tested positive?

Solution.

P(D|+) = P(D∩+)P(+) = .005×.99

.005×.99+.995×.05 = .00495.0547 = .0905

The reason we get such a surprising result is because thedisease is so rare that the number of false positives greatlyoutnumbers the people who truly have the disease.

Page 9: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.7

Example 24

Let us assume that a specific disease is only present in 5 out ofevery 1,000 people. Suppose that the test for the disease isaccurate 99% of the time a person has the disease and 95% ofthe time that a person lacks the disease. What is the probabilitythat the person has the disease given that they tested positive?

Solution.

P(D|+) = P(D∩+)P(+) = .005×.99

.005×.99+.995×.05 = .00495.0547 = .0905

The reason we get such a surprising result is because thedisease is so rare that the number of false positives greatlyoutnumbers the people who truly have the disease.

Page 10: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.8

Basic Concepts

Random experiment: sample space, element, eventSet operations: union, intersectionSet relations: mutually exclusive, exhaust, partition

Page 11: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.8

Basic Concepts

Random experiment: sample space, element, event

Set operations: union, intersectionSet relations: mutually exclusive, exhaust, partition

Page 12: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.8

Basic Concepts

Random experiment: sample space, element, eventSet operations: union, intersection

Set relations: mutually exclusive, exhaust, partition

Page 13: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.8

Basic Concepts

Random experiment: sample space, element, eventSet operations: union, intersectionSet relations: mutually exclusive, exhaust, partition

Page 14: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 15: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1

Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 16: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 17: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 18: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 19: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 20: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 21: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.9

Probability Rules

0 ≤ P(E) ≤ 1 for any event E , P(∅) = 0, P(Ω) = 1Complement rule: P(A) = 1− P(Ac)

General addition rule: P(A ∪ B) = P(A) + P(B)− P(A ∩ B)

General multiplication rule:P(A ∩ B) = P(A|B)× P(B) = P(B|A)× P(A)

Conditional probability: P(A|B) = P(A∩B)P(B)

Law of total probability:P(B) =

∑ki=1 P(B ∩ Ai ) =

∑ki=1 P(B|Ai )× P(Ai )

Independence: if A and B are independent, thenP(A|B) = P(A), P(B|A) = P(B), and P(A ∩ B) = P(A)P(B)

Page 22: Bayes’ Rule Lecture 8 - Purdue University › ~huang251 › slides8.pdf · Lecture 8 Bayes’ Rule Text: A Course in Probability by Weiss 4:4 STAT 225 Introduction to Probability

Bayes’ Rule

Bayes’ Rule

Review

8.10

Counting Problem

Basic counting rulePermutationCombinationOrdered partition