17
Probability Review Part I Design and Analysis of Algorithms I

Part I

  • Upload
    zan

  • View
    43

  • Download
    0

Embed Size (px)

DESCRIPTION

Probability Review. Part I. Design and Analysis of Algorithms I. Topics Covered. Sample spaces Events Random variables Expectation Linearity of Expectation See also: Lehman-Leighton notes (free PDF) Wikibook on Discrete Probability. Concept #1 – Sample Spaces. Concept #2 – Events. - PowerPoint PPT Presentation

Citation preview

Page 1: Part I

Probability Review

Part IDesign and Analysis

of Algorithms I

Page 2: Part I

Tim Roughgarden

Topics Covered• Sample spaces• Events• Random variables• Expectation• Linearity of ExpectationSee also:• Lehman-Leighton notes (free PDF)• Wikibook on Discrete Probability

Page 3: Part I

Tim Roughgarden

Concept #1 – Sample Spaces

Page 4: Part I

Tim Roughgarden

Concept #2 – Events

Page 5: Part I

1361121612

Consider the event (i.e., the subset of outcomes for which) “the sum of the two dice is 7”. What is the probability of this event?

Page 6: Part I

1𝑛141234

Consider the event (i.e., the subset of outcomes for which) “the chosen pivot gives a 25-75 split of better”. What is the probability of this event?

Page 7: Part I

Tim Roughgarden

Concept #2 – Events

Page 8: Part I

Tim Roughgarden

Concept #3 - Random Variables

Page 9: Part I

Tim Roughgarden

Concept #4 - Expectation

Page 10: Part I

6 .577.58

What is the expectation of the sum of two dice?

Page 11: Part I

𝑛4𝑛3𝑛2

3𝑛4

Which of the following is closest to the expectation of the size of the subarray passed to the first recursive call in QuickSort?

Page 12: Part I

Tim Roughgarden

Concept #4 - Expectation

Page 13: Part I

Tim Roughgarden

Concept #5 – Linearity of Expectation

Page 14: Part I

Tim Roughgarden

Linearity of Expectation (Proof)

Page 15: Part I

Tim Roughgarden

Example: Load Balancing

Page 16: Part I

Tim Roughgarden

Load Balancing Solution

Page 17: Part I

Tim Roughgarden

Load Balancing Solution (con’d)