Download Section2.6notesall

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

History of statistics wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Section 2.6: Probability and Expectation
Practice HW (not to hand in)
From Barr Text
p. 130 # 1, 2, 4-12
section and the next section is to show a probabilistic method that allows one to
determine the likely keyword length which is the first step in breaking this cipher. In this
section, we review the basics of counting and probability.
Permutations
Permutations represent an ordered listing of a set. Before defining what a permutation is,
we give an important preliminary definition.
Definition: Factorial. If n is a positive integer, then n factorial, denoted as n!, is defined
to be
n !  n(n  1)( n  2) 2  1
Note: 1! 1, 0! 1.
Example 1: Calculate 3!, 5!, and
10!
.
9!
Solution: 3! 3  2 1  6 , 5! 5  4  3  2 1  120 , and
9! 

10! 10  9  8  7  6  5  4  3  2  1 10  9!


 10 .
9!
9!
9!
█
Example 2: John, Mary, and Sue have bought tickets together for a basketball games. In
how many ways could they arrange themselves in the 3 seats? In 6 seats?
Solution: The following chart list the ways in which John, Mary, and Sue can be seated
in the 3 seats:
Left
John
John
Mary
Mary
Sue
Sue
Middle
Mary
Sue
John
Sue
John
Mary
Right
Sue
Mary
Sue
John
Mary
John
Hence, there are 6 total seating arrangements. A more efficient way of determining this
number is to realize one initially has 3 people to sit in the left seat, then 2 people to sit in
the middle, and then 1 left over to sit on the right giving a total of
3  2  1  3 !  6 total seating arrangemen ts .
  
Left M iddle Right
Using this same method, we can see that the total number of ways 6 people can be put in
6 seats can be found by computing
6  5  4  3  2  1  6 !  720 total seating arrangemen ts.
█
Formal Definition of a Permutation: A permutation of a set of objects is a listing of the
objects in some specified order.
Our goal in this section will be to count the number of permutations for specific objects.
The next three examples illustrate how this can be done.
Example 3: A baseball team is made up of 9 players and the manager wants to construct
batting orders..
a. How many total possible batting orders can the manager construct?
b. How many batting orders can the manager construct if the pitcher must bat last?
c. How many batting orders can the manager construct if the shortstop and pitcher bats
eighth or ninth?
Solution: For part a, one can calculate the total possible number of batting orders by
realizing that the manager has 9 possible players to bat first, then 8 possible players to bat
second, then 7 players left to bat third, etc. This gives a total of
9  8  7  6  5  4  3  2  1  9 !  362880 possible batting orders.
For part b, the fact that the pitcher must bat last leaves only 1 choice for the last position
in the order. That leaves 8 players to bat first, 7 to bat second, 6 to bat third, etc. This
gives a total of
8  7  6  5  4  3  2  1  1  40320 possible batting orders.

pitcher
In part c, the pitcher or shortstop can bat eighth or ninth, leaving 2 choices for eighth
position and 1 choice for the ninth position. This leaves 7 players to bat first, 6 to bat
second, 5 to bat third, etc. This gives a total of
7  6  5  4  3  2  1  2  1  10080 possible batting orders.



pitcher or
shortstop
█
Example 4: If there are 50 contestants in a beauty pageant, in how many ways can the
judges award first, second, and third prizes?
Solution: Starting with 50 contestants and assuming each contestant can win only one of
the prizes, this leaves the judges with 50 contestants to select for first place, 49
contestants for second place, and 48 contestants for third place giving a total of
50  49  48  117600 wyys to award prizes.
  
First Second Third
Prize Prize
Prizet
█
Example 5: How many license plates can be made if each plate consists of
a. two letters followed by three digits and repetition of letters and digits is allowed?
b. two letters followed by three digits and no repetition of letters or digits is allowed?
c. if the first digit cannot be a zero and no repetition of letters or digits is allowed?
Solution: For part a, if there is no repetition, there is 26 choices for both the first and
second letters, and 10 choices (0-9) for each of the three digits. This gives a total of
26  26  10  10  10  676000 total license plates.
In part b, since there is no repetitions, there are 26 choices for the first letter, 25 choices
for the second letter, 10 choices for the first digit, 9 choices for the second digit, and 8
choices for the thirds. This gives a total of
26  25  10  9  8  468000 total license plates.
For part c, there are only 9 choices for the first digit since zero cannot be used. After the
first digit is chosen, this leaves 9 choices for the second digit and then 8 for the third
since there is no repetition. This gives a total of
26  25  9  9  8  421200 total license plates.
█
Note: Given a collection of r objects, the number of ordered arrangements (permutations)
of r objects taken from n objects, denoted as P(n, r) is given by
P ( n, r ) 
n!
(n  r ) !
(1)
Example 6: Find P(10,4) .
Solution: Using (1), P(10,4) 
10 !
10 ! 10  9  8  7  6 !


 10  9  8  7  5040 .
(10 - 4) ! 6 !
6!
█
Equation (1) can be used to count the number of permutations as the next example
indicates.
Example 7: Going back to Example 4, find the number of ways that judges award first,
second, and third prizes in a beauty contest with 50 contestants using equation (1).
Solution:
P(50,3) 
50 !
50 ! 50  49  48  47 !


 50  49  48  117600 ways.
(50-3) ! 47 !
47 !
█
Combinations
We now want to consider how we can count different arrangements when the order of the
arrangements does not matter.
Example 8: Suppose you have five clean shirts and are going to pack two for a trip. How
many ways can you select the two shirts? Compare the difference in this problem when
the order the shirts are packed matters and when it does not.
Solution: If we label the five shirts as {A, B, C, D, E}, then the shirts can be packed in
the following manner: {A, B}, {A, C}, {A, D}, {A, E}, {B, C}, {B, D}, {B, E}, {C, D},
{C, E}, and {D, E}. Counting, this gives 10 different ways the two shirts can be packed.
Note in this example that we are disregarding order. That is, we are assuming, for
example, that the two shirts packed as {A, B} is the same as the two shirts packed as
{B, A}. Each of these unordered choices of shirts is known as a combination of shirts. If
the order that the shirts were chosen did matter, we would have a permutation. The
number of ways to select shirts would be 5  4  20 ways to choose shirts.
█
Definition of Combinations: A combinations is an unordered set of r objects chosen
from a set of n is called a combination of r objects chosen from n objects. The number of
different combinations of r unordered objects chosen from n unordered objects is
C ( n, r ) 
n!
r ! (n  r ) !
(2)
Example 9: Compute C (7,4) and C (10,3) .
Solution: Using (2), we see that
C (7,4) 
7!
7!
7  6  5  4 ! 7  6  5



 7  5  35
4 ! (7  4) ! 4 ! 3 ! 4 ! 3  2  1
6
C (10,3) 
10 !
10 ! 10  9  8  7 ! 720



 120 .
3 ! (10  3) ! 3 ! 7 ! 3  2  1  7 !
6
█
Example 10: Referring back to Example 8, use equation (2) to find the number of ways
you can choose 2 shirts from 5 total to go on a trip.
Solution: Using equation (2), we see that
C (5,2) 
5!
5!
5  4  3 ! 20



 10 ways to choose two shirts .
2 ! (5  2) ! 2  3 !
2  3!
2
█
A permutation is a listing of objects where the order of the objects in the list is important.
Usually, some ranking or order of the list is given to note its importance. In a
combination, the order of the objects in the list is not important. Thus, counting the
number of permutations and combinations is different as a result. The following
examples illustrate the difference between the two.
Example 11: Suppose Radford’s Honors Academy wants to select four students out of
nine total for a committee to go to an honors convention. How many ways can the
committee of four be chosen?
Solution: Since the order the four students are chosen for the convention has no bearing
on how they go, this is an example of a combination. Hence, there are
9!
9!
9  8  7  6  5 ! 3024
C (9,4) 



 126 ways to choose the committee
4 ! (9  4) ! 4 !  5 ! 4  3  2  1  5 !
24
of four students.
█
Example 12: Suppose Radford’s Honors Academy wants to select four students out of nine
total for a committee to go to an honors convention. For the four students selected, one will
serve as President, one as Vice President, one as Secretary, and the other as Treasurer for
the committee. How many ways can this committee be selected?
Solution: Since we want a committee with specific ranks, the order that the committee is
selected is important. Assuming no one person can serve more than one position, we see
that there are
9  8  7  6  3024
total committees of four students that can be chosen.
█
Basic Probability
We now discuss some basic concepts of probability. We start out with a basic definition.
Definition: The sample space of an experiment is the set of all possible outcomes of an
experiment.
p
Example 13: Determine the sample space of the single toss of a die.
Solution: Since a single die has six faces, the sample space for a single toss of a die is
{1, 2, 3, 4, 5, 6}
█
Definition: An event is any subset of the sample space.
Example 14: List some events for sample space consisting of a single roll of a die.
Solution: Three subsets of the die sample space that would represent events would be {1},
{1, 3}, and {2, 4, 6} (there are others).
Definition of Probability: The probability of and event is a number between 0 and 1 that
represents the chance of an event occurring. If A is an event , then
Probabilit y that
 P( A) 
the number of ways that the event A can occur
total number of outcomes that occurs in the sample space .
the event A occurs
Example 15: On a single toss of a die, find the probability of rolling
a. a 5.
b. an even number.
c. the number showing is no less than a 5.
d. roll that is not a 2.
e. a 7.
Solution: For part a, since in a single roll there is only one way to throw a five out of six
1
total possible rolls (1 – 6), P (rolling a 5)  . For part b, one can roll an even number in
6
3 1
three ways, either by rolling a 2, a 4, or a 6. Hence, P(rolling an even number)   .
6 2
For part c, if a single roll is no less than a 5, than it can be a 5 or 6 or two ways this event
2 1
can be a success. Thus, P(no less than a 5)   . For part d, one can not roll a two in
6 3
5
five different ways, by either rolling a 1, 3, 4, 5, or 6. Hence, P (not a 2)  . On part e,
6
0
it is impossible to roll a 7 on a single die toss. Thus, P(roling a 7)   0 .
█
6
The last example illustrates some elementary properties of probability.
Facts about Probability
Given the probability P of an event occurring.
1. 0  P  1.
2. Given two events A and B that are mutually exclusive (both events A and B are
separate, they can’t happen at the same time), then
P( A or B)  P( A)  P( B) .
Example 16: For the single die roll example, explain why rolling a 4 and a 6 are
mutually exclusive events. Then find the probability of rolling a 4 or a 6.
Solution: Rolling a 4 or a 6 are mutually exclusive events in that on a single roll you
cannot roll both a 4 and a 6. Hence,
P(4 or a 6)  P(4)  P(6) 
1 1 2 1
   .
6 6 6 3
█
3. Given the probability of an event A, P(not A)  1  P( A) .
Example 17: For the single die roll example, use fact 3 to determine the probability of
not rolling a 5.
1
, then
6
1 5
P(nor rolling a 5)  1   .
6 6
Solution: Since the probability of rolling a 5 is
█
4. The sum of all the probabilities of mutually exclusive events in a sample space is equal
to 1.
Example 18: Find the probability on a single die roll of rolling a 1, 2, 3, 4, 5, or a 6.
Solution: Since each single roll is a mutually exclusive event, then
P(rolling a 1 or 2 or 3 or 4 or 5 or 6) 
1 1 1 1 1 1
      1.
6 6 6 6 6 6
█
Example 19: Suppose you toss two ordinary die and observe the sum of roll.
a. What is the sample space of the event?
b. What is the probability that the sum of the numbers of the die is a 7? A 5?
c. Find the probability that the sum of the numbers is at most 5.
d. Find the probability that exactly one of the numbers is a 5.
Solution: For a) the following represents all the possible rolls for the two die:
1,1
2,1
3,1
4,1
5,1
6,1
1,2
2,2
3,2
4,2
5,2
6,2
1,3
2,3
3,3
4,3
5,3
6,3
1,4
2,4
3,4
4,4
5,4
6,4
1,5
2,5
3,5
4,5
5,5
6,5
1,6
2,6
3,6
4,6
5,6
6,6
This gives a total of 36 possible outcomes. For part b, examining the sample space table
shows there are 6 possible ways to roll a 7 (rolling a 6,1 , 5,2 , 4,3 , 3,4 2,5 , or a 1,6).
6
1
 . Similarly, there 4 ways a five can be rolled. Hence,
Hence, P (rolling a 7) 
36 6
4 1
P (rolling a 5) 
 . On part c, if the sum of the numbers is at most 5, then rolling a 2
36 9
(1,1), a 3 (2,1 or 1,2), a 4 (3,1 2,2 or 1,3), or a 5 (4,1, 3,2 2,3 1,4) makes the event
10 5

. Finally, for part d,
36 18
there are 8 possible rolls that have exactly one 5 (5,1 5,2 5,3 5,4 4,5 3,5 2,5 and 1,5).
8
2
 .
Hence, P(exactly one of the numbers is 5) 
█
36 9
successful. This gives 10 total ways. Hence, P(at most a 5) 
Probability of Simultaneous Events
Suppose we have two events that can occur simultaneously, that is, can be done
independently of one another. Then we can find the probability of both events occurring
by using the following multiplication principle of probability.
Multiplication Principle of Probability
If two (ordered or labeled) experiments A and B can be conducted independently, that is
both can be done simultaneously, then if P( A) and P(B) represents the probabilities of
these separate events occurring, then the probability in the compound experiment of both
outcomes occurring is P( A and B)  P( A)  P( B) .
Example 20: A pot contains alphabet letters consisting of 300 A’s, 154 B’s, 246 C’s, and
500 D’s. Suppose we draw two letters from the pot without replacement. Find the
probability that
a. both letters are C’s.
b. both letters are D’s.
c. The first letter is an A and the second is a B.
d. The two letters are A and B.
e. Neither letter is a C.
f. The letters are identical.
Solution: Note that there are 1000 total letters in the pot. For part a, using the
multiplication property o f probability, then
 both letters 
 
P
 are C 
 first letter   second letter  246 245
60270
  P
 
P


 0.042 .
 is a C   is a C  1200 1999 1438800
Similarly for part b,
 both letters 
 
P
 are D 
 first letter   second letter  500 499
249500
  P
 
P


 0.173 .
 is a D   is a D  1200 1999 1438800
For part c,
 first letter is A and 
 
P
 the second is B 
 first letter   second letter  300 154
46200
  P
 
P


 0.032 .
is a B  1200 1999 1438800
 is a A  
For part d,
 first letter is A and 
 first letter   second letter 
 first letter   second letter 
  P
  P
  P
  P

P
is a B 
 the second is B 
 is a A  
 is a B   is a A 

300 154
154 300



 0.064
1200 1999 1200 1999
Using part a, we see in part e that
 neither letter 
 both letters 
  1  P
  1  0.042  0.958 .
P
is a C


 are C 
In part f, we see that
 the letters
P
 are identical

 


 both letters 
 both letters 
 both letters 
 both letters 
   P
   P
   P

P
 are A 
 are B 
 are C 
 are D 
300 299 154 153
246 245 500 499







1200 1199 1200 1199 1200 1199 1200 1199
 0.062  0.016  0.042  0.173  0.294
█