Counting & Probabilities

advertisement
Name_______________________________
STT1600 LAB 4: Counting & Probabilities
Purpose: In this lab we will use Excel to compute factorials, permutations and combinations and apply
these to compute probabilities. Note that many calculators can do these computations as well. To start
this lab, open an Excel spreadsheet. Fill in the answers on this sheet and turn it in.
PART A: From Section 4.6 in the textbook, recall the factorial operation. For example 5! = 5x4x3x2x1 =
120. To compute this in Excel, click in an empty cell and type “=FACT(5)”. Try this now.
Fill in the blanks by using the factorial function (“=FACT()”) in Excel:
1. 12!= ___________
2. 0! = ___________
3. Use the factorial function to find the number of ways to arrange 9 baseball players in order for a
batting lineup (i.e., 1st, 2nd, …, 9th): ___________________________.
PART B - Permutation Rule: The number of ways to arrange r items in order from a collection of n
distinct items is nPr = n!/(n-r)! For example, from a group of 4 students, the number of possibilities
to pick one student to be class president and one to be vice-president is 4P2 = 4!/((4-2)! =
(4x3x2x1)/(2x1) = 12. In Excel, you can compute this by clicking in an empty cell and typing
“=PERMUT(4,2)” (Try it now). Use this command to do the following parts:
1. 10P7 = _____________.
2. The Birthday Problem: A statistics class has 40 (unrelated) students.
a) The number of different ways 2 people can have birthdays (given that there are 365
days in a year) is 365*365 = 3652. How many ways can 40 students have birthdays? To
compute 36540 in excel, type “=POWER(365,40)”. ANSWER: _______________.
b) Use the permutation rule to determine how many ways the 40 students all have
DIFFERENT birthdays? _____________.
c) Use (a) and (b) to compute the probability that no two people share the same birthday
(that is, everyone has a different birthday):__________________________ .
d) Use the Law of Complements to compute the probability that at least 2 people share a
common birthday: _____________________________
PART C - Combinatorics: Recall that the Combinations Rule gives the number of ways of selecting r items
from a collection on n distinct items (where the order does not matter). The formula for computing this
is nCr = n!/[(n-r)!r!]. For example, in Excel, 5C2 can be computed by clicking in an empty cell and typing
“=COMBIN(5,2)”. Type this now and verify the result equals 10. Fill in the blanks using “=COMBIN(n,r)”
in Excel:
1. In a lottery, 6 distinct numbers will be chosen from 1 to 42. How many lottery combinations are
possible? That is, compute 42C6 = _____________.
2. From #1, if you buy one lottery ticket, what is the probability you will win? ______________.
Download