Top Banner
Vina Nguyen HSSP – July 20, 2008 1
37

Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Aug 05, 2018

Download

Documents

lequynh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Vina NguyenHSSP – July 20, 2008

1

Page 2: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

What is Bayes’ rule?

2

Page 3: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

What is the total probability theorem?

3

Page 4: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

What does “A is independent from B” mean?

4

Page 5: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

How do we test for independence?

5

Page 6: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

If we have probability, and conditionalprobability…

We can have independence, and conditionalindependence too

6

Page 7: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Definition:P(A B | C) = P(A|C)P(B|C)given C, A and B are independent

Another way to write this:P(A | B C) = P(A|C)

U

U

7

Page 8: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

We have two coins: blue and red

We choose one of the coins at random (probability = 1/2), and toss it twice

Tosses are independent from each other given a coin

The blue coin lands a head 99% of the time

The red coin lands a head 1% of the time

Events: H1 = 1st toss is a headH2 = 2nd toss is a head

8

Page 9: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Tosses are independent from each other GIVEN the choice of coin

conditional independence

9

Page 10: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

What if you don’t know what coin it is? Are the tosses still independent?

10

Page 11: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Bayes’ ruleIndependenceConditional Independence

Things are not always what they seem! But with these tools you can calculate the probabilities accurately

11

Page 12: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Where have we seen this?When sample space is finite and made up of equally likely outcomesP(A) = # elements in A

# elements in Ω

But counting can be more challenging…

12

Page 13: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Use the tree to visualize stagesStage 1 has n1 possible choices, stage 2 has n2possible choices, etc…

13

Page 14: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

All branches of the tree must have the same number of choices for the same stage

14

Page 15: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

An experiment with m stages has

n1n2…nm results,

where n1 = # choices in the 1st stage,n2 = # choices in the 2nd stage,

…nm = # choices in the mth stage

15

Page 16: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

How many ways can we pick k objects out of n distinct objects and arrange them in a sequence?

Restriction: k ≤ n

16

Page 17: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Pick 4 colors of M&Ms to be your universal setHow many 2-color sequences can you make?

…17

Page 18: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

At each stage, how many possible choices are there? [Use the counting principle]

18

Page 19: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Start with n distinct objectsArrange k of these objects into a sequence

# of possible sequences:

= n!(n – k)!

19

Page 20: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Formula reduces to: n!

This makes sense – at every stage we lose a choice: (n)(n-1)(n-2)…(1)

20

Page 21: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Start with n distinct objectsPick k to form a set

How is this different from permutations?Order does NOT matterForming a subset, not a sequence

21

Page 22: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Pick 4 colors as the universal setHow many 2-color combinations can you create?

Remember that for combinations,

=

22

Page 23: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Permutations = 1. Selecting a combination of k items2. Ordering the items

How many ways can you order a combination of k items?

23

Page 24: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

(# k-permutations) =

(# ways to order k elements) x (# of combinations of size k)

24

Page 25: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Start with n distinct objectsArrange k of these objects into a set

# of possible combinations:

= n!k! (n – k)!

25

Page 26: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

“n” choose “k”

nk

Side note: this is also known as the “binomial coefficient,”used for polynomial expansion of the binomial power [outside of class scope]

( )

26

Page 27: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

We have a set with n elementsPartition of this set has r subsetsThe ith subset has ni elements

How many ways can we form these subsets from the n elements?

27

Page 28: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

6 total M&Ms1 of one color2 of one color3 of one color

How many ways can you arrange them in a sequence?

28

Page 29: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

One perspective6 slots = 3 subsets (size 1, size 2, size 3)Each subset corresponds to a color

At each stage, we calculate the number of ways to form each subset

29

Page 30: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Stage #1: Place the first color6 possible slotsNeed to fill 1 slot

# combinations: 61( )

30

Page 31: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Stage #2: Place the second color5 possible slotsNeed to fill 2 slots

# combinations: 52( )

Notice how it does not matter which M&M we place in which slot – this implies order does not matter use combinations

31

Page 32: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Stage #3: Place the third color3 possible slotsNeed to fill 3 slots

# combinations: 33( )

32

Page 33: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Solution to our example:6 5 31 2 3

Generalized form?

( )( ) )(

33

Page 34: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Start with n-element set (no order)In this set, there are r disjoint subsetsThe ith subset contains ni elements

How many ways can we form the subsets?

n!n1!n2!...nr!

34

Page 35: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

A class has 4 boys and 12 girls. They are randomly divided into 4 groups of 4. What’s the probability that each group has 1 boy?

Use counting methods (partitions) this time

35

Page 36: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

The Counting PrinciplePermutationsCombinationsPartitions

36

Page 37: Vina Nguyen HSSP – July 20, 2008 · How many ways can you order a combination of . k. items? 23 (# k-permutations) = (# ways to order . k. elements) x (# of combinations of size

Vina Nguyen

MIT OpenCourseWarehttp://ocw.mit.edu

Probability: Random Isn't So RandomSummer 2008

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