Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 26

Class 26

Counting II + Probability

Mohammad Mahmoody

November 30, 2017
Tweet

More Decks by Mohammad Mahmoody

Other Decks in Education

Transcript

  1. Plan Today: – Counting II – Intro to probability theory

    Next Tuesday: Review Next Thursday: Final Exam
  2. Four basic counting problems • Want to choose elements from

    {1, … , } Repetition IS allowed Repetition is NOT allowed Ordered (sequence) ! − ! Not ordered (set)
  3. Counting when order does not matter • How many ways

    to select a -subset of 1, … , ? • Namely: = { ∣ ⊆ , = } what is ? • Idea: define to contain -sequences using 1, … , …
  4. Recall Example 3 from last time How many (at most)

    16-bit numbers with exactly 4 ones?
  5. Recall Example 4 from last time How many ways to

    choose 12 doughnuts from 5 varieties. Note: Order does not matter + Repetition is allowed. Seems like a new (4th) type of counting problem. We relate it to the previous problem (of no repetition) !
  6. Relating the Examples 3. How many (at most) 16-bit numbers

    with exactly 4 ones? 4. How many ways to choose 12 doughnuts from 5 varieties.
  7. Four basic counting problems • Want to choose elements from

    {1, … , } Repetition IS allowed Repetition is NOT allowed Ordered (sequence) ! − ! = ⋅ ! Not ordered (set) + − 1 − 1 = ! ! − !
  8. Examples of Questions • A bag of 10 donuts and

    5 bagels: 1. Remove one at random. What is the “probability” that it is a bagel? 2. Pick another item: What is the probability that it is a donut conditioned on 1st one being a bagel?
  9. Sample Space • The set of all outcomes of the

    experiment • Each have its own probability, adding up to 1. • Example: picking one of: 10 Donuts + 5 Bagels:
  10. Event • An Event ⊆ Ω: a subset of the

    outcomes Ω • Probability of : Pr = ∈ Pr[]
  11. Examples of Questions • A bag of 10 donuts and

    5 bagels: 1. Remove one at random. “Probability” that it is a bagel? 2. Pick another item: What is the probability it is a donut conditioned on 1st one being a bagel?