Probability and Statistics Notes

[Last Updated 22 January 2011]

Permutations and Combinations
Probability
Fitting Data


Permutations and Combinations

How many ways are there to distribute n indistinguishable marbles among k boxes? Consider n M's and k-1 P's, where each M is a marble and each P is a partition. We can imagine some ordering of the M's and P's. Wherever the P's are located, there is a division between two compartments or boxes. The M's that are immediately to the left of a P are separated from the M's that are immediately to the right.

Each permutation of the n M's and k-1 P's corresponds to a particular distribution of n M's among k boxes. Where there are two or more P's right next to each other, there is an empty box between the P's.

The number of permutations of n M's and k-1 P's is equal to the number of permutations of n+k-1 objects where n are of one type and k-1 are of another type. This is the number of ways n marbles can be distributed among k boxes,

N(n, k) = (n+k-1)!/[n!(k-1)!]

Example. How many ways are there to distribute 5 indistinguishable marbles among 3 boxes? We use the above formula with n = 5 and k = 3 and get

N(5, 3) = (5+3-1)!/[5!(3-1)!] = 7!/(5!2!) = 21

There are 21 ways to distribute 5 indistinguishable marbles among 3 boxes. These are illustrated in the table below, which shows the numbers of marbles in each box, for all 21 possible arrangements, and the corresponding M and P representations, as discussed above.

In filling up this table, we first consider the case where all 5 marbles are in a single box. Then we consider the cases where the 5 marbles are spread among 2 boxes. Finally, we consider the cases where the 5 marbles are spread among all 3 boxes.

Case Box 1 Box 2 Box 3 M and P Representation
1
5
0
0
MMMMMPP
2
0
5
0
PMMMMMP
3
0
0
5
PPMMMMM
4
4
1
0
MMMMPMP
5
4
0
1
MMMMPPM
6
1
4
0
MPMMMMP
7
0
4
1
PMMMMPM
8
1
0
4
MPPMMMM
9
0
1
4
PMPMMMM
10
3
2
0
MMMPMMP
11
3
0
2
MMMPPMM
12
2
3
0
MMPMMMP
13
0
3
2
PMMMPMM
14
2
0
3
MMPPMMM
15
0
2
3
PMMPMMM
16
3
1
1
MMMPMPM
17
1
3
1
MPMMMPM
18
1
1
3
MPMPMMM
19
2
2
1
MMPMMPM
20
2
1
2
MMPMPMM
21
1
2
2
MPMMPMM

Back to Main Menu

PROBLEM

In how many ways can 7 books be arranged on a shelf if (a) any arrangement is possible, (b) 3 particular books must always stand together, (c) two particular books must occupy the ends?

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.104]

SOLUTION

(a) If any arrangement is possible, there are 7! = 5040 ways to arrange 7 books on a shelf.

(b) If 3 particular books must always stand together, the 3 books can occupy the following positions on the shelf:

XXX----
-XXX---
--XXX--
---XXX-
----XXX


For each of these five cases, there are 3! permutations of the 3 books and 4! permutations of the other 4 books, so the total number of allowed arrangements is 5 x 3!4! = 720.

(c) If two particular books must occupy the ends, there are 2! = 2 permutations of the two books and 5! = 120 permutations of the other 5 books, so the total number of allowed arrangements is 2!5! = 240.

Back to Main Menu

PROBLEM

How many five-letter words can be made from five letters if (a) all letters are different, (b) two letters are identical, (c) all letters are different but two particular letters cannot be adjacent?

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.138]

SOLUTION

(a) If the five letters are all different, 5! = 120 five-letter words can be made from them.

(b) If two letters are identical, 5!/2! = 60 five-letter words can be made from them.

(c) Let A and B be the two letters that cannot be adjacent. Then the possible positions of A and B are

AXBXX
AXXBX
AXXXB
XAXBX
XAXXB
XXAXB

or the positions with B and A interchanged. This gives twelve possible positions for A and B. For each of these, there are 3! ways to arrange the remaining three letters, so the total number of five-letter words that can be made is 12 x 3! = 72.

Back to Main Menu

PROBLEM

Find the number of (a) combinations and (b) permutations of four letters each that can be made from the letters of the word "Tennessee."

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.116]

SOLUTION

The word "Tennessee" contains one t, four e's, two n's, and two s's. We can solve this problem by considering different categories of possible combinations, finding all possible combinations in each category, and calculating the number of permutations for each combination. The table below shows ten categories, each defined by the number of e's and s's. The number of permutations of each combination is calculated using the fact that the number of permutations of n objects where there are n1 of type 1, n2 of type 2, etc., is n!/(n1!n2!...).

Example. For the category whose combinations contain zero e's and two s's, the remaining two letters must be some two-letter combination of the one t and two n's. There are only two two-letter combinations that these letters can form, excluding permutations: "tn" and "nn". Thus, the only possible four-letter combinations in this category, excluding permutations, are "sstn" and "ssnn". Since "sstn" has two s's, the number of permutations is 4!/2! = 12. Since "ssnn" has two s's and two n's, the number of permutations is 4!/(2!2!) = 6.

Category Combinations Permutations
4 e's
eeee
1
3 e's
eeet
eeen
eees
4!/3! = 4
4!/3! = 4
4!/3! = 4
2 e's
2 s's
eess
4!/(2!2!) = 6
2 e's
1 s
eest
eesn
4!/2! = 12
4!/2! = 12
2 e's
0 s's
eetn
eenn
4!/2! = 12
4!/(2!2!) = 6
1 e
2 s's
esst
essn
4!/2! = 12
4!/2! = 12
1 e
1 s
estn
esnn
4! = 24
4!/2! = 12
1 e
0 s's
etnn
4!/2! = 12
0 e's
2 s's
sstn
ssnn
4!/2! = 12
4!/(2!2!) = 6
0 e's
1 s
stnn
4!/2! = 12
Totals
(a) 17 combinations
(b) 163 permutations

Back to Main Menu

PROBLEM

Find the number of (a) combinations and (b) permutations of four letters each that can be made from the letters in the word "Mississippi."

SOLUTION

The word "Mississippi" contains one m, four i's, four s's, and two p's. We can solve this problem by considering different categories of possible combinations, finding all possible combinations in each category, and calculating the number of permutations for each combination. The table below shows 13 categories, each defined by the number of i's and s's. We define the categories by specifying the number of i's and s's because these are the most frequently appearing letters in "Mississippi" and it is then easier to list all the possible combinations of the m and i's, if any, that fit into the category. The number of permutations of each combination is calculated using the fact that the number of permutations of n objects where there are n1 of type 1, n2 of type 2, etc., is n!/(n1!n2!...).

Example. For the category whose combinations contain one i and one s, the remaining two letters must be some two-letter combination of the one m and two p's. There are only two two-letter combinations that these letters can form, excluding permutations: "mp" and "pp". Thus, the only possible four-letter combinations in this category, excluding permutations, are "ismp" and "ispp". Since "ismp" has all-different letters, the number of permutations is 4! = 24. Since "ispp" has two p's, the number of permutations is 4!/2! = 12.

Category Combinations Permutations
4 i's
iiii
1
3 i's
iiim
iiis
iiip
4!/3! = 4
4!/3! = 4
4!/3! = 4
2 i's
2 s's
iiss
4!/(2!2!) = 6
2 i's
1 s
iism
iisp
4!/2! = 12
4!/2! = 12
2 i's
0 s's
iimp
iipp
4!/2! = 12
4!/(2!2!) = 6
1 i
3 s's
isss
4!/3! = 4
1 i
2 s's
issm
issp
4!/2! = 12
4!/2! = 12
1 i
1 s
ismp
ispp
4! = 24
4!/2! = 12
1 i
0 s's
impp
4!/2! = 12
0 i's
4 s's
ssss
1
0 i's
3 s's
sssm
sssp
4!/3! = 4
4!/3! = 4
0 i's
2 s's
ssmp
sspp
4!/2! = 12
4!/(2!2!) = 6
0 i's
1 s
smpp
4!/2! = 12
Totals
(a) 21 combinations
(b) 176 permutations

Back to Main Menu

PROBLEM

(a) A shelf contains 6 separate compartments. In how many ways can 4 indistinguishable marbles be placed in the compartments?
(b) Work the problem if there are n compartments and r marbles.

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.148]

SOLUTION

(a) The number of ways n indistinguishable marbles can be placed in k compartments is

N(n, k) = (n+k-1)!/[n!(k-1)!]

The number of ways 4 indistinguishable marbles can be placed in 6 separate compartments is

N(4, 6) = (4+6-1)!/[4!(6-1)!] = 9!/(4!5!) = 126

(b) The number of ways r indistinguishable marbles can be placed in n compartments is

N(r, n) = (r+n-1)!/[r!(n-1)!]

Back to Main Menu

PROBLEM

(a) A shelf contains 6 separate compartments. In how many ways can 12 indistinguishable marbles be placed in the compartments so that no compartment is empty?
(b) Work the problem if there are n compartments and r marbles where r > n.

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.149]

SOLUTION

(a) Each compartment must contain at least 1 marble. This uses up 6 of the marbles. The remaining 6 must be distributed among 6 compartments. The number of ways this can be done is

N(6, 6) = (6+6-1)!/[6!(6-1)!] = 11!/(6!5!) = 462

(b) Each compartment must contain at least 1 marble. This uses up n of the marbles. The remaining r-n must be distributed among n compartments. The number of ways this can be done is

N(r-n, n) = (r-n+n-1)!/[(r-n)!(n-1)!] = (r-1)!/[(r-n)!(n-1)!]

Back to Main Menu

PROBLEM

(a) How many gin rummy hands, consisting of 10 cards, can be dealt from an ordinary deck of 52 playing cards?
(b) How many bridge hands, consisting of 13 cards, can be dealt from an ordinary deck of 52 playing cards?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problems 5.85 and 5.86]

SOLUTION

(a) The number of gin rummy hands that can be dealt from an ordinary deck of 52 playing cards is the same as the number of combinations of 10 items picked from 52 items, which is

C(52, 10) = 52!/[10!(52-10)!] = 52!/(10!42!) = 1.582 x 1010

(b) The number of bridge hands that can be dealt from an ordinary deck of 52 playing cards is the same as the number of combinations of 13 items picked from 52 items, which is

C(52, 13) = 52!/[13!(52-13)!] = 52!/(13!39!) = 6.350 x 1011

Back to Main Menu

PROBLEM

The number of ways in which n distinct objects can be arranged in a circle is (n - 1)!.
(a) Present an argument to justify this formula.
(b) In how many ways can six persons be seated at a round table, if we care only who sits on whose left or right side?
(c) In how many ways can eight people form a circle for a folk dance?
(d) Four men and four women are forming a circle for a folk dance. In how many ways can this be done if we require that the men and women alternate positions?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 5.29]

SOLUTION

(a) The number of permutations of n distinguishable objects is n!. If the n objects are arranged in a circle, then for each particular permutation there are n - 1 additional permutations which are merely clockwise or counterclockwise shifts of all the objects. Thus, the number of ways n distinct objects can be arranged in a circle, if all we care about is the relative ordering, is n!/n = (n - 1)!.

(b) The number of ways six people can be seated at a round table if we only care about the relative ordering is (6 - 1)! = 5! = 120.

(c) The number of ways eight people can be seated at a round table if we only care about the relative ordering is (8 - 1)! = 7! = 5040.

(d) There are (4 - 1)! = 3! = 6 ways to arrange the four men in alternate positions in a circle. For each of these orderings, there are 4! = 24 ways to arrange the four women. We use 4! and not (4 - 1)! because, once the men have been assigned positions, we should consider all permutations of the women, even those which are merely clockwise or counterclockwise shifts of another, because these result in different overall orderings of the eight people. Thus, the number of ways we can arrange the four men and four women is 6 x 24 = 144.

Back to Main Menu

PROBLEM

In how many ways can 3 men and 3 woman be seated at a round table if (a) no restriction is imposed, (b) two particular women cannot sit together, (c) each woman is to be between two men?

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.108]

SOLUTION

(a) The number of ways to arrange n objects among n positions in a row is n!. In the case of a circular arrangement, there are n permutations of a particular arrangement which are really the same ordering except that all objects are shifted clockwise or counterclockwise by the same amount. Thus, the number of ways to arrange n objects among n positions in a circle is n!/n = (n-1)!. The number of ways to arrange 6 people at a round table with 6 seats, if no restrictions are imposed, is (6-1)! = 5! = 120.

(b) If two particular women cannot sit together, we have to subtract all cases where the women would be seated together. If the seats are numbered 1 through 6, these are of the form

123456
AABBBB
BAABBB
BBAABB
BBBAAB
BBBBAA
ABBBBA


where the A's are the two women and the B's are the other people. Since we want to exclude permutations which are simply shifts of a particular ordering, we can consider only the permutations of the form

AABBBB


or any one of the other five permutations listed. There are 2!4! = 48 such permutations. Thus, the number of ways 3 men and 3 women can be seated at a round table, if two particular women cannot sit together, is 120 - 48 = 72.

(c) If each woman is to be between two men, there are 2! = 2 ways to seat the women, and 3! = 6 ways to seat the men, or a total of 2!3! = 12 ways to seat the 3 men and 3 women. We use 2! for the women because we want to exclude permutations of the women which are simply shifts of a given permutation. We use 3! for the men because once the women have been assigned seats, any permutation of the men, including those which are shifts of another permutation, are allowed, since these result in different overall arrangements of the 6 people which are not just shifts of one particular permutations.

Back to Main Menu

Probability

Consider an "experiment" which has two possible outcomes which we can call "success" and "failure," and that the probability of (success, failure) is (p, q), where q = 1 - p. Suppose the experiment is repeated N times. The number of ways to have k successes and N - k failures is

C(N, k) = N!/[k!(N-k)!]

This is also the number of combinations of k items picked from N items if the items are all distinguishable. The probability of a particular combination of k successes and N - k failures is

p(N, k) = pkqN-k

The total probability of having k successes and N - k failures is

P(N, k) = C(N, k)p(N, k) = {N!/[k!(N-k)!]}pkqN-k (1)

Example. What is the probability of getting two heads in three tosses of a fair coin?

In this case, each "experiment" is a coin toss, "success" is a heads, "failure" is a tails, and the experiment is repeated three times. The probability of success is the probability of a heads, which is p = 0.5, and the probability of failure is the probability of a tails, which is q = 0.5. Since we want to know the probability of getting two heads in three tosses, N = 3 and k = 2. Using (1), we get

P(3, 2) = C(3, 2)p(3, 2) = {3!/[2!(3-2)!]}(0.5)2(0.5) = 0.375

We can understand how this formula works as follows. First we determine the number of ways we can get two heads or the number of ways we can distribute two heads among three coin tosses. Call the two heads H1 and H2, and the single tails T. The two heads and one tails can be assigned to the coin tosses as follows:

H1 H2 T
H1 T H2
H2 H1 T
T H1 H2
H2 T H1
T H2 H1

It appears that there are 3! = 6 possible ways to do this. But, in reality, the two heads are indistinguishable. Switching H1 and H2 gives an equivalent result. If we replace the H1 and H2 with H, we see that the six results are:

H H T
H T H
H H T
T H H
H T H
T H H

The only distinguishable results with two heads are:

H H T
H T H
T H H

The number of distinguishable results is 6!/2! = 3. We divide the 6! by 2! because there are 2! permutations of a given assignment of two heads, but these are indistinguishable. The probability of each of the three distinguishable results is (0.5)3 = 0.125. The total probability for all three is 0.375.

Back to Main Menu

PROBLEM

A fair coin is tossed five times what is the probability of getting a sequence of three heads?

[from Rice, John A. 1995, Mathematical Statistics and Data Analysis, Second Edition (Belmont, California: Duxbury Press), problem 1.21]

SOLUTION

There are 25 = 32 possible outcomes if a coin is tossed five times. Each outcome has a probability of (1/2)5 = 1/32. The following table shows the possible outcomes (H = head, T = tails) that correspond to a total of k heads where k = 0, 1, 2, 3, 4, 5. The outcomes that contain a sequence of three heads, which includes those that contain a sequence of more than three heads, are indicated by an asterisk (*).

Total Number of Heads Number of Possible Outcomes Possible Outcomes
0
1
TTTTT
1
5
HTTTT
THTTT
TTHTT
TTTHT
TTTTH
2
10
HHTTT
HTHTT
HTTHT
HTTTH
THHTT
THTHT
THTTH
TTHHT
TTHTH
TTTHH
3
10
TTHHH*
THTHH
THHTH
THHHT*
HTTHH
HTHTH
HTHHT
HHTTH
HHTHT
HHHTT*
4
5
HHHHT*
HHHTH*
HHTHH
HTHHH*
THHHH*
5
1
HHHHH*

Eight of the possible outcomes contain a sequence of three heads, so the probability of obtaining a sequence of three heads is 8/32 = 1/4.

Back to Main Menu

PROBLEM

Suppose that you repeatedly shake six coins in your hand and drop them on the table. Construct a table showing the number of microstates that correspond to each macrostate. What is the probability of obtaining (a) three heads and three tails, and (b) six heads?

[from Giancoli, Douglas C. 1998, Physics: Principles with Applications, Fifth Edition (Upper Saddle River, New Jersey: Prentice Hall), problem 15.44]

SOLUTION

In each of the following cases, determine how many ways the indicated macrostate can be achieved. These are all combinations of heads and tails that correspond to the indicated macrostate.

This can be considered an experiment repeated 6 times where the probability of "success" (heads) is p = 1/2 and the probability of "failure" (tails) is q = 1 - p = 1/2. The number of ways to get k heads and 6 - k tails is (6 k) = 6!/k!(6-k)!.

Macrostates Number of Microstates Microstates
6 heads, 0 tails
6!/[0!(6-0)!] = 1
HHHHHH
5 heads, 1 tail
6!/[5!(6-5)!] = 6
HHHHHT
HHHHTH
HHHTHH
HHTHHH
HTHHHH
THHHHH
4 heads, 2 tails
6!/[4!(6-2)!] = 15
HHHHTT
and 14 others
3 heads, 3 tails
6!/[3!(6-3)!] = 20
HHHTTT
and 19 others
2 heads, 4 tails
6!/[2!(6-2)!] = 15
HHTTTT
and 14 others
1 head, 5 tails
6!/[1!(6-1)!] = 6
TTTTTH
TTTTHT
TTTHTT
TTHTTT
THTTTT
HTTTTT
0 heads, 6 tails
6!/[0!(6-0)!]
TTTTTT


The total number of possible microstates is 1 + 6 + 15 + 20 + 15 + 6 + 1 = 64. This is as expected since each flipped coin can have two possible outcomes, and there are six coins, so the number of possible microstates is 26 = 64.

(a) The probability of obtaining three heads and three tails is 20/64 = 5/16, which can also be obtained by evaluating {6!/[3!(6-3)!]}(1/2)3(1/2)3 = 5/16.

(b) The probability of obtaining six heads is 1/64, which can also be obtained by evaluating
{6!/[6!(6-6)!]}(1/2)3(1/2)3 = 1/64.

Back to Main Menu

PROBLEM

Which is more likely: 9 heads in 10 tosses of a fair coin or 18 heads in 20 tosses?

[from Rice, John A. 1995, Mathematical Statistics and Data Analysis, Second Edition (Belmont, California: Duxbury Press), problem 2.12]

SOLUTION

The number of ways to get k heads in N coin tosses is the same as the number of combinations of k items picked from N items, which is

C(N, k) = N!/[(N-k)!k!]

The probability of each combination is

p(N, k) = akbN-k

where a is the probability of the outcome which occurs k times and b is the probability of the outcome which occurs N - k times. In the case of coin tosses, a = 1/2 is the probability of getting a heads in a single coin toss, and b = 1/2 is the probability of getting a tails in a single coin toss. The probability of getting k heads in N coin tosses is

P(N, k) = C(N, k)p(N, k) = {N!/[(N-k)!k!]}akbN-k = {N!/[(N-k)!k!]}(1/2)k(1/2)N-k
= {N!/[(N-k)!k!]}(1/2)N

The probability of getting 9 heads in 10 tosses is

P(10, 9) = {10!/[(10-9)!9!]}(1/2)10 = (10!/9!)(1/2)10 = (10)(1/2)10 = 0.009766

The probability of getting 18 heads in 20 tosses is

P(20, 18) = {20!/[(20-18)!18!]}(1/2)20 = {20!/[2!18!]}(1/2)20 = [(20)(19)/2](1/2)20 = 0.000181

Since P(10, 9) > P(20, 18), 9 heads in 10 tosses is more likely.

Back to Main Menu

PROBLEM

Calculate the probabilities, when you throw two dice, of obtaining (a) a 5, (b) an 11, and (c) any other value.

[(a) and (b) from Giancoli, Douglas C. 1998, Physics: Principles with Applications, Fifth Edition (Upper Saddle River, New Jersey: Prentice Hall), problem 15.42]

SOLUTION

(a) There are six possible values on each die, so there are 6 x 6 = 36 possible combinations [36 microstates] on the two dice.

A five can be obtained with (4, 1), (3, 2), (2, 3), or (1, 4) [4 microstates], so the probability of obtaining a five is 4/36 = 1/9.

(b) An eleven can be obtained with (6, 5) or (5, 6) [2 microstates], so the probability of obtaining an eleven is 2/36 = 1/18.

(c) 2: (1, 1) [1 microstate] => 1/36
3: (2, 1), (1, 2) [2 microstates] => 2/36 = 1/18
4: (3, 1), (2, 2), (1, 3) [3 microstates] => 3/36 = 1/12
6: (5, 1), (4, 2), (3, 3), (2, 4), (1, 5) [5 microstates] => 5/36
7: (6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6) [6 microstates] => 6/36 = 1/6
8: (6, 2), (5, 3), (4, 4), (3, 5), (2, 6) [5 microstates] => 5/36
9: (6, 3), (5, 4), (4, 5), (3, 6) [4 microstates] => 4/36 = 1/9
10: (6, 4), (5, 5), (4, 6) [3 microstates] => 3/36 = 1/12
12: (6, 6) [1 microstate] => 1/36

The probability of obtaining a 2, 3, 4, 6, 7, 8, 9, 10, or 12 is 1/36 + 1/18 + 1/12 + 5/36 + 1/6 + 5/36 + 1/9 + 1/12 + 1/36 = 30/36 = 5/6. As expected, the sum of this and the probabilities obtained in parts (a) and (b) is 5/6 + 1/9 + 1/18 = 1.

Back to Main Menu

PROBLEM

A pair of dice is tossed repeatedly. Find the probability that an 11 occurs for the first time on the 6th toss.

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.140]

SOLUTION

Each throw of the dice has 6 x 6 = 36 possible outcomes because there are 6 possible outcomes on each die. Since two of the possible outcomes, (6, 5) and (5, 6), result in an 11, the probability that each throw of the dice will result in an 11 is 2/36 = 1/18, and the probability that each throw of the dice will not result in an 11 is 34/36 = 17/18. The probability that an 11 occurs for the first time on the 6th toss is equal to the probability that an 11 does not occur on any of the first five tosses and does occur on the 6th toss. Thus, the probability that an 11 occurs for the first time on the 6th toss is (17/18)5(1/18) = 1,419,857 / 34,012,224.

Back to Main Menu

PROBLEM

A poker player has cards 2, 3, 4, 6, and 8. He wishes to discard the 8 and replace it by another card which he hopes will be a 5 (in which case he gets an "inside straight"). What is the probability that he will succeed assuming that the other three players together have (a) one 5, (b) two 5's, (c) three 5's, (d) no 5? (e) Can the problem be worked if the number of 5's in the other players' hands is unknown? Explain.

[from Spiegel, Murray R. 1975, Probability and Statistics (New York: McGraw-Hill), problem 1.150]

SOLUTION

(a) The number of cards that are not in any players' hands is 52 - (4)(5) = 52 - 20 = 32. If the other players together have one 5, there are three 5's among the 32 cards, so the probability that the player will pick a 5 is 3/32.

(b) If the other players together have two 5's, there are two 5's among the 32 cards, so the probability that the player will pick a 5 is 2/32 = 1/16.

(c) If the other players together have three 5's, there is one 5 among the 32 cards, so the probability that the player will pick a 5 is 1/32.

(d) If there are no 5's in the other players' hands, there are four among the 32 cards, so the probability that the player will pick a 5 is 4/32 = 1/8.

(e) If the number of 5's in the other players' hands is unknown, each of the 5's could be anywhere among the 47 cards that the player does not already have. The probability that the player gets a 5 if he picks one card, from the 32 that are not in any players' hands, is 4/47.

Back to Main Menu

PROBLEM

Rank the following five-card hands in order of increasing probability:
(a) four aces and a king
(b) six of hearts, eight of diamonds, queen of clubs, three of hearts, jack of spades
(c) two jacks, two queens, and an ace
(d) any hand having no two equal-value cards
Explain your ranking using microstates and macrostates.

[Giancoli, Douglas C. 1998, Physics: Principles with Applications, Fifth Edition (Upper Saddle River, New Jersey: Prentice Hall), problem 15.43]

SOLUTION

(a) The probability of obtaining four aces and a king is equal to the [number of ways of obtaining four aces and a king] divided by the [total number of possible five-card hands].

The [total number of possible five-card hands] is equal to the [number of ways of picking the first card (52)] times the [number of ways of picking the second card (51)]...times the [number of ways of picking the fifth card (48)] = 52 x 51 x 50 x 49 x 48 = 52!/47!.

The [number of ways of obtaining four aces and a king] is equal to four times the [number of ways of obtaining four aces and a particular king, such as the king of spades] = 4 x [number of permutations of four aces and a particular king] = 4 x 5!.

The probability of obtaining four aces and a king is 4 x 5! / (52!/47!) = 4 x 5! / (52 x 51 x 50 x 49 x 48) = 1.53908 x 10-6 = 1/649740. The number of microstates corresponding to the required macrostate is 4 x 5! = 480.

(b) The probability of obtaining a six of hearts (6H), eight of diamonds (8D), queen of clubs (QC), three of hearts (3H), and jack of spades (JS) is equal to the [number of ways of obtaining 6H, 8D, QC, 3H, and JS] divided by the [total number of possible five-card hands].

The [number of ways of obtaining 6H, 8D, QC, 3H, and JS] is the [number of permutations of 6H, 8D, QC, 3H, and JS] = 5!.

The probability of obtaining 6H, 8D, QC, 3H, and JS is 5!/(52!/47!) = 5!/(52 x 51 x 50 x 49 x 48) = 3.84769 x 10-7 = 1/2598960. The number of microstates corresponding to the required macrostate is 5! = 120.

(c) The probability of obtaining two jacks, two queens, and an ace is equal to the [number of ways of obtaining two jacks, two queens, and an ace] divided by the [total number of possible five-card hands].

The [number of ways of obtaining two jacks, two queens, and an ace] is equal to the [number of ways of obtaining two jacks] times the [number of ways of obtaining two queens] times the [number of ways of obtaining one ace] times the [number of permutations of the five cards once they have been picked] = (4!/2!2!) x (4!/2!2!) x 4 x 5! = 6 x 6 x 4 x 120 = 17280.

The probability of obtaining two jacks, two queens, and an ace is equal to 17280/(52!/47!) = 17280/(52 x 51 x 50 x 49 x 48) = 5.54068 x 10-5 = 1/18048.333. The number of microstates corresponding to the required macrostate is 17280.

(d) The probability of picking any hand having no two equal-value cards is equal to the [number of hands having no two equal-value cards] divided by the [total number of possible five-card hands] .

The [number of hands having no two equal-value cards] is equal to the [number of hands having cards with all different values], which is equal to the [number of ways of picking the first card (52)] times the [number of ways of picking the second card (48)] times the [number of ways of picking the third card (44)] times the [number of ways of picking the fourth card (40)] times the [number of ways of picking the fifth card (36)] = 52 x 48 x 44 x 40 x 36.

The probability of picking any hand having no two equal-value cards is 52 x 48 x 44 x 40 x 36 / (52!/47!) = 48 x 44 x 40 x 36 / (51!/47!) = 48 x 44 x 40 x 36 / (51 x 50 x 49 x 48) = 0.507082833 = 1/1.972064394. The number of microstates corresponding to the required macrostate is 52 x 48 x 44 x 40 x 36 = 158,146,560.

P(b) < P(a) < P(c) < P(d)

Back to Main Menu

PROBLEM

Estimate the probability that a bridge player will be dealt (a) all four aces (among 13 cards), and (b) all 13 cards of one suit.

[from Giancoli, Douglas C. 1998, Physics: Principles with Applications, Fifth Edition (Upper Saddle River, New Jersey: Prentice Hall), problem 15.45]

SOLUTION

(a) The probability that a bridge player will be dealt all four aces is equal to the [number of ways a thirteen-card hand can contain all four aces] divided by the [total number of possible thirteen-card hands].

The [total number of possible thirteen-card hands] is equal to the [number of ways of picking the first card (52)] times the [number of ways of picking the second card (51)]...times the [number of ways of picking the thirteenth card (40)] = 52 x 51 x 50 x ... x 40 = 52!/39!.

The [number of ways a thirteen-card hand can contain all four aces] is equal to the [number of ways the four aces can be distributed among the thirteen cards] times the [number of ways the remaining nine cards can be selected from the non-ace cards].

The [number of ways the four aces can be distributed among the thirteen cards] is equal to the [number of ways the first ace can be assigned a position (13)] times the [number of ways the second ace can be assigned a position (12)] times the [number of ways the third ace can be assigned a position (11)] times the [number of ways the fourth ace can be assigned a position (10)] = 13 x 12 x 11 x 10 = 13!/9!.

The [number of ways the remaining nine cards casn be selected from the non-ace cards] is equal to the [number of ways the first non-ace card can be picked (48)] times the [number of ways the second non-ace card can be picked (47)]...times the [number of ways the ninth non-ace card can be picked (40)] = 48 x 47 x ... x 40 = 48!/39!.

The [number of ways a thirteen-card hand can contain all four aces] is (13!/9!) x (48!/39!). The probability that a bridge player will be dealt all four aces is (13!/9!) x (48!/39!)/(52!/39!) = 13 x 12 x 11 x 10 / (52 x 51 x 50 x 49) = 0.002641 = 1/378.6364.

(b) The probability that a bridge player will be dealt all 13 cards of one suit is equal to the [number of ways the thirteen-card hand can contain all 13 cards of one suit] divided by the [total number of possible thirteen-card hands].

The [number of ways the thirteen-card hand can contain all 13 cards of one suit] is equal to four times the [number of ways the thirteen-card hand can contain all 13 cards of one particular suit, such as hearts], which is four times the [number of ways the 13 cards of one particular suit can be distributed in a thirteen-card hand], which is four times the [number of ways the first card can be assigned a position in the thirteen-card hand (13)] times the [number of ways the second card can be assigned a position in the thirteen-card hand (12)]...times the [number of ways the thirteenth card can be assigned a position in the thirteen-card hand (1)] = 4 x 13!.

The probability that a bridge player will be dealt all 13 cards of one suit is 4 x 13! / (52!/39!) = 4 x 13! / (52 x 51 x ... x 40) = 6.29908 x 10-12 = 1/(1.58753 x 1011).

Back to Main Menu

PROBLEM

A radio station that plays classical music has a "by request" program each Saturday evening. The percentages of requests for composers on a particular night are as follows:

Composer Percentage
Bach
5%
Beethoven
26%
Brahms
9%
Dvorak
2%
Mendelssohn
3%
Mozart
21%
Schubert
12%
Schumann
7%
Tchaikovsky
14%
Wagner
1%

(a) What is the probability that the request is for one of the three B's?
(b) What is the probability that the request is not for one of the two S's?
(c) Neither Bach nor Wagner wrote any symphonies. What is the probability that the request is for a composer who wrote at least one symphony?
(d) What is the probability that the request is for a piece by one of the main characters of the movie Amadeus (1984)?

[from Devore, Jay, and Peck, Roxy 1994, Introductory Statistics, Second Edition (St. Paul, Minnesota: West Publishing Company), problem 4.16]

SOLUTION

(a) The probability that the request is for Bach, Beethoven, or Brahms is 0.05 + 0.26 + 0.09 = 0.40.

(b) The probability that the request is for Schubert or Schumann is 0.12 + 0.07 = 0.19. The probability that the request is not for Schubert or Schumann is 1.00 - 0.19 = 0.81.

(c) The probability that the request is for one of the composers other than Bach or Wagner is 1.00 - 0.05 - 0.01 = 0.94.

(d) The movie Amadeus (1984) is about Wolfgang Amadeus Mozart. The probability that the request is for Mozart is 0.21.

Back to Main Menu

PROBLEM

After mixing a deck of 52 cards very well, 5 cards are dealt out.
(a) Show that (disregarding the order in which the cards are dealt) there are 2,598,960 possible hands, of which only 1287 are hands consisting entirely of spades. What is the probability that a hand will consist entirely of spades? What is the probability that a hand will consist entirely of a single suit?
(b) Show that exactly 63,206 hands contain only spades and clubs, with both suits represented. What is the probability that a hand consists entirely of spades and clubs with both suits represented?
(c) Using the result of part (b), what is the probability that a hand contains cards from exactly two suits?

[from Devore, Jay, and Peck, Roxy 1994, Introductory Statistics, Second Edition (St. Paul, Minnesota: West Publishing Company), problem 4.18]

SOLUTION

(a) The number of five-card hands is equal to the number of combinations of five cards that can be picked from 52 cards, which is

C(52, 5) = 52!/[5!(52-5)!] = 52!/(5!47!) = (52)(51)(50)(49)(48)/120 = 2,598,960

The number of five-card hands consisting entirely of spades is equal to the number of combinations of five cards that can be picked from thirteen cards, which is

C(13, 5) = 13!/[5!(13-5)!] = 13!/(5!8!) = (13)(12)(11)(10)(9)/120 = 1287

The probability that a hand will consist entirely of spades is

P(all spades) = C(13, 5) / C(52, 5) = 1287/2,598,960 = 4.952 x 10-4

The probability that a hand will consist entirely of a single suit is

P(single suit) = P(all spades) + P(all clubs) + P(all diamonds) + P(all hearts) = 4P(all spades)
= (4)(1287)/2,598,960 = 1.981 x 10-3

(b) We need to determine the number of five-card hands which contain spades and clubs. The number of five-card hands which contain k spades and 5 - k clubs is equal to the number of ways we can pick k cards from 13 cards times the number of ways we can pick 5 - k cards from 13 cards or

N(k, 5-k) = C(13, k)C(13, 5-k) = {13!/[k!(13-k)!]}(13!/{(5-k)![13-(5-k)]!}) br>
The following table shows the number of five-card hands which contain k spades and 5 - k clubs for k = 1, 2, 3, 4.

k (k spades + [5-k] clubs) N(k, 5-k)
1 (1 spades + 4 clubs)
[13!/(1!12!)][13!/(4!9!)] = (13)(13)(12)(11)(10)/24 = 9295
2 (2 spades + 3 clubs)
[13!/(2!11!)][13!/(3!10!)] = (13)(12)(13)(12)(11)/12 = 22308
3 (3 spades + 2 clubs)
[13!/(3!10!)][13!/(2!11!)] = (13)(12)(11)(13)(12)/12 = 22308
4 (4 spades + 1 clubs)
[13!/(4!9!)][13!/(1!12!)] = (13)(12)(11)(10)(13)/24 = 9295
Total
63206

Thus, exactly 63,206 hands contain only spades and clubs, with both suits represented. The probability that a hand consists entirely of spades and clubs with both suits represented is

P(spades + clubs) = 63,206/2,598,960 = 2.432 x 10-2

(c) The probability that a hand contains cards from exactly two suits is

P(two suits) = P(spades + clubs) + P(spades + diamonds) + P(spades + hearts)
+ P(clubs + diamonds) + P(clubs + hearts) + P(diamonds + hearts)
= 6P(spades + clubs) = (6)(63,206)/2,598,960 = 0.1459

Back to Main Menu

PROBLEM

A library has six Colin Dexter mysteries on the shelf, five by Tony Hillerman, and four by Arthur Upfield.
(a) How many ways are there to select one book by each author?
(b) How many ways are there to select three books from among the 15 without regard to author?
(c) If three books are selected in a completely random fashion, what is the probability that the three are by different authors?

[from Devore, Jay, and Peck, Roxy 1994, Introductory Statistics, Second Edition (St. Paul, Minnesota: West Publishing Company), problem 4.55]

SOLUTION

(a) There are (6, 5, 4) ways to choose a (Dexter, Hillerman, Upfield) book. The number of ways there are to select one book by each author is 6 x 5 x 4 = 120.

(b) The number of ways to select three books from among the 15 without regard to author is equal to the number of combinations of 3 items picked from 15, which is

C(15, 3) = 15!/[3!(15-3)!] = 15!/(3!12!) = 455

(c) The number of ways of selecting three books in a completely random fashion is equal to the number of combinations of 3 items picked from 15, which is 455. The probability that the three are by different authors is 120/455 = 24/91 = 0.2637.

Back to Main Menu

PROBLEM

You have identified eight courses that you are seriously considering taking next term.
(a) How many ways are there to select five from among the eight without regard to order?
(b) Two of these are statistics courses, and you have definitely decided to take them. How many ways are there now to select five courses to take?
(c) If you randomly select five from among the eight courses, what is the probability that both the statistics courses will be on your schedule?

[from Devore, Jay, and Peck, Roxy 1994, Introductory Statistics, Second Edition (St. Paul, Minnesota: West Publishing Company), problem 4.56]

SOLUTION

(a) The number of ways to select five courses from among the eight is equal to the number of combinations of five items picked from eight, which is

C(8, 5) = 8!/[5!(8-5)!] = 8!/(5!3!) = 56

(b) Two of the five selected courses must be the two statistics courses. The number of ways of selecting three more courses from the remaining six is

C(6, 3) = 6!/[3!(6-3)!] = 6!/(3!3!) = 20

(c) If you randomly select five from among the eight courses, the probability that both the statistics courses will be on your schedule is 20/56 = 5/14 = 0.3571.

Back to Main Menu

PROBLEM

Here is a famous problem that shows coincidences are often not as unlikely to occur as you might think.
(a) Suppose that there are three people in a room. Disregarding the possibility of a February 29th birthday, how many possible combinations of the three birthdays are there?
(b) How many ways are there for the three people to have different birthdays?
(c) If each individual is equally likely to be born on any one of the 365 days, what is the probability that (i) all three people have different birthdays, (ii) at least two have the same birthday?
(d) Answer the questions posed in part (c) for a group of ten people.
(e) How many people need to be in a room before the probability that at least two have the same birthday exceeds 0.5?

[from Devore, Jay, and Peck, Roxy 1994, Introductory Statistics, Second Edition (St. Paul, Minnesota: West Publishing Company), problem 4.60]

SOLUTION

(a) Each person's birthday could be one of 365 different possible dates. The number of possible combinations of the three birthdays is therefore 3653 = 48627125.

(b) The number of ways for the three people to have different birthdays is (365)(364)(363) = 48228180.

(c) The probability that all three people have different birthdays is 48228180 / 48627125 = 0.9918.

The probability that at least two people have the same birthday is 1 - 0.9918 = 0.008204.

(d) The number of possible combinations of ten people's birthdays is 36510 = 4.197 x 1025.

The number of ways for ten people to have different birthdays is 365!/355! = (365)(364)(363)(362)(361)(360)(359)(358)(357)(356) = 3.706 x 1025.

The probability that all ten people have different birthdays is (3.706 x 1025) / (4.197 x 1025) = 0.8831.

The probability that at least two people have the same birthday is 1 - 0.8831 = 0.1169.

(e) The number of possible combinations of n people's birthdays is 365n.

The number of ways for n people to have different birthdays is 365!/(365-n)!.

The probability that all n people have different birthdays is [365!/(365-n)!] / 365n.

The probability that at least two people have the same birthday is

P = 1 - [365!/(365-n)!] / 365n > 0.5
=> 0.5 > [365!/(365-n)!] / 365n
=> log 0.5 > log[365!/(365-n)!] - n log 365
=> log 0.5 > log 365 + log 364 + ... + log(365-n+1) - n log 365
=> log 0.5 > f(n)
=> - 0.30103 > f(n) (1)

where

f(n) = log 365 + log 364 + ... + log(365-n+1) - n log 365
= Si=1n log(365-i+1) - n log 365

If we find the smallest value of n for which (1) is satisfied, this will be the smallest value of n for which the probability that at least two people have the same birthday is greater than 0.5 (i.e., it is more likely that at least two people have the same birthday than it is that all the people have different birthdays).

The file DevorePeck4.60.061231.xls lists values of f(n) and 1 - 10f(n) for n = 1, 2,..., 57. 1 - 10f(n) is the probability that at least two people have the same birthdays. The table below shows the values of f(n) and 1 - 10f(n) for n = 1, 2, 3, 10, 22, 23, 40, 41, 56, and 57.

n f(n) 1 - 10f(n)
1
0
0
2
- 0.00119
0.00274
3
- 0.00358
0.008204
10
- 0.05401
0.116948
22
- 0.28042
0.475695
23
- 0.30741
0.507297
40
- 0.9635
0.891232
41
- 1.01391
0.903152
56
- 1.93302
0.988332
57
- 2.00535
0.990122

We see that if n = (23, 41, 57), the probability that at least two people have the same birthday is greater than (0.5, 0.9, 0.99).

Back to Main Menu

PROBLEM

(a) Find the probability and odds of rolling eight or less with a pair of balanced dice.
(b) If a researcher randomly selected 8 of 80 households to be included in a study, find the probability and odds that any particular household will be included.
(c) Find the probability and odds of getting at least three heads in six flips of a balanced coin.

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.128]

SOLUTION

(a) There are 36 possible results of rolling two dice. The following table lists the combinations which give various total values on the two dice.

Total Combinations Probability
2
(1, 1)
1/36
3
(2, 1) (1, 2)
2/36 = 1/18
4
(3, 1) (2, 2) (1, 3)
3/36 = 1/12
5
(4, 1) (3, 2) (2, 3) (1, 4)
4/36 = 1/9
6
(5, 1) (4, 2) (3, 3) (2, 4) (1, 5)
5/36
7
(6, 1) (5, 2) (4, 3) (3, 4) (2, 5) (1, 6)
6/36 = 1/6
8
(6, 2) (5, 3) (4, 4) (3, 5) (2, 6)
5/36
9
(6, 3) (5, 4) (4, 5) (3, 6)
4/36 = 1/9
10
(6, 4) (5, 5) (4, 6)
3/36 = 1/12
11
(6, 5) (5, 6)
2/36 = 1/18
12
(6, 6)
1/36

The probability of rolling an eight or less is 26/36 = 13/18. The odds of rolling an eight or less are (13/18) / (1 - 13/18) = 13/5 or 13 to 5.

(b) The probability that any particular household will be included in the study is 8/80 = 1/10. The odds that any particular household will be included in the study is (8/80) / (1 - 8/80) = 8/72 = 1/9 or 1 to 9.

(c) The number of ways to get k heads in n coin flips is the same as the number of combinations of k items chosen from n items, which is n!/[k!(n-k)!]. The following table shows the number of ways six coin flips can result in different numbers of heads.

Total Heads Combinations Probability
6
6!/[6!(6-6)!] = 1
1/64
5
6!/[5!(6-5)!] = 6
6/64 = 3/32
4
6!/[4!(6-4)!] = 15
15/64
3
6!/[3!(6-3)!] = 20
20/64 = 5/16
2
6!/[2!(6-2)!] = 15
15/64
1
6!/[1!(6-1)!] = 6
6/64 = 3/32
0
6!/[0!(6-0)!] = 1
1/64

The probability of getting at least three heads is 42/64 = 21/32. The odds of getting at least three heads are (21/32) / (1 - 21/32) = 21/11 or 21 to 11.

Back to Main Menu

PROBLEM

A hotel gets cars for its guests from three rental agencies, 20 percent from agency X, 40 percent from agency Y, and 40 percent from agency Z. If 14 percent of the cars from X, 4 percent from Y, and 8 percent from Z need tune-ups, what is the probability that
(a) a car needing a tune-up will be delivered to one of the guests?
(b) if a car needing a tune-up is delivered to one of the guests, it came from agency Z?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.131]

SOLUTION

(a) From the given probabilities, we can deduce the probabilities that a car will come from a particular agency and either need a tune-up or not need a tune-up. These are summarized in the following table.

Agency Needs Tune-Up Does Not Need Tune-Up Total
X
(0.14)(0.20) = 0.028
(0.86)(0.20) = 0.172
0.20
Y
(0.04)(0.40) = 0.016
(0.96)(0.40) = 0.384
0.40
Z
(0.08)(0.40) = 0.032
(0.92)(0.40) = 0.368
0.40
Total
0.028 + 0.016 + 0.032 = 0.076
0.172 + 0.384 + 0.368 = 0.924
1.000

Thus, the probability that a car needing a tune-up will be delivered to one of the guests is 0.076.

(b) If a car needing a tune-up is delivered to one of the guests, the probability that it came from agency Z is 0.032 / 0.076 = 0.4211.

Back to Main Menu

PROBLEM

If the probability is 0.26 that any one woman will name yellow or orange as her favorite color, what is the probability that four women, selected at random, will all name yellow or orange as their favorite color?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.133]

SOLUTION

The probability that all four women will name yellow or orange as their favorite color is 0.264 = 0.00457.

Back to Main Menu

PROBLEM

A library received 40 new books, including 12 historical novels. If four of these books are selected at random, what is the probability that not one of them is a historical novel?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.149]

SOLUTION

The probability that none of the four selected books is a historical novel is

P(0) = Pi=14 Pi

where Pi is the probability that the ith selected book is not a historical novel, given that the books selected prior to the ith book, if any, are not historical novels. If we define n = 40 and k = 12, then

Pi = 1 - k/[n-(i-1)] = 1 - 12/[40-(i-1)] = 1 - 12/(41-i)

The number of historical novels which could be selected stays at 12 for i = 1, 2, 3, and 4, but the total number of books available to be selected from keeps decreasing every time one is selected. We have the following values of Pi:

i Pi = 1 - k/[n-(i-1)]
1
1 - 12/40 = 0.7
2
1 - 12/39 = 0.692308
3
1 - 12/38 = 0.684211
4
1 - 12/37 = 0.675676


Thus,

P(0) = Pi=14 Pi = P1P2P3P4 = (0.7)(0.692308)(0.684211)(0.675676) = 0.2240

Back to Main Menu

PROBLEM

A movie producer feels that the odds are 8 to 1 that his new movie will not be rated G, 15 to 3 that it will not be rated PG, and 13 to 5 that it will not get either of these two ratings. Are the corresponding probabilities consistent?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.151]

SOLUTION

We have the following odds and probabilities:

Rating Odds Probability
not G
8 to 1
8 / (8 + 1) = 8/9
not PG
15 to 3
15 / (15 + 3) = 15/18 = 5/6
G
(1/9) / (1 - 1/9) = 1/8 or 1 to 8
1 - 8/9 = 1/9
PG
(1/6) / (1 - 1/6) = 1/5 or 1 to 5
1 - 5/6 = 1/6
G or PG
(5/18) / (1 - 5/18) = 5/13 or 5 to 13
1/9 + 1/6 = 2/18 + 3/18 = 5/18
not G or PG
(13/18) / (1 - 13/18) = 13/5 or 13 to 5
1 - 5/18 = 13/18

Thus, the probabilities corresponding to the stated odds are consistent.

Back to Main Menu

PROBLEM

The probability that George will get an M.A. degree is 0.40, and the probability that with an M.A. degree he will get a well-paying job is 0.85. What is the probability that he will get an M.A. degree and a well-paying job?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.152]

SOLUTION

The probability that George will get an M.A. degree and a well-paying job is (0.40)(0.85) = 0.34.

Gets Well-Paying Job Does Not Get Well-Paying Job Total
Gets M.A
(0.40)(0.85) = 0.34
(0.40)(0.15) = 0.06
0.40
Does Not Get M.A.
-
-
0.60

Back to Main Menu

PROBLEM

Lie detectors have been used during wartime to uncover security risks. As is well known, lie detectors are not infallible. Let us suppose that the probability is 0.10 that the lie detector will fail to detect a person who is a security risk and that the probability is 0.08 that the lie detector will incorrectly label a person who is not a security risk. If 2 percent of the persons who are given the test are actually security risks, what is the probability that
(a) a person labeled a security risk by a lie detector test is in fact a security risk?
(b) a person who is cleared by a lie detector test is in fact not a security risk?

[from Freund, John E., and Simon, Gary A. 1997, Modern Elementary Statistics, Ninth Edition Revised (Upper Saddle River, New Jersey: Prentice Hall), problem 6.153]

SOLUTION

Based on the information given above, we have the following probabilities:

Labeled Security Risk Cleared Total
Security Risk
(0.90)(0.02) = 0.018
(0.10)(0.02) = 0.002
0.02
Non-Security Risk
(0.08)(0.98) = 0.0784
(0.92)(0.98) = 0.9016
0.98
Total
0.018 + 0.0784 = 0.0964
0.002 + 0.9016 = 0.9036
1.00

(a) The probability that a person labeled a security risk by a lie detector test is in fact a security risk is 0.018 / 0.0964 = 0.1867.

(b) The probability that a person who is cleared by a lie detector test is in fact not a security risk is 0.9016 / 0.9036 = 0.9978.

Back to Main Menu

PROBLEM

A lot of n items contains k defectives, and m are selected randomly and inspected. How should the value of m be chosen so that the probability that at least one defective item turns up is 0.90? Apply your answer to (a) n = 1000, k = 10, and (b) n = 10,000, k = 100.

[from Rice, John A. 1995, Mathematical Statistics and Data Analysis, Second Edition (Belmont, California: Duxbury Press), problem 1.18]

SOLUTION

(a) We need to find m so that the probability that no defective item turns up is less than 0.10. The probability that no defective item turns up if m samples are selected is

P(0) = (1 - k/n)[1 - k/(n-1)][1 - k/(n-2)]...{1 - k/[n-(m-1)]} = Pi=1m {1 - k/[n-(i-1)]} = Pi=1m Pi

where

Pi = {1 - k/[n-(i-1)]}

The term k/[n-(i-1)] is the probability that when the ith sample is picked, after the first i - 1 samples picked have all resulted in a nondefective, the ith sample is defective.

The term {1 - k/[n-(i-1)]} is the probability that when the ith sample is picked, after the first i - 1 samples picked have all resulted in a nondefective, the ith sample is also nondefective.

If n = 1000 and k = 10, the probability that the first sample (i = 1) picked is defective is k/n = 10/1000 = 0.01. The probability that the first sample picked is nondefective is

P1 = 1 - k/n = 1 - 0.01 = 0.99

If the first sample picked is nondefective, the probability that the second sample (i = 2) picked is defective is k/(n-1) = 10/999. The probability that the second sample picked is nondefective is

P2 = 1 - k/(n-1) = 1 - 10/999 = 989/999

If we calculate Pi=1m Pi for m = 1, 2, 3,..., we find that the lowest value of m for which Pi=1m Pi < 0.10 is m = 205. See Rice1.18.061216.

(b) If n = 10,000 and k = 100, the probability that the first sample (i = 1) picked is defective is k/n = 100/10,000 = 0.01. The probability that the first sample picked is nondefective is

P1 = 1 - k/n = 1 - 0.01 = 0.99

If the first sample picked is nondefective, the probability that the second sample (i = 2) picked is defective is k/(n-1) = 100/9999. The probability that the second sample picked is nondefective is

P2 = 1 - k/(n-1) = 1 - 100/9999 = 9899/9999

If we calculate Pi=1m Pi for m = 1, 2, 3,..., we find that the lowest value of m for which Pi=1m Pi < 0.10 is m = 227. See Rice1.18.061216.xls.

Back to Main Menu

PROBLEM

A multiple-choice test consists of 20 items, each with four choices. A student is able to eliminate one of the choices on each question as incorrect and chooses randomly from the remaining three choices. A passing grade is 12 items or more correct.
(a) What is the probability that the student passes?
(b) Answer the question in part (a) again, assuming that the student can eliminate two of the choices on each question.

[from Rice, John A. 1995, Mathematical Statistics and Data Analysis, Second Edition (Belmont, California: Duxbury Press), problem 2.13]

SOLUTION

(a) Define

N = 20 = total number of test questions
a = 1/3 = probability of getting a particular question correct
b = 2/3 = probability of getting a particular question wrong
C(k) = number of possible ways (combinations) to get k questions correct and N - k questions wrong
p(k) = probability of each of the C(k) combinations that has k questions correct and N - k questions wrong
P(k) = total probability of getting k questions correct and N - k questions wrong

The number possible ways to get k questions correct and N - k questions wrong is the same as the number of combinations of k items selected from N items, which is

C(k) = N!/[(N-k)!k!]

The probability of each of these combinations is

p(k) = akbN-k

The total probability of getting k questions correct and N - k questions wrong is

P(k) = C(k)p(k) = {N!/[(N-k)!k!]}akbN-k

The probability of getting at least 12 questions correct and passing is

P(k>12) = Sk=1220 P(k) = Sk=1220 {N!/[(N-k)!k!]}akbN-k

The calculation is done in the Excel sheet Rice2.13.061202.xls. The result is P(k>12) = 0.0130.

(b) The solution to this part of the problem is the same as for part (a) except that here a = 1/2 = b. The calculation is also shown in the Excel sheet, and the result is P(k>12) = 0.2517.

Back to Main Menu

PROBLEM

The World Series is a "best of seven" series in which the first baseball team that wins four games wins the series. Assuming that the two baseball teams, A and B, are equally good, find the probability that A will eventually win the World Series if
(a) it loses the first game.
(b) it loses the first two games.
(c) it loses the first three games.

SOLUTION

(a) Consider all possible outcomes of the World Series, given that team A has lost the first game.

Team A wins in seven games. The seventh game must be one of its wins. The possible outcomes are of the form LXXXXXW (i.e., team A loses the first game and wins the seventh game), where the "XXXXX" must have three W's and two L's. There are (5)(4)/2 = 10 ways of doing this. This comes from considering how many ways there are to distribute two losses among the five spaces. There are five possible positions for the first L and four possible positions for the second L. We divide by two because the two L's are indistinguishable. The ten possible ways team A can win in seven games are as follows:

LWWWLLW
LWWLLWW
LWLLWWW
LLLWWWW
LLWLWWW
LLWWLWW
LLWWWLW
LWLWLWW
LWLWWLW

Each of these has a probability of (1/2)6 = 1/64 since the probability of winning or losing each of the last six games is 1/2. The total probability that team A will win in seven games is 10/64 = 5/32.

Team A wins in six games. The sixth game must be one of its wins. The possible outcomes are of the form LXXXXW, where "XXXX" must have three W's and one L. There are four ways of doing this:

LLWWWW
LWLWWW
LWWLWW
LWWWLW

Each of these has a probability of (1/2)5 = 1/32. The total probability that team A will win in six games is 4/32 = 1/8.

Team A wins in five games. The only way this can happen is if team A wins the next four games:

LWWWW

The probability that team A will win in five games is (1/2)4 = 1/16.

Team A loses in four games. The only way this can happen is if team A loses the next three games:

LLLL

The probability that team A will lose in four games is (1/2)3 = 1/8.

Team A loses in five games. The fifth game must be one of the losses. The possible outcomes are of the form LXXXL, where "XXX" must have one W and two L's. There are three ways of doing this:

LWLLL
LLWLL
LLLWL

Each of these has a probability of (1/2)4 = 1/16. The total probability that team A will lose in five games is 3/16.

Team A loses in six games. The sixth game must be one of the losses. The possible outcomes are of the form LXXXXL, where "XXXX" must have two W's and two L's. There are (4)(3)/2 = 6 ways of doing this. This comes from considering how many ways there are to distribute two losses among the four spaces. There are four possible positions for the first L and three possible positions for the second L. We divide by two because the two L's are indistinguishable. The six possible ways team A can lose in six games are as follows:

LLLWWL
LLWLWL
LLWWLL
LWLLWL
LWLWLL
LWWLLL

Each of these has a probability of (1/2)5 = 1/32. The total probability that team A will lose in six games is 6/32 = 3/16.

Team A loses in seven games. The seventh game must be one of the losses. The possible outcomes are of the form LXXXXXL, where "XXXXX" must have three W's and two L's. There are (5)(4)/2 = 10 ways of doing this:

LLLWWWL
LWLLWWL
LWWLLWL
LWWWLLL
LLWLWWL
LLWWLWL
LLWWWLL
LWLWLWL
LWLWWLL
LWWLWLL

Each of these has a probability of (1/2)6 = 1/64. The total probability that team A will lose in seven games is 10/64 = 5/32.

The probability that team A will win the World Series is 5/32 + 1/8 + 1/16 = 11/32. The probability that team A will lose the World Series is 1/8 + 3/16 + 3/16 + 5/32 = 21/32.

(b) Consider all possible outcomes of the World Series, given that team A has lost the first two games.

Team A wins in seven games. The seventh game musts be one of its wins. The possible outcomes are of the form LLXXXXW where "XXXX" must have three W's and one L. There are four ways of doing this:

LLLWWWW
LLWLWWW
LLWWLWW
LLWWWLW

Each of these has a probability of (1/2)5 = 1/32. The total probability that team A will win in seven games is 4/32 = 1/8.

Team A wins in six games. The only this can happen is if team A wins the next four games:

LLWWWW

The probability that team A will win in six games is (1/2)4 = 1/16.

Team A loses in four games. The only way this can happen is if team A loses the next two games:

LLLL

The probability that team A will lose in four games is (1/2)2 = 1/4.

Team A loses in five games. The fifth game must be one of its losses. The possible outcomes are of the form LLXXXL where "XXX" must have one W and one L. There are two ways of doing this:

LLLWL
LLWLL

Each of these has a probability of (1/2)3 = 1/8. The total probability that team A will lose in five games is 2/8 = 1/4.

Team A loses in six games. The sixth game must be one of its losses. The possible outcomes are of the form LLXXXL where "XXX" must have two W's and one L. There are three ways of doing this:

LLLWWL
LLWLWL
LLWWLL

Each of these has a probability of (1/2)4 = 1/16. The total probability that team A will lose in six games is 3/16.

Team A loses in seven games. The seventh game must be one of its losses. The possible outcomes are of the form LLXXXXL where "XXXX" must have three W's and one L. There are four ways of doing this:

LLLWWWL
LLWLWWL
LLWWLWL
LLWWWLL

Each of these has a probability of (1/2)5 = 1/32. The total probability that team A will lose in seven games is 4/32 = 1/8.

The probability that team A will win the World Series is 1/8 + 1/16 = 3/16. The probability that team A will lose the World Series is 1/4 + 1/4 + 3/16 + 1/8 = 13/16.

(c) Consider all possible outcomes of the World Series, given that team A has lost the first three games.

Team A wins in seven games. The only way this can happen is if team A wins the next four games:

LLLWWWW

The probability that team A will win in seven games is (1/2)4 = 1/16.

Team A loses in four games. The only way this can happen is if team A loses the next game:

LLLL

The probability that team A will lose in four games is 1/2.

Team A loses in five games. The fifth game must be a loss. There is only one way of doing this:

LLLWL

The probability that team A will lose in five games is (1/2)2 = 1/4.

Team A loses in six games. The sixth game must be a loss. There is only one way of doing this:

LLLWWL

The probability that team A will lose in six games is (1/2)3 = 1/8.

Team A loses in seven games. The seventh game must be a loss. There is only one way of doing this:

LLLWWWL

The probability that team A will lose in seven games is (1/2)4 = 1/16.

The probability that team A will win the World Series is 1/16. The probability that team A will lose the World Series is 1/2 + 1/4 + 1/8 + 1/16 = 15/16.

Back to Main Menu

PROBLEM

Two teams, A and B, play a series of games. If team A has probability 0.4 of winning each game, is it to its advantage to play the best three out of five games or the best four out of seven? Assume the outcomes of successive games are independent.

[from Rice, John A. 1995, Mathematical Statistics and Data Analysis, Second Edition (Belmont, California: Duxbury Press), problem 2.15]

SOLUTION

(a) The possible outcomes of a best of five series fall into six categories. Listed in best-to-worst order for team A, these are: Team A wins in 3, 4, or 5 games, or team A loses in 5, 4, or 3 games.

(i) If team A wins in N + 1 games, the (N+1)th game must have a win for team A and the first N games must have two wins and N - 2 losses.

The number of ways the first N games can have two wins for team A is the same as the number of combinations of two items picked from N items, which is

C(N, 2) = N!/[(N-2)!2!]

The probability of each of these combinations, which would mean that team A has a total of 3 wins and N - 2 losses, is

p(3, N-2) = a3bN-2

where (a, b) = (0.4, 0.6) is the probability that team A (wins, loses) a particular game. The probability that team A wins in N + 1 games is

Pwin(N+1) = C(N, 2)p(3, N-2) = {N!/[(N-2)!2!]}a3bN-2 = {N!/[(N-2)!2!]}(0.4)3(0.6)N-2 (1)

(ii) If team A loses in N + 1 games, the (N+1)th game must have a loss for team A and the first N games must have two losses and N - 2 wins.

The number of ways the first N games can have two losses for team A is the same as the number of combinations of two items picked from N items, which is

C(N, 2) = N!/[(N-2)!2!]

The probability of each of these combinations, which would mean that team A has a total of 3 losses and N - 2 wins, is

p(N-2, 3) = aN-2b3

where (a, b) = (0.4, 0.6) is the probability that team A (wins, loses) a particular game. The probability that team A loses in N + 1 games is

Plose(N+1) = C(N, 2)p(N-2, 3) = {N!/[(N-2)!2!]}aN-2b3 = {N!/[(N-2)!2!]}(0.4)N-2(0.6)3 (2)

Example. To calculate the probability that team A wins in 4 games, we use (1) and set N + 1 = 4 => N = 3:

Pwin(4) = C(3, 2)p(3, 3-2) = {3!/[(3-2)!2!]}a3b3-2 = (3)(0.4)3(0.6) = 0.1152

The following table shows the possible outcomes of a best of five series.

Best of Five Series
Overall Outcome Number of Ways This Can Happen Probability of Each Outcome Total Probabiliity
Team A Wins in 3 Games
WWW
1
(0.4)3 = 0.064
0.064
Team A Wins in 4 Games
XXXW
XXX = 2W + 1L
3!/[(3-2)!2!] = 3
(0.4)3(0.6) = 0.0384
0.1152
Team A Wins in 5 Games
XXXXW
XXXX = 2W + 2L
4!/[(4-2)!2!] = 6
(0.4)3(0.6)2 = 0.02304
0.13824
Team A Loses in 5 Games
XXXXL
XXXX = 2L + 2W
4!/[(4-2)!2!] = 6
(0.4)2(0.6)3 = 0.03456
0.20736
Team A Loses in 4 Games
XXXL
XXX = 2L + 1W
3!/[(3-2)!2!] = 3
(0.4)(0.6)3 = 0.0864
0.2592
Team A Loses in 3 Games
LLL
1
(0.6)3 = 0.216
0.216

The total probability that team A will win a best of five series is 0.064 + 0.1152 + 0.13824 = 0.31744.

(b) The possible outcomes of a best of seven series fall into eight categories. Listed in best-to-worst order for team A, these are: Team A wins in 4, 5, 6, or 7 games, or team A loses in 7, 6, 5, or 4 games.

(i) If team A wins in N + 1 games, the (N+1)th game must have a win for team A and the first N games must have three wins and N - 3 losses.

The number of ways the first N games can have three wins for team A is the same as the number of combinations of three items picked from N items, which is

C(N, 3) = N!/[(N-3)!3!]

The probability of each of these combinations, which would mean that team A has a total of 4 wins and N - 3 losses, is

p(4, N-3) = a4bN-3

where (a, b) = (0.4, 0.6) is the probability that team A (wins, loses) a particular game. The probability that team A wins in N + 1 games is

Pwin(N+1) = C(N, 3)p(4, N-3) = {N!/[(N-3)!3!]}a4bN-3 = {N!/[(N-3)!3!]}(0.4)4(0.6)N-3 (3)

(ii) If team A loses in N + 1 games, the (N+1)th game must have a loss for team A and the first N games must have three losses and N - 3 wins.

The number of ways the first N games can have three losses for team A is the same as the number of combinations of three items picked from N items, which is

C(N, 3) = N!/[(N-3)!3!]

The probability of each of these combinations, which would mean that team A has a total of 4 losses and N - 3 wins, is

p(N-3, 4) = aN-3b4

where (a, b) = (0.4, 0.6) is the probability that team A (wins, loses) a particular game. The probability that team A loses in N + 1 games is

Plose(N+1) = C(N, 3)p(N-3, 4) = {N!/[(N-3)!3!]}aN-3b4 = {N!/[(N-2)!2!]}(0.4)N-3(0.6)4 (4)

Example. To calculate the probability that team A loses in 6 games, we use (4) and set N + 1 = 6 => N = 5:

Plose(6) = C(5, 3)p(5-3, 4) = {5!/[(5-3)!3!]}a5-3b4 = (10)(0.4)2(0.6)4 = 0.20736

The following table shows the possible outcomes of a best of seven series.

Best of Seven Series
Overall Outcome Number of Ways This Can Happen Probability of Each Outcome Total Probabiliity
Team A Wins in 4 Games
WWWW
1
(0.4)4 = 0.0256
0.0256
Team A Wins in 5 Games
XXXXW
XXXX = 3W + 1L
4!/[(4-3)!3!] = 4
(0.4)4(0.6) = 0.01536
0.06144
Team A Wins in 6 Games
XXXXXW
XXXXX = 3W + 2L
5!/[(5-3)!3!] = 10
(0.4)4(0.6)2 = 0.009216
0.09216
Team A Wins in 7 Games
XXXXXXW
XXXXXX = 3W + 3L
6!/[(6-3)!3!] = 20
(0.4)4(0.6)3 = 0.0055296
0.110592
Team A Loses in 7 Games
XXXXXXL
XXXXXX = 3L + 3W
6!/[(6-3)!3!] = 20
(0.4)3(0.6)4 = 0.0082944
0.165888
Team A Loses in 6 Games
XXXXXL
XXXXX = 3L + 2W
5!/[(5-3)!3!] = 10
(0.4)2(0.6)4 = 0.020736
0.20736
Team A Loses in 5 Games
XXXXL
XXXX = 3L + 1W
4!/[(4-3)!3!] = 4
(0.4)(0.6)4 = 0.05184
0.20736
Team A Loses in 4 Games
LLLL
1
(0.6)4) = 0.1296
0.1296

The total probability that team A will win a best of seven series is 0.0256 + 0.06144 + 0.09216 + 0.110592 = 0.289792. Team A is more likely to win a best of five series.

Back to Main Menu

Fitting Data

Consider the set of data points (x1, y1), (x2, y2),..., (xN, yN). We will find the best linear fit of the form

y(x) = ax + b

where a and b are constants, by minimizing the root-mean-square (RMS) differences between the values of y(xi) and the yi. Define the function

f = Si=1N [y(xi) - yi]2 = Si=1N (axi + b - yi)2

The partial derivatives of f with respect to a and b are

∂f/∂a = Si=1N 2(axi + b - yi)xi = 2 Si=1N (axi + b - yi)xi = 2[a Si=1N xi2 + b Si=1N xi - Si=1N xiyi]

and

∂f/∂b = Si=1N 2(axi + b - yi) = 2 Si=1N (axi + b - yi) = 2[a Si=1N xi + b Si=1N 1 - Si=1N yi]
= 2(a Si=1N xi + bN - Si=1N yi)

If we define

Sx = Si=1N xi
Sy = Si=1N yi
Sxy = Si=1N xiyi
Sxx = Si=1N xi2

we can write

∂f/∂a = 2(aSxx + bSx - Sxy)
∂f/∂b = 2(aSx + bN - Sy)

Next, we set the partial derivatives equal to zero and solve for the values of a and b which minimize f.

∂f/∂a = 2(aSxx + bSx - Sxy) = 0 => aSxx + bSx - Sxy = 0 (1)
∂f/∂b = 2(aSx + bN - Sy) = 0 => aSx + bN - Sy = 0 => b = (Sy - aSx) / N (2)

Substituting (2) into (1), we get

aSxx + Sx(Sy - aSx) / N - Sxy = 0 => aSxx + (1/N)SxSy - (1/N)aSx2 - Sxy = 0
=> NaSxx + SxSy - aSx2 - NSxy = 0 => a = (NSxy - SxSy) / (NSxx - Sx2) (3)

Substituting (3) into (2), we get

b = (1/N)Sy - (1/N)Sx[(NSxy - SxSy) / (NSxx - Sx2)]
= [(1/N)Sy(NSxx - Sx2) - (1/N)Sx(NSxy - SxSy)] / (NSxx - Sx2)
= [Sy(Sxx - Sx2/N) - Sx(Sxy - SxSy/N)] / (NSxx - Sx2)
= (SySxx - SxSxy) / (NSxx - Sx2)

Back to Main Menu

PROBLEM

The following x and y values, in cm, are measured:

x (cm)y (cm)
-4.375
0.000
-3.828
0.250
-3.281
1.250
-2.734
1.500
-2.188
1.750
-1.641
1.750
-1.094
2.000
-0.547
2.125
0.000
2.250
0.547
2.125
1.094
2.000
1.641
1.750
2.188
1.750
2.734
1.500
3.281
1.250
3.828
0.250
4.375
0.000

Find the function of the form

y = B sqrt[1 - (x/A)2] - C

where A, B, and C are constants, which best fits the data.

SOLUTION

To solve this problem, we write a Fortran program which constructs a three-dimensional grid of points (A, B, C) which represent combinations of A, B, and C to test. For each set (A, B, C), calculate the value of y which corresponds to each value of x in the above table, and the root-mean-square deviation from the data,

σ = {(1/N) Si=1N [y(xi) - yi]2}1/2

where N = 17 is the number of data points,

y(xi) = B sqrt[1 - (xi/A)2] - C

and (xi, yi) is the (x, y) value of the ith data point. We find the combination of A, B, and C which minimizes σ.

The program takes as input the minimum and maximum values of A, B, and C, which define the range of values to be tested, and the number of grid points in each direction (A, B, C). When the grid point yielding the lowest value of σ is found, a new grid is constructed surrounding this grid point with the grid cell size reduced by a factor of 0.95. The grid point in this new grid which minimizes σ is found. The process is repeated until the optimal values of A, B, and C converge.

An example of a program which does this is bestfit060318.f. If the minimum and maximum values of A, B, and C are all chosen to be 0 and 10, the program converges to (A, B, C) = (5.535, 5.785, 3.626) with σ = 0.1482. A graph of the results can be seen in Bestfit060312.xls.

Back to Main Menu