27
CMU 15-251 Probability I Teachers: Victor Adamchik Ariel Procaccia (this time)

PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

CMU 15-251

Probability I

Teachers:

Victor Adamchik

Ariel Procaccia (this time)

Page 2: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Gambling 101

2

7

7 1

7

7

1

5

5 5

5

5

5

3

3 3

9

9

3

8

2 8

2

2

8

Page 3: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Gambling 101

• 1 −5

6

4= 0.518

3

Page 4: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Gambling 101

• 1 −35

36

24= 0.491

4

Page 5: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Gambling 101

5

Page 6: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Pennies and gold

1. 1/6

2. 1/3

3. 2/3

4. 1

6

Page 7: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Language of probability

7

Page 8: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Language of probability

𝑆

𝑝

𝑝 𝑥 = 1

𝑥∈𝑆

8

0.1 0.5

𝑆

0.2 0 0.2

Page 9: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Language of probability

𝐸 ⊆ 𝑆

• Pr 𝐸 = 𝑝(𝑥)𝑥∈𝐸

• 𝑥 ∈ 𝑆

Pr 𝐸 = 𝑝 𝑥 =|𝐸|

|𝑆|𝑥∈𝐸

9

0.1

0.2

0.5

0 0.2

𝑆

Pr 𝐸 = 0.6

Page 10: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Language of probability

• 𝑆 = * 1,1 , 1,2 , 1,3 , 1,4 , 1,5 , 1,6 , 2,1 , 2,2 , 2,3 , 2,4 , 2,5 , 2,6 , 3,1 , 3,2 , 3,3 , 3,4 , 3,5 , 3,6 , 4,1 , 4,2 , 4,3 , 4,4 , 4,5 , 4,6 , 5,1 , 5,2 , 5,3 , 5,4 , 5,5 , 5,6 , 6,1 , 6,2 , 6,3 , 6,4 , 6,5 , (6,6)+

1. 1/9

2. 2/9

3. 3/9

4. 4/9

10

Page 11: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Conditional probability

𝐴 𝐵

Pr 𝐴 𝐵 = Pr ,𝐴∩𝐵-Pr,𝐵-

𝐴 ∩ 𝐵𝐵

11

0.1

0.2

0.5

0

0.2

𝑆

𝐴

𝐵

𝐴 ∩ 𝐵

Page 12: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Pennies and gold, revisited

• 𝐺𝑖 𝑖 ∈ *1,2+

• Pr 𝐺1 =1

2, Pr 𝐺1 ∩ 𝐺2 =

1

3

• Pr 𝐺2 𝐺1 =1/3

1/2=2

3

12

Page 13: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Conditional probability

• Pr 𝐴 ∩ 𝐵 = Pr 𝐴 × Pr,𝐵|𝐴-

• 𝐴 𝐵 𝐵𝐴 𝐵

• Applying iteratively: Pr 𝐴1 ∩⋯∩ 𝐴𝑛 = Pr 𝐴1 × Pr 𝐴2 𝐴1 ×⋯Pr,𝐴𝑛|𝐴1, ⋯ , 𝐴𝑛−1-

13

Page 14: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

bayes’ rule

• Pr B × Pr A B = Pr 𝐴 ∩ 𝐵 = Pr 𝐴 × Pr,𝐵|𝐴-

14

Pr 𝐴 𝐵 =Pr 𝐴 Pr ,𝐵|𝐴-

Pr ,𝐵-

Page 15: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Monty Hall problem

15

Page 16: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Monty Hall problem

16

Page 17: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Monty hall problem

• Pr 𝑃3 𝐶1, 𝑂2 =Pr ,𝑃3|𝐶1- Pr 𝑂2 𝐶1,𝑃3

Pr ,𝑂2|𝐶1-

• Pr 𝑃3 𝐶1 = 1/3

• Pr 𝑂2 𝐶1, 𝑃3 = 1

• Pr 𝑂2 𝐶1 = 1/2

• Pr 𝑃3 𝐶1, 𝑂2 = 2/3

1. 3/15

2. 4/15

3. 5/15

4. 6/15

17

Pr 𝐴 𝐵 =Pr 𝐴 Pr ,𝐵|𝐴-

Pr ,𝐵-

Page 18: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Independence

• 𝐴 𝐵Pr 𝐴 𝐵 = Pr,𝐴-

18

Page 19: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

The birthday paradox

• 𝑚

• 𝑆 = 1,… , 365 𝑚, s 𝑥 = (𝑥1, … 𝑥𝑚)

• 𝐸 = 𝑥 ∈ 𝑆 ∃𝑖, 𝑗, s.t. 𝑥𝑖 = 𝑦𝑗+

19

Page 20: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

The birthday paradox

• 𝐸

• 𝐸

• 𝐴𝑖 𝑖1, … , 𝑖 − 1

• 𝐸 = 𝐴1 ∩⋯∩ 𝐴𝑛•

Pr 𝐸 = Pr 𝐴1 × Pr 𝐴2 𝐴1 ×⋯Pr,𝐴𝑛|𝐴1, ⋯ , 𝐴𝑛−1-

20

Pr 𝐴𝑖 𝐴1, … , 𝐴𝑖−1 ?

Page 21: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

The birthday paradox

• 𝐴1 ∩⋯∩ 𝐴𝑖−1 𝑖 − 1

• 𝑖 − 1 𝑖

• Pr 𝐴𝑖 𝐴1, … , 𝐴𝑖−1 =365−(𝑖−1)

365= 1 −

𝑖−1

365

• Pr 𝐸 = 1 × 1 −1

365×⋯× 1 −

𝑚−1

365

• Pr 𝐸 = 1 − Pr,𝐸 -

21

Page 22: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

The birthday paradox

22

Pr 𝐸 :

Pr 𝐸 :

Page 23: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

The birthday paradox

1. 1/2

2. 0.75

3. 0.99999999999997

4. 1

23

Page 24: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Birthday attack*

𝑆 𝑘 𝑓(𝑆)

𝑆1, 𝑆2 𝑓 𝑆1 = 𝑓 𝑆2•

o 𝑚

o 𝑓(𝑚)

o

𝑚𝑚′ 𝑓 𝑚 = 𝑓(𝑚′)

24

Page 25: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Birthday attack*

1,… , 2160

• 2160 = 280

25

Page 26: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

Birthday attack*

263

26

Page 27: PowerPoint Presentationarielpro/15251/Lectures/lecture... · 2013-09-13 · The birthday paradox 22 Pr ... PowerPoint Presentation Author: Monica Banaszak Created Date: 9/13/2013

What we have learned

o

o

o

o

o

27