Download Counting Principles (combinations and

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

Transcript
Counting Principles
(Permutations and Combinations )
© 2012 Pearson Education, Inc.. All rights reserved.
Example
A combination lock can be set to open to any 4-digit
sequence.
(a) How many sequences are possible?
(b) How many sequences are possible if no digit is repeated?
Solution: (a) Since there are 10 digits namely 0, 1, 2…..9, there
are 10 choices for each of the digit. By the multiplication
principle, there are 10 ∙10 ∙10 ∙10 =10,000 different sequences.
(b)There are 10 choices for the first digit. It cannot be used
again, so there are 9 choices for the second digit, 8 choices for
the third digit, and then 7 choices for the fourth digit.
Consequently, the number of such sequences is
10 ∙ 9 ∙ 8 ∙7 =5040 different sequences.
© 2012 Pearson Education, Inc.. All rights reserved.
Example
How many different ways can you choose a bagel,
muffin or donut to eat and coffee or juice to drink?
Tree diagram
© 2012 Pearson Education, Inc.. All rights reserved.
Example
A teacher is lining up 8 students for a spelling bee. How many
different line-ups are possible?
Solution: Eight choices will be made, one for each space that will
hold a student. Any of the students could be chosen for the first
space. There are 7 choices for the second space, since 1 student
has already been placed in the first space; there are 6 choices for
the third space, and so on.
By the multiplication principle, the number of different possible
arrangements is 8 ∙7 ∙ 6 ∙ 5 ∙ 4 ∙ 3 ∙ 2 ∙1 = 40,320.
© 2012 Pearson Education, Inc.. All rights reserved.
(order does matter)
TI-83/84
function
© 2012 Pearson Education, Inc.. All rights reserved.
Example
A teacher wishes to place 5 out of 8 different books on her
shelf. How many arrangements of 5 books are possible?
Solution : The teacher has 8 ways to fill the first space, 7 ways
to fill the second space, 6 ways to fill the third, and so on…
Since the teacher wants to use only 5 books, only 5 spaces can
be filled (5 events) instead of 8, for 8 ∙7 ∙ 6 ∙ 5 ∙ 4 = 6720
arrangements.
© 2012 Pearson Education, Inc.. All rights reserved.
Example
Find the number of permutations of the letters L, M, N, O,
P,
and Q, if just three of the letters are to be used.
Solution: P(n, r )  n! . Here n  6 and r  3.
(n - r )!
6!
6!


(6 - 3)! 3!
6  5  4  3  2 1

 120
3  2 1
© 2012 Pearson Education, Inc.. All rights reserved.
How many permutations are there of two letters from the set
{A,B,C}.
n!
P(n, r ) 
(n  r )!
3!
3!
P(3,2) 
  3 2  6
(3  2)! 1!
© 2012 Pearson Education, Inc.. All rights reserved.
(order does not matter)
TI-83/84
function
© 2012 Pearson Education, Inc.. All rights reserved.
Example
How many committees of 4 people can be formed
from a group of 10 people?
Solution: A committee is an unordered group, so use the
combinations formula for C(10,4).
10!
10!
C (10, 4) 

4!(10  4)! 4!6!
10  9  8  7  6  5  4  3  2 1 10  9  8  7


 210
4  3  2  1  6  5  4  3  2 1 4  3  2  1
© 2012 Pearson Education, Inc.. All rights reserved.
© 2012 Pearson Education, Inc.. All rights reserved.
Example
From a class of 15 students, a group of 3 or 4 students will be
selected to work on a special project. In how many ways can a
group of 3 or 4 students be selected?
Solution: The number of ways to select group of 3 students
from a class of 15 students is C(15, 3) = 455.
The number of ways to select group of 4 students from a class
of 15 students is C(15, 4) = 1365.
The total number of ways to select a group of 3 or 4 students
will be the 1820.
© 2012 Pearson Education, Inc.. All rights reserved.
© 2012 Pearson Education, Inc.. All rights reserved.
Example
(a) How many 4-digit code numbers are possible if no digits are
repeated?
Solution: Since changing the order of the 4 digits results in a
different code, permutations should be used.
(b) A sample of 3 light bulbs is randomly selected from a batch
of 15. How many different samples are possible?
Solution: The order in which the 3 light bulbs are selected is not
important. The sample is unchanged if the items are rearranged,
so combinations should be used.
© 2012 Pearson Education, Inc.. All rights reserved.
Example
(c) In a baseball conference with 8 teams, how many games
must be played so that each team plays every other team exactly
once?
Solution: Selection of 2 teams for a game is an unordered
subset of 2 from the set of 8 teams. Use combinations again.
(d) In how many ways can 4 patients be assigned to 6 different
hospital rooms so that each patient has a private room?
Solution: The room assignments are an ordered selection of 4
rooms from the 6 rooms. Exchanging the rooms of any 2
patients within a selection of 4 rooms gives a different
assignment, so permutations should be used.
© 2012 Pearson Education, Inc.. All rights reserved.
Introduction to Probability
Set – a collection of elements that satisfy a certain condition.
Write the elements belonging to the set {x | x is a state whose
name begins with the letter O}.
Solution: The state names that begin with the letter O make up
the set {Ohio, Oklahoma, Oregon }.
© 2012 Pearson Education, Inc.. All rights reserved.
Example 1
Decide if the statement is true or false.
{2, 4,6}  {6, 2, 4}
Solution: The first set is a subset of the second because
each element of first set belongs to second set. (The fact
that the elements are listed in a different order does not
matter.) Therefore, the statement is true.
© 2012 Pearson Education, Inc.. All rights reserved.
© 2012 Pearson Education, Inc.. All rights reserved.
Sample Space – The set of all possible outcomes of an
experiment or event.
A) What is the sample space?
B) What is the probability of getting a 3?
C) What is the probability of getting an
odd number?
© 2012 Pearson Education, Inc.. All rights reserved.
Example
Two coins are tossed, and a head or a tail is recorded for each
coin. Write the event E: the coins show exactly one head.
Solution: Tossing a coin is made up of the outcomes heads (H)
or tails (T). If S represents the sample space of tossing two
coins, then S = {HH, HT, TH, TT}.
Two outcomes satisfy this condition: so,
E = {HT, TH}.
© 2012 Pearson Education, Inc.. All rights reserved.
Number of elements
in the sets
Example
Two coins are tossed, and a head or a tail is recorded for each
coin.
A)
Give a sample space for this experiment.
B)
What is the probability of getting at least one head.
Solution: A) Tossing a coin is made up of the outcomes heads (H)
or tails (T). If S represents the sample space of tossing two
coins then S = {HH, HT, TH, TT}.
Solution : B) E = {HH,HT,TH}
P( E ) 
© 2012 Pearson Education, Inc.. All rights reserved.
n( E ) 3

n( S ) 4
 0.152
 0.384
 0.56
 0.616
 0.179
 0.0625
 0.625
 0.25
 0.75
Monty Hall probability puzzle
http://www.youtube.com/watch?v=mhlc7peGlGg&safe=active
 0.824
 0.712
Probability of Multiple Events
(E’ is called the complement of E)
(no outcomes in common; if one event occurs the other cannot)
4
1
6
5
© 2012 Pearson Education, Inc.. All rights reserved.
EF  6
2
Example
A study of workers earning the minimum wage grouped such
workers into various categories, which can be interpreted as
events when a worker is selected at random. Source:
Economic Policy Institute. Consider the following events:
E: worker is under 20;
F: worker is white;
G: worker is female.
Describe the following event in words:
Solution:
E  F .
E  F  is the event that the worker is not under 20
and the worker is not white.
© 2012 Pearson Education, Inc.. All rights reserved.
Independent Events
The fact that one event has occurred, does not change the probability
of the second event occurring.
** Events that are mutually exclusive must be dependent, but
dependent events are not necessarily mutually exclusive**
Read as; the
probability of event
F occurring given
E has occurred
© 2012 Pearson Education, Inc.. All rights reserved.
Read as; the
probability of event
E occurring given
F has occurred
(General rule of addition)
P( E  F )  0
So the equation simplifies to P( E  F )  P( E )  P( F )
For mutually exclusive events,
© 2012 Pearson Education, Inc.. All rights reserved.
Example
If a single card is drawn from an ordinary deck of cards, find
the probability of an ace or a club.
Solution: Let A represent the event “an ace ” and C the event
“club card.” There are 4 aces in the deck, so P( A)  4 / 52.
There are 13 clubs in the deck, so
P(C )  13 / 52.
Since there is 1 ace of club in the deck, P ( A C )  1/ 52.
By the union rule, the probability of the card being an ace or a
Club card is
P( A C )  P( A)  P(C )  P( A C ).
4 13 1
16 4
  
  .
52 52 52
52 13
© 2012 Pearson Education, Inc.. All rights reserved.
Example
Suppose two fair dice are rolled. Find the probability that the sum is 8, or both
die show the same number.
Solution:
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
By the union rule, P(sum is 8 or both die show same number)
5 6 1 10 5
=   
 .
36 36 36 36 18
© 2012 Pearson Education, Inc.. All rights reserved.
Example
Find the probability that when two fair dice are rolled, the sum
is less than 11.
Solution: To calculate this probability directly, we must find the
probabilities that the sum is 2, 3, 4, 5, 6, 7, 8, 9 or 10 and then
add them. It is much simpler to first find the probability of the
complement, the event that the sum is greater than or equal to 11.
P(sum  11)  1  P(sum  11)
3 33 11
 1   .
36 36 12
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
© 2012 Pearson Education, Inc.. All rights reserved.
(General rule of multiplication)
When events are Independent;
P( E | F )  P( E )
So the equation simplifies to:
P( F | E )  P( F )
Independent
Not
Independent
Not
Independent
Independent
1/6
9/34
0.54
2/7
9/25
Not mutually exclusive
mutually exclusive
Not mutually exclusive
P(F); represented by large
circle.
P(E and F); represented by
overlapping section
© 2012 Pearson Education, Inc.. All rights reserved.
Example
The following table shows national employment
statistics. Use the table to find
each probability.
9729
9392
8937
5801
4383
19121
7. P(male | professional)
4190
 0.47
8937
10. P(professional | female)
4747
 0.51
9392
8. P(laborer | female)
1432
 0.15
9392
11. P(sales | male)
2588
 0.27
9729
9. P(female | sales)
3213
 0.55
5801
12. P(male | laborer)
2951
 0.67
4383
Example
Use a tree diagram to solve the following problem.
16. A car insurance company compiled the following information from a recent
survey. 75% of drivers carefully follow the speed limit Of the drivers who carefully
follow the speed limit, 80% have never had an accident. Of the drivers who do not
carefully follow the speed limit, 65% have never had an accident.
What is the probability that a driver does not carefully follow the speed limit and has
never had an accident?
C is the event careful
driver.
0.80
NA is the event no
accident
0.75
0.20
0.65
P (C  NA)  0.6
P(C  NA' )  0.15
P(C 'NA)  0.1625
0.25
0.35
P(C 'NA' )  0.0875