0% found this document useful (0 votes)
18 views67 pages

Week 1

The document is an introduction to a course on Probability and Statistics, covering key concepts such as the differences between probability and statistics, counting principles, and basic probability terminology. It includes examples related to poker hands, coin tossing, and DNA sequences to illustrate these concepts. The document also discusses events, sample spaces, and the use of Venn diagrams in probability.

Uploaded by

gdhg7bv9s4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views67 pages

Week 1

The document is an introduction to a course on Probability and Statistics, covering key concepts such as the differences between probability and statistics, counting principles, and basic probability terminology. It includes examples related to poker hands, coin tossing, and DNA sequences to illustrate these concepts. The document also discusses events, sample spaces, and the use of Venn diagrams in probability.

Uploaded by

gdhg7bv9s4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Welcome to 18.

05
Introduction to Probability and Statistics
Spring 2022

Image courtesy of xkcd. License: CC BY-NC.


https://xkcd.com/904/
1/32
Probability vs. Statistics

Different subjects: both about random processes

Probability
• Logically self-contained
• A few rules for computing probabilities
• One correct answer
Statistics
• Messier and more of an art
• Seek to make probability based inferences from
experimental data
• No single correct answer
11/32
Counting: Motivating Examples

What is the probability of getting exactly 1 heads in 3


tosses of a fair coin?

12/32
Poker Hands

Deck of 52 cards
• 13 ranks: 2, 3, … , 9, 10, J, Q, K, A
• 4 suits: ♡, ♠, ♢, ♣,

Poker hands
• Consists of 5 cards
• A one-pair hand consists of two cards having one rank and the
remaining three cards having three other ranks
• Example: {2♡, 2♠, 5♡, 8♣, K♢}

13/32
Concept Question 1

A one-pair hand consists of two cards having one rank and the
remaining three cards having three other ranks

The probability of a one-pair hand is:

(1) less than 5%


(2) between 5% and 10%
(3) between 10% and 20%
(4) between 20% and 40%
(5) greater than 40%

14/32
Sets in Words

Old New England rule: don’t eat clams (or any shellfish) in months
without an ’r’ in their name.
• 𝑆 = all months

• 𝐿 = the month has 31 days

• 𝑅 = the month has an ‘r’ in its name

𝑆 = {Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec}

𝐿 = {Jan, Mar, May, Jul, Aug, Oct, Dec}

𝑅 = {Jan, Feb, Mar, Apr, Sep, Oct, Nov, Dec}

𝐿 ∩ 𝑅 = {Jan, Mar, Oct, Dec} = months with 31 days and an ‘r’

15/32
Visualize Set Operations with Venn Diagrams

𝑆 𝐿 𝑅

𝐿∪𝑅 𝐿∩𝑅 𝐿𝑐 𝐿−𝑅

16/32
Product of Sets

𝑆 × 𝑇 = {pairs (𝑠, 𝑡) with 𝑠 in 𝑆, 𝑡 in 𝑇 }


More simply: 𝑆 × 𝑇 = {(𝑠, 𝑡)}
SIZE of 𝑆 × 𝑇 = (size of 𝑆) ⋅ (size of 𝑇 )

|𝑆 × 𝑇 | = |𝑆| ⋅ |𝑇 |.

17/32
Inclusion-Exclusion Principle

𝐵 𝐴∩𝐵 𝐴

|𝐴 ∪ 𝐵| = |𝐴| + |𝐵| − |𝐴 ∩ 𝐵|

18/32
Board Question 1

A band consists of singers and guitar players:

7 people sing, 4 play guitar, 2 do both

How many people are in the band?

19/32
Rule of Product

Example
3 shirts, 4 pants = 12 outfits

(set of shirts) × (set of pants) = set of outfits

|𝑆| ⋅ |𝑇 | = |𝑆 × 𝑇 |

(More powerful than it seems.)

20/32
Concept Questions: DNA

1. DNA is made of sequences of nucleotides: A, C, G, T.


How many DNA sequences of length 3 are there?

(i) 12 (ii) 24 (iii) 64 (iv) 81

21/32
Concept Questions: DNA

1. DNA is made of sequences of nucleotides: A, C, G, T.


How many DNA sequences of length 3 are there?

(i) 12 (ii) 24 (iii) 64 (iv) 81

2. How many DNA sequences of length 3 are there with


no repeats?
(i) 12 (ii) 24 (iii) 64 (iv) 81

21/32
Board Question 2

There are 5 Competitors in an Olympics 100m final.

How many ways can gold, silver, and bronze be awarded?

22/32
Board Question 3

I won’t wear green and red together; I think black or


denim goes with anything; Here is my wardrobe.

Shirts: 3B, 3R, 2G; sweaters 1B, 2R, 1G; pants 2D,2B.

© Source unknown. All rights reserved. This content is excluded from our Creative
Commons license. For more information, see https://ocw.mit.edu/help/faq-fair-use.

How many different outfits can I wear?


23/32
Solution
Solution: Suppose we choose shirts first. Depending on whether we
choose red compatible or green compatible shirts there are different
numbers of sweaters we can choose next. So we split the problem up
before using the rule of product. A multiplication tree is an easy way to
present the answer.

3 3 2
Shirts 𝑅 𝐵 𝐺
3 4 2
Sweaters 𝑅,B 𝑅,B,G B,G
4 4 4
Pants
𝐵, 𝐷 𝐵, 𝐷 𝐵, 𝐷

Multiplying down the paths of the tree:


Number of outfits = (3 × 3 × 4) + (3 × 4 × 4) + (2 × 2 × 4) = 100
24/32
Permutations

Lining things up. How many ways can you do it?

‘abc’ , ‘cab’ are 2 of the 6 permutations of {a, b, c}

’ad’ , ‘da’ , ’bc’ are three of the twelve


permutations of two things from {a,b,c,d}

25/32
Permutations of 𝑘 from a set of 𝑛

Give all permutations of 3 things out of {𝑎, 𝑏, 𝑐, 𝑑}

26/32
Permutations of 𝑘 from a set of 𝑛

Give all permutations of 3 things out of {𝑎, 𝑏, 𝑐, 𝑑}

𝑎𝑏𝑐 𝑎𝑏𝑑 𝑎𝑐𝑏 𝑎𝑐𝑑 𝑎𝑑𝑏 𝑎𝑑𝑐


𝑏𝑎𝑐 𝑏𝑎𝑑 𝑏𝑐𝑎 𝑏𝑐𝑑 𝑏𝑑𝑎 𝑏𝑑𝑐
𝑐𝑎𝑏 𝑐𝑎𝑑 𝑐𝑏𝑎 𝑐𝑏𝑑 𝑐𝑑𝑎 𝑐𝑑𝑏
𝑑𝑎𝑏 𝑑𝑎𝑐 𝑑𝑏𝑎 𝑑𝑏𝑐 𝑑𝑐𝑎 𝑑𝑐𝑏

Would you want to do this for 7 from a set of 10?

26/32
Combinations

Choosing subsets – order doesn’t matter.


How many ways can you do it?

27/32
Combinations of 𝑘 from a set of 𝑛

Give all combinations of 3 things out of {𝑎, 𝑏, 𝑐, 𝑑}

Answer: {a,b,c}, {a,b,d}, {a,c,d}, {b,c,d}

28/32
Permutations and Combinations

𝑛 𝑃𝑘 = number of permutations (ordered lists)


of 𝑘 things from 𝑛

𝑛
𝑛 𝐶𝑘 = ( ) = number of combinations (subsets)
𝑘
of 𝑘 things from 𝑛

𝑛! 𝑛 𝑃 𝑛!
𝑛 𝑃𝑘 = ( ) = 𝑛 𝐶𝑘 = 𝑛 𝑘 =
(𝑛 − 𝑘)! 𝑘 𝑘! (𝑛 − 𝑘)! 𝑘!

Proof: Rule of product! 29/32


Permutations and Combinations

𝑎𝑏𝑐 𝑎𝑐𝑏 𝑏𝑎𝑐 𝑏𝑐𝑎 𝑐𝑎𝑏 𝑐𝑏𝑎 {𝑎, 𝑏, 𝑐}


𝑎𝑏𝑑 𝑎𝑑𝑏 𝑏𝑎𝑑 𝑏𝑑𝑎 𝑑𝑎𝑏 𝑑𝑏𝑎 {𝑎, 𝑏, 𝑑}
𝑎𝑐𝑑 𝑎𝑑𝑐 𝑐𝑎𝑑 𝑐𝑑𝑎 𝑑𝑎𝑐 𝑑𝑐𝑎 {𝑎, 𝑐, 𝑑}
𝑏𝑐𝑑 𝑏𝑑𝑐 𝑐𝑏𝑑 𝑐𝑑𝑏 𝑑𝑏𝑐 𝑑𝑐𝑏 {𝑏, 𝑐, 𝑑}
Permutations: Combinations:
4 𝑃3 (43) = 4 𝐶3

4 𝑃 4!
( ) = 4 𝐶3 = 4 3 =
3 3! 3! 1!

30/32
Board Question 4

(a) Count the number of ways to get exactly 3 heads in


10 flips of a coin.
(b) For a fair coin, what is the probability of exactly 3
heads in 10 flips?

31/32
Probability: Terminology and Examples
18.05 Spring 2022

1/21
Agenda

Agenda
• Probability basics
- sample space
- events
- probability function
- experiments

2/21
Board Question 1
Deck of 52 cards
• 13 ranks: 2, 3, … , 9, 10, J, Q, K, A
• 4 suits: ♡, ♠, ♢, ♣,
Poker hands
• Consists of 5 cards
• A one-pair hand consists of two cards having one rank and the
remaining three cards having three other ranks
• Example: {2♡, 2♠, 5♡, 8♣, K♢}

Question
(a) How many different 5 card hands have exactly one pair?
Hint: practice with how many 2 card hands have exactly one pair.
Hint for hint: use the rule of product.
(b) What is the probability of getting a one pair poker hand?

3/21
Probability Cast

• Experiment: a repeatable procedure


• Sample space: set of all possible outcomes 𝑆 (or Ω).
• Event: a subset of the sample space.
• Probability function, 𝑃 (𝜔): gives the probability for
each outcome 𝜔 ∈ 𝑆
1. Probability is between 0 and 1
2. Total probability of all possible outcomes is 1.

4/21
Example (from the reading)

Coin tossing experiment


One trial: toss a fair coin, report heads or tails.

Sample space: 𝑆 = {𝐻, 𝑇 }.

Probability function: 𝑃 (𝐻) = 0.5, 𝑃 (𝑇 ) = 0.5.

Use tables to summarize:


Outcomes H T
Probability 1/2 1/2

(Tables can really help in complicated examples)

5/21
Discrete sample space

Discrete = listable

Examples of discrete sample spaces

{a, b, c, d} (finite)

{0, 1, 2, …} (infinite)

{sun,cloud,rain,snow,fog}

{patient cured, unchanged, died}

6/21
Events

Events are sets of outcomes:


• Can describe in words
• Can describe in notation
• Can describe with Venn diagrams

Example. Experiment: toss a coin 3 times.

Event:
You get 2 or more heads = { HHH, HHT, HTH, THH}

7/21
Clicker Test

CQ: Can you connect to respond to clicker


questions?

1. No 2. yes

8/21
Events, sets and words

Concept question 1: What’s the event?


(Connecting words and set notation.)

Experiment: toss a coin 3 times.

Which of following equals the event “exactly two heads”?

𝐴 = {𝑇 𝐻𝐻, 𝐻𝑇 𝐻, 𝐻𝐻𝑇 , 𝐻𝐻𝐻}


𝐵 = {𝑇 𝐻𝐻, 𝐻𝑇 𝐻, 𝐻𝐻𝑇 }
𝐶 = {𝐻𝑇 𝐻, 𝑇 𝐻𝐻}

(1) A (2) B (3) C (4) B or C

9/21
Events, sets and words

Concept question 2: Describe the event


(Connecting words and set notation.)

Experiment: toss a coin 3 times.

Which of the following describes the event


{𝑇 𝐻𝐻, 𝐻𝑇 𝐻, 𝐻𝐻𝑇 }?

(1) “exactly one head”


(2) “exactly one tail”
(3) “at most one tail”
(4) none of the above

10/21
Events, sets and words

Concept question 3: Are they disjoint?


(Connecting words and set notation.)

Experiment: toss a coin 3 times.

The events “exactly 2 heads” and “exactly 2 tails” are


disjoint is.
(1) True (2) False

11/21
Events, sets and words

Concept question 4: Does A imply B?


(Connecting words and set notation)

Consider two events: 𝐴 and 𝐵.

Are the words “𝐴 implies 𝐵” equivalent to 𝐴 ⊆ 𝐵?


(1) True (2) False

12/21
Probability rules in mathematical notation

Sample space: 𝑆 = {𝜔1 , 𝜔2 , … , 𝜔𝑛 }


Outcome: 𝜔 ∈ 𝑆
Probability between 0 and 1: 0 ≤ 𝑃 (𝜔) ≤ 1
𝑛
Total probability is 1: ∑ 𝑃 (𝜔𝑗 ) = 1, ∑ 𝑃 (𝜔) = 1
𝑗=1 𝜔∈𝑆

Event 𝐴: 𝑃 (𝐴) = ∑ 𝑃 (𝜔)


𝜔∈𝐴

13/21
Probability and set operations on events

Events 𝐴, 𝐿, 𝑅
1. Complements: 𝑃 (𝐴𝑐 ) = 1 − 𝑃 (𝐴).
2. Disjoint events: If 𝐿 and 𝑅 are disjoint then
𝑃 (𝐿 ∪ 𝑅) = 𝑃 (𝐿) + 𝑃 (𝑅).
3. Inclusion-exclusion principle: For any 𝐿 and 𝑅:
𝑃 (𝐿 ∪ 𝑅) = 𝑃 (𝐿) + 𝑃 (𝑅) − 𝑃 (𝐿 ∩ 𝑅).

𝐴𝑐
𝐿 𝑅 𝐿 𝑅
𝐴

Ω = 𝐴 ∪ 𝐴𝑐 , no overlap 𝐿 ∪ 𝑅, no overlap 𝐿 ∪ 𝑅, overlap = 𝐿 ∩ 𝑅

14/21
Table question

• Class has 50 students


• 20 male (M), 25 brown-eyed (B)
For a randomly chosen student, what is the range of
possible values for 𝑝 = 𝑃 (𝑀 ∪ 𝐵)?
(a) 𝑝 ≤ 0.4
(b) 0.4 ≤ 𝑝 ≤ 0.5
(c) 0.4 ≤ 𝑝 ≤ 0.9
(d) 0.5 ≤ 𝑝 ≤ 0.9
(e) 0.5 ≤ 𝑝

15/21
Table Question

Experiment:
1. Your table should make 9 rolls of a 20-sided die (one
each if the table is full).
2. Check if all rolls at your table are distinct.

Repeat the experiment five times and record the results.

16/21
Table Question

Experiment:
1. Your table should make 9 rolls of a 20-sided die (one
each if the table is full).
2. Check if all rolls at your table are distinct.

Repeat the experiment five times and record the results.

For this experiment, how would you define the sample


space, probability function, and event?
Compute the true probability that all rolls (in one trial)
are distinct and compare with your experimental result.
16/21
Preamble: Jon’s dice

Jon has three six-sided dice with unusual numbering.

A game consists of two players each choosing a die. They


roll once and the highest number wins.
Which die would you choose?
17/21
Board Question: Jon’s dice

1. Make probabilitiy tables for the the blue and white dice.
2. Make a probability table for the product sample space of blue and
white.
3. Use the table to compute the probability that blue beats white.
4. Pair up with another group. Have one group compare blue vs.
orange and the other compare orange vs. white. Based on the three
comparisons, rank the dice from best to worst.
18/21
Concept Question
Lucky Lucy has a coin that you’re quite sure is not fair.
• They will flip the coin twice
• It’s your job to say whether it more probable that the
tosses are the same, i.e. HH or TT, or different, i.e.
HT or TH.
Which should you choose?
1. More probable they are the same
2. More probable they are different
3. Doesn’t matter
4. It depends on the actual probabilities of getting heads
or tails.
19/21
Board Question

Lucky Lucy has a coin that you’re quite sure is not fair.
• They will flip the coin twice
• Let 𝐴 be the event the tosses are the same, i.e. {𝐻𝐻, 𝑇 𝑇 }
• Let 𝐵 be the event the tosses are the different, i.e. {𝐻𝑇 , 𝑇 𝐻}
Let 𝑝 be the probability of heads. Compute and compare 𝑃 (𝐴) and
𝑃 (𝐵).
(If you don’t see the symbolic algebra try p = 0.2, p=0.5)

20/21
Conditional Probability, Independence, Bayes’ Theorem
18.05 Spring 2022

This image is in the public domain.

1/23
Agenda

Agenda
• Conditional probability
• Multiplication rule; Law of total
probability
• Bayes’ Theorem
• Base rate fallacy

2/23
Sample Space Confusions

1. Sample space = set of all possible outcomes of an experiment.


2. The size of the set is NOT the sample space.
3. Outcomes can be sequences of numbers.
Examples.
1. Roll 5 dice: 𝑆 = set of all sequences of 5 numbers between 1 and
6, e.g. (1, 2, 1, 3, 1, 5) ∈ 𝑆.
The size |𝑆| = 65 is not a set.
2. 𝑆 = set of all sequences of 10 birthdays,
e.g. (111, 231, 3, 44, 55, 129, 345, 14, 24, 14) ∈ 𝑆.
|𝑆| = 36510
3. 𝑛 some number, 𝑆 = set of all sequences of 𝑛 birthdays.
|𝑆| = 365𝑛 .

4/23
Conditional Probability

‘the probability of 𝐴 given 𝐵’.


𝑃 (𝐴 ∩ 𝐵)
𝑃 (𝐴|𝐵) = , provided 𝑃 (𝐵) ≠ 0.
𝑃 (𝐵)
𝐴=𝐴∩𝐵 𝐵

𝐵
𝐻𝐻𝐻 𝐻𝐻𝑇 𝑇 𝐻𝐻 𝑇 𝐻𝑇

𝐴 𝐻𝑇 𝐻 𝐻𝑇 𝑇 𝑇𝑇𝐻 𝑇𝑇𝑇
𝐴∩𝐵

Conditional probability: Abstractly and for coin example


5/23
Table/Concept Question

(Discuss with your table and then click in your answer.)

Toss a coin 4 times.


Let 𝐴 = ‘at least three heads’
and 𝐵 = ‘first toss is tails’.

1. What is 𝑃 (𝐴|𝐵)?
(a) 1/16 (b) 1/8 (c) 1/4 (d) 1/5

2. What is 𝑃 (𝐵|𝐴)?
(a) 1/16 (b) 1/8 (c) 1/4 (d) 1/5

6/23
Multiplication Rule, Law of Total Probability
Multiplication rule: 𝑃 (𝐴 ∩ 𝐵) = 𝑃 (𝐴|𝐵) ⋅ 𝑃 (𝐵).

Law of total probability: If 𝐵1 , 𝐵2 , 𝐵3 partition 𝑆 then

𝑃 (𝐴) = 𝑃 (𝐴 ∩ 𝐵1 ) + 𝑃 (𝐴 ∩ 𝐵2 ) + 𝑃 (𝐴 ∩ 𝐵3 )
= 𝑃 (𝐴|𝐵1 )𝑃 (𝐵1 ) + 𝑃 (𝐴|𝐵2 )𝑃 (𝐵2 ) + 𝑃 (𝐴|𝐵3 )𝑃 (𝐵3 )

Ω
𝐵1
A ∩ B1

A ∩ B2 A ∩ B3

𝐵2 𝐵3
7/23
Trees
• Organize computations
• Compute total probability
• Compute Bayes’ formula
Example. Game: 5 orange and 2 blue balls in an urn. A random ball
is selected and replaced by a ball of the other color; then a second
ball is drawn.
1. What is the probability the second ball is orange?
2. What is the probability the first ball was orange given the second
ball was orange?

5/7 2/7
First draw 𝑂1 𝐵1
4/7 3/7 6/7 1/7
Second draw
𝑂2 𝐵2 𝑂2 𝐵2
8/23
Concept (clicker) Question: Trees 1

𝑥
𝐴1 𝑦 𝐴2

𝐵1 𝑧 𝐵2 𝐵1 𝐵2

𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2

1. The probability 𝑥 represents


(a) 𝑃 (𝐴1 )
(b) 𝑃 (𝐴1 |𝐵2 )
(c) 𝑃 (𝐵2 |𝐴1 )
(d) 𝑃 (𝐶1 |𝐵2 ∩ 𝐴1 ).

9/23
Concept (clicker) Question: Trees 2

𝑥
𝐴1 𝑦 𝐴2

𝐵1 𝑧 𝐵2 𝐵1 𝐵2

𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2

2. The probability 𝑦 represents


(a) 𝑃 (𝐵2 )
(b) 𝑃 (𝐴1 |𝐵2 )
(c) 𝑃 (𝐵2 |𝐴1 )
(d) 𝑃 (𝐶1 |𝐵2 ∩ 𝐴1 ).

10/23
Concept Question: Trees 3
𝑥
𝐴1 𝑦 𝐴2

𝐵1 𝑧 𝐵2 𝐵1 𝐵2

𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2

3. The probability 𝑧 represents


(a) 𝑃 (𝐶1 )
(b) 𝑃 (𝐵2 |𝐶1 )
(c) 𝑃 (𝐶1 |𝐵2 )
(d) 𝑃 (𝐶1 |𝐵2 ∩ 𝐴1 ).
11/23
Concept Question: Trees 4

𝑥
𝐴1 𝑦 𝐴2

𝐵1 𝑧 𝐵2 𝐵1 𝐵2

𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2 𝐶1 𝐶2

4. The circled node represents the event


(a) 𝐶1
(b) 𝐵2 ∩ 𝐶1
(c) 𝐴1 ∩ 𝐵2 ∩ 𝐶1
(d) 𝐶1 |𝐵2 ∩ 𝐴1 .

12/23
Let’s Make a Deal with Monty Hall
• One door hides a car, two hide goats.
• The contestant chooses any door.
• Monty always opens a different door with a goat. (He
can do this because he knows where the car is.)
• The contestant is then allowed to switch doors if they
want.
What is the best strategy for winning a car?
(a) Switch (b) Don’t switch (c) It doesn’t matter

This image is in the public domain. 13/23


Board question: Monty Hall

This image is in the public domain.

Organize the Monty Hall problem into a tree and compute


the probability of winning if you always switch.
Hint first break the game into a sequence of actions.

14/23
Independence

Events 𝐴 and 𝐵 are independent if the probability that


one occurred is not affected by knowledge that the other
occurred.

Independence ⇔ 𝑃 (𝐴|𝐵) = 𝑃 (𝐴) (provided 𝑃 (𝐵) ≠ 0)


⇔ 𝑃 (𝐵|𝐴) = 𝑃 (𝐵) (provided 𝑃 (𝐴) ≠ 0)

(For any 𝐴 and 𝐵)

⇔ 𝑃 (𝐴 ∩ 𝐵) = 𝑃 (𝐴)𝑃 (𝐵)

15/23
Table Question: Independence

Roll two dice and consider the following events


• 𝐴 = ‘first die is 3’
• 𝐵 = ‘sum is 6’
• 𝐶 = ‘sum is 7’
𝐴 is independent of
(a) 𝐵 and 𝐶 (b) 𝐵 alone
(c) 𝐶 alone (d) Neither 𝐵 or 𝐶.

16/23
Bayes’ Theorem

Also called Bayes’ Rule and Bayes’ Formula.


Allows you to find 𝑃 (𝐴|𝐵) from 𝑃 (𝐵|𝐴), i.e. to ‘invert’
conditional probabilities.

𝑃 (𝐵|𝐴) ⋅ 𝑃 (𝐴)
𝑃 (𝐴|𝐵) =
𝑃 (𝐵)
Often compute the denominator 𝑃 (𝐵) using the law of
total probability.

17/23
Board Question: Evil Squirrels
Of the one million squirrels on MIT’s campus most are good-natured.
But one hundred of them are pure evil! An enterprising student in
Course 6 develops an “Evil Squirrel Alarm” which they offer to sell to
MIT for a passing grade. MIT decides to test the reliability of the
alarm by conducting trials.

© Bigmacthealmanac. Some rights reserved. License: CC BY-SA. This content is excluded


from our Creative Commons license. For more information, see https://ocw.mit.edu/help/
faq-fair-use.
18/23
Evil Squirrels Continued

1000000 squirrels, 100 are evil.

• When presented with an evil squirrel, the alarm goes


off 99% of the time.
• When presented with a good-natured squirrel, the
alarm goes off 1% of the time.
(a) If a squirrel sets off the alarm, what is the probability
that it is evil?
(b) Should MIT co-opt the patent rights and employ the
system?

19/23
One solution
(This is a base rate fallacy problem)
We are given:
𝑃 (nice) = 0.9999, 𝑃 (evil) = 0.0001 (base rate)

𝑃 (alarm | nice) = 0.01, 𝑃 (alarm | evil) = 0.99

𝑃 (alarm | evil)𝑃 (evil)


𝑃 (evil | alarm) =
𝑃 (alarm)

𝑃 (alarm | evil)𝑃 (evil)


=
𝑃 (alarm | evil)𝑃 (evil) + 𝑃 (alarm | nice)𝑃 (nice)

(0.99)(0.0001)
=
(0.99)(0.0001) + (0.01)(0.9999)

≈ 0.01
20/23
Squirrels continued

Summary:
Probability a random test is correct = 0.99

Probability a positive test is correct ≈ 0.01

These probabilities are not the same!

Alternative method of calculation:


Evil Nice
Alarm 99 9999 10098
No alarm 1 989901 989902
100 999900 1000000
21/23
Board Question: Dice Game

1. The Randomizer holds the 6-sided die in one fist and


the 8-sided die in the other.
2. The Roller selects one of the Randomizer’s fists and
covertly takes the die.
3. The Roller rolls the die in secret and reports the result
to the table.
Given the reported number, what is the probability that
the 6-sided die was chosen? (Find the probability for each
possible reported number.)

22/23
MIT OpenCourseWare
https://ocw.mit.edu

18.05 Introduction to Probability and Statistics


Spring 2022

For information about citing these materials or our Terms of Use, visit:
https://ocw.mit.edu/terms.

23/23

You might also like