42
Counting and Probability •Sets and Counting •Permutations & Combinations •Probability

Counting and Probability Sets and Counting Permutations & Combinations Probability

Embed Size (px)

Citation preview

Page 1: Counting and Probability Sets and Counting Permutations & Combinations Probability

Counting and Probability

•Sets and Counting•Permutations & Combinations•Probability

Page 2: Counting and Probability Sets and Counting Permutations & Combinations Probability

A set is a well-defined collection of distinct objects.

Well-defined means there is a rule that enables us to determine whether a given object is an element of the set.If a set has no elements, it is called the empty set, or null set, and is denoted by the symbol .

Sets and Counting

Page 3: Counting and Probability Sets and Counting Permutations & Combinations Probability

If two sets A and B have precisely the same elements, then A and B are said to be equal and write A = B.

If each element of a set is also an element of

a set , then we say that is a subset of and

write

A

B A B

A B

If and , then we say that is a

of and write

A B A B A

B A B

proper subset .

A A for any set

Page 4: Counting and Probability Sets and Counting Permutations & Combinations Probability

Write down all subsets of x y z, , .

0 elements:

1 element: x y z, ,

2 elements: x y x z y z, , , , ,

3 elements: x y z, ,

Page 5: Counting and Probability Sets and Counting Permutations & Combinations Probability

If and are sets, the of with ,

denoted, , is the set consisting of elements

that belong to both and . The of

with , denoted , is the set consisting of

elements that belong to or , or both.

A B A B

A B

A B A

B A B

either A B

intersection

union

Page 6: Counting and Probability Sets and Counting Permutations & Combinations Probability

Designate the denoted

as the set consisting of all the elements

we wish to consider.

universal set, ,U

If is a set, the of , denoted ,

is the set consisting of all the elements in the

universal set not in .

A A A

A

complement

Page 7: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

A

B

A B

Page 8: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

BA

A B

Page 9: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

BA

A B

Page 10: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

B

A B

A

Page 11: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

AA

A

A

Page 12: Counting and Probability Sets and Counting Permutations & Combinations Probability

U

A B

A B A B A

blue, red, green, yellow, orange

blue, red blue, green, orange

Find

(a) (b) (c)

(a) blue, red, green, orangeA B

(b) blueA B

(c) green, yellow, orangeA

Page 13: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Counting Formula

If A and B are finite sets, then

n A B n A n B n A B

Page 14: Counting and Probability Sets and Counting Permutations & Combinations Probability

In survey of 50 people, 21 said they owned stocks, 32 said they owned bonds and 12 said they owned both stocks and bonds. How many of the 50 people owned stocks or bonds? How many owned neither?

A: person owns stock B: person owns bonds

n A B n A n B n A B( ) ( ) ( ) ( )

= 21 + 32 - 12 = 41

50 - 41 = 9 owned neither

Page 15: Counting and Probability Sets and Counting Permutations & Combinations Probability

Universe is 50 people. In A = 21 owned stocks. In B = 32 owned bonds. In AB = 12 owned both stocks and bonds. In AB = 53-12 = 41 owned stocks or bonds. In (AB)= 50-41 = 9 owned neither.

A 21

B 32

(AB) _ _ 9

AB _12

Page 16: Counting and Probability Sets and Counting Permutations & Combinations Probability

Permutations and Combinations

This is a tricky subject where even the text author makes mistakes. The next three slides are to distinguish some of the subtleties. After these are the slides from the text set and that help to elaborate some cases. Some situations can be very difficult to evaluate.

Page 17: Counting and Probability Sets and Counting Permutations & Combinations Probability

Counting Permutation Cases I A permutation is an ordered arrangement of r

objects from n objects. To find the total number of possible cases, the easy types of situations are:

1. Multiplication of p,q,r,s, ... ways of selection => Total number of cases is N = p•q•r•s•...

2. The number of permutations of r distinct objects with allowed repetition from n distinct objects (order is important) => N = nr

3. The number of permutations of r distinct objects with no repetition from n distinct objects (order is important) => N = P(n, r) = n!/(n - r)!

Page 18: Counting and Probability Sets and Counting Permutations & Combinations Probability

Counting Permutation Cases II A permutation is an ordered arrangement of r

objects from n objects.

An important harder situation of finding the total number of possible cases is when there are k distinct types each of non-distinct objects, with n1 of the 1st type, n2 of the 2nd type, ... nk of the kth type, and n = n1 + n2 + n3 + ... nk.

4. Permutation of n, some non-distinct, objects with allowed repetition from k distinct types of objects (order is important) =>

N = n!/[n1! • n2! ... • nk!].

Page 19: Counting and Probability Sets and Counting Permutations & Combinations Probability

Counting Combination Cases A combination is an arrangement with no

regard to order of r distinct objects without repetition from n distinct objects (r < n). For finding the total number of possible cases, the easy type of situation is:

The number of combinations of r distinct objects without repetition from n distinct objects (order is not important) =>

N = C(n, r) = n!/[r!(n - r)!].

Page 20: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Multiplication Principle of Counting

If a task consists of a sequence of choices in which there are p selections for the first choice, q selections for the second choice, r selections for the third choice, and so on, then the task of making these selections can be done in

p q r different ways.

Permutations and Combinations

Page 21: Counting and Probability Sets and Counting Permutations & Combinations Probability

If a license plate consists of a letter, then 5 numbers, how many different types of license plates are possible?

26 10 10 10 10 10 2 600 000 , , license plates

Page 22: Counting and Probability Sets and Counting Permutations & Combinations Probability

A permutation is an ordered arrangement of n distinct objects without repetitions. The symbol P(n, r) represents the number of permutations of n distinct objects, taken r at a time, where r < n.

Page 23: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Number of Permutations of n Distinct Objects Taken r at a Time

The number of different arrangements from selecting r objects from a set of n objects (r < n), in which

1. the n objects are distinct2. once an object is used, it cannot be repeated

3. order is importantis given by the formula

P n rn

n r( , )

!( )!

Page 24: Counting and Probability Sets and Counting Permutations & Combinations Probability

Evaluate: P( , )10 3

P( , )!

( )!10 3

1010 3

107

!!

10 9 8 77

!!

720

Page 25: Counting and Probability Sets and Counting Permutations & Combinations Probability

A combination is an arrangement, without regard to order, of n distinct objects without repetitions. The symbol C(n, r) represents the number of combinations of n distinct objects taken r at a time, where r < n.

Page 26: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Number of Combinations of n Distinct Objects Taken r at a Time

The number of different arrangements from selecting r objects from a set of n objects (r < n), in which

1. the n objects are distinct

2. once an object is used, it cannot be repeated

3. order is not important

is given by the formula

.)!(!

!)(

rnr

n

r

nCrn,C rn

Page 27: Counting and Probability Sets and Counting Permutations & Combinations Probability

Evaluate: 3)C( ,10

C( , )!

!( )!10 3

103 10 3

103 7

!! !

10 9 8 73 7

!! !

10 9 83 2 1

120

Page 28: Counting and Probability Sets and Counting Permutations & Combinations Probability

An event is an outcome from an experiment. Its probability gives the likelihood it occurs.A probability model lists the different outcomes from an experiment and their corresponding probabilities.

To construct probability models, we need to know the sample space of the experiment. This is the set S that lists all the possible outcomes of the experiment.

Probability

Page 29: Counting and Probability Sets and Counting Permutations & Combinations Probability

Determine the sample space resulting from the experiment of rolling a die.

S = {1, 2, 3, 4, 5, 6}

Page 30: Counting and Probability Sets and Counting Permutations & Combinations Probability

Properties of Probabilities

For a sample space S e e en 1 2, ,

1 0 1. ( ) for all events P e ei i

2 1 21

. ( ) ( ) ( ) ( )

= 1

P e P e P e P ei ni

n

Page 31: Counting and Probability Sets and Counting Permutations & Combinations Probability

Determine which of the following are probability models from rolling a single die.

Outcome Probability1 0.32 0.13 0.054 0.25 0.156 0.25

Not a probability model. The sum of all probabilities is not 1.

Page 32: Counting and Probability Sets and Counting Permutations & Combinations Probability

Outcome Probability1 0.22 0.23 0.24 0.25 0.26 0

All probabilities between 0 and 1 inclusive and the sum of all probabilities is 1.

Page 33: Counting and Probability Sets and Counting Permutations & Combinations Probability

Outcome Probability1 0.252 0.13 0.354 0.155 0.26 -0.05

Not a probability model. The event “roll a 6” has a negative probability.

Page 34: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Probability for Equally Likely Outcomes

If an experiment has n equally likely outcomes, and if the number of ways an event E can occur is m, then the probability of E is

P EE m

n( ) Number of ways that can occur

Total number of possible outcomes

Page 35: Counting and Probability Sets and Counting Permutations & Combinations Probability

A classroom contains 20 students: 7 Freshman, 5 Sophomores, 6 Juniors, and 2 Seniors. A student is selected at random. Construct a probability model for this experiment.

P F( ) 720

P Soph( ) 520

P Jr( ) 620

P Sr( ) 220

Page 36: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Additive Rule of P(E F)For any two events and

E F

P E F P E P F P E F( ) ( ) ( ) ( )

if and are mutually exclusive.

P E F P E P F

E F

( ) ( ) ( )

Page 37: Counting and Probability Sets and Counting Permutations & Combinations Probability

What is the probability of selecting an Ace or Diamond from a standard deck of cards?

P P( (Ace) =4

52 Diamond) =

1352

1

1314

P

P

(Ace or Diamond)

= (Ace) + P(Diamond) - P(Ace and Diamond)

113

14

152

1652

413

Page 38: Counting and Probability Sets and Counting Permutations & Combinations Probability

Let S denote the sample space of an experiment and let E denote an event. The complement of E, denoted E, is the set of all outcomes in the sample space S that are not outcomes in the event E.

Page 39: Counting and Probability Sets and Counting Permutations & Combinations Probability

Theorem: Computing Probabilities of Complementary Events

If E represents any event and E represents the complement of E, then

P E P E( ) ( ) 1

Page 40: Counting and Probability Sets and Counting Permutations & Combinations Probability

The probability of having 4 boys in a four child family is 0.0625. What is the probability of having at least one girl?

Sample Space: {4 boys; 3 boys, 1 girl, 2 boys, 2 girls; 1 boy, 3 girls; 4 girls}

E = “at least one girl”

E = “4 boys”

P(E) = 1 - P(E) = 1 - 0.0625 = 0.9375

Page 41: Counting and Probability Sets and Counting Permutations & Combinations Probability

What is the probability of obtaining 3 of a kind when 5 cards are drawn from a standard 52-card deck?

P(3 of a kind) CC

( , )( , )

4 3 48 4452 5

0 00325 0 325%. .This answer from the text slides is just wrong. For the correct value of 2.11% and similar examples see either of the poker sites:

http://www.math.sfu.ca/~alspach/comp18/

http://www.pvv.ntnu.no/~nsaa/poker.html

Page 42: Counting and Probability Sets and Counting Permutations & Combinations Probability

What is the probability of obtaining 3 of a kind when 5 cards are drawn from a standard 52-card deck?

P(3 of a kind))5,52(

44)2,12(413

C

C

%11.20211.0

Done correctly, one has

960,598,2

912,54

Why?