Probability Book2
Probability Book2
El em en t a r y P r o b a b il it y
dgjmrw
David A. SANTOS [email protected]
Free to photocopy and distribute
♠ ♣ ♦ ♥
Contents
Preface ii 3 Probability Axioms 47
3.1 Some History . . . . . . . . . . . . . . . . 47
Legal Notice iii 3.2 Probability Spaces . . . . . . . . . . . . . 47
3.3 Random Variables . . . . . . . . . . . . . . 51
To the Student iv 3.4 Independence . . . . . . . . . . . . . . . . 54
3.5 Conditional Probability . . . . . . . . . . . 57
1 Preliminaries 1 3.6 Bayes’ Rule . . . . . . . . . . . . . . . . . 64
1.1 Sets . . . . . . . . . . . . . . . . . . . . . 1
1.2 Sample Spaces and Events . . . . . . . . . 4 4 Discrete Random Variables 68
1.3 Combining Events . . . . . . . . . . . . . . 6 4.1 Uniform Random Variables . . . . . . . . . 68
1.4 Functions . . . . . . . . . . . . . . . . . . 9 4.2 Binomial Random Variables . . . . . . . . 76
4.3 Geometric Random Variables . . . . . . . . 79
2 Counting 13 4.4 Negative Binomial Random Variables . . . . 81
2.1 Inclusion-Exclusion . . . . . . . . . . . . . 13
2.2 The Product Rule . . . . . . . . . . . . . . 18 5 Uniform Continuous Random Variables 83
2.3 The Sum Rule . . . . . . . . . . . . . . . . 23
6 Expectation and Variance 88
2.4 Permutations without Repetitions . . . . . 26 6.1 Expectation and Variance . . . . . . . . . . 88
2.5 Permutations with Repetitions . . . . . . . 28 6.2 Indicator Random Variables . . . . . . . . 92
2.6 Combinations without Repetitions . . . . . 32 6.3 Conditional Expectation . . . . . . . . . . 94
2.7 Combinations with Repetitions . . . . . . . 40
2.8 Binomial Theorem . . . . . . . . . . . . . 43 A Answers 95
A Preface A
These notes started during the Spring of 2002. The contents are mostly discrete probability, suitable
for students who have mastered only elementary algebra. No calculus is needed, except perhaps in a
very few optional exercises.
I would appreciate any comments, suggestions, corrections, etc., which can be addressed to the
email below.
David A. SANTOS
[email protected]
ii
A Legal Notice A
This material may be distributed only subject to the terms and conditions set forth in the Open Publi-
cation License, version 1.0 or later (the latest version is presently available at
http://www.opencontent.org/openpub/
THIS WORK IS LICENSED AND PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE OR A WARRANTY OF NON-INFRINGEMENT.
THIS DOCUMENT MAY NOT BE SOLD FOR PROFIT OR INCORPORATED INTO COMMERCIAL
DOCUMENTS WITHOUT EXPRESS PERMISSION FROM THE AUTHOR(S). THIS DOCUMENT MAY BE
FREELY DISTRIBUTED PROVIDED THE NAME OF THE ORIGINAL AUTHOR(S) IS(ARE) KEPT AND ANY
CHANGES TO IT NOTED.
The postscript images for cards appearing in these notes are from:
http://melusine.eu.org/syracuse/postscript/cartes01/
iii
A To the Student A
These notes are provided for your benefit as an attempt to organise the salient points of the course.
They are a very terse account of the main ideas of the course, and are to be used mostly to refer to
central definitions and theorems. The number of examples is minimal, and here you will find few
exercises. The motivation or informal ideas of looking at a certain topic, the ideas linking a topic with
another, the worked-out examples, etc., are given in class. Hence these notes are not a substitute to
lectures: you must always attend to lectures. The order of the notes may not necessarily be the order
followed in the class.
There is a certain algebraic fluency that is necessary for a course at this level. These algebraic
prerequisites would be difficult to codify here, as they vary depending on class response and the topic
lectured. If at any stage you stumble in Algebra, seek help! I am here to help you!
Tutoring can sometimes help, but bear in mind that whoever tutors you may not be familiar with
my conventions. Again, I am here to help! On the same vein, other books may help, but the approach
presented here is at times unorthodox and finding alternative sources might be difficult.
• Class provides the informal discussion, and you will profit from the comments of your classmates,
as well as gain confidence by providing your insights and interpretations of a topic. Don’t be
absent!
• Once the lecture of a particular topic has been given, take a fresh look at the notes of the lecture
topic.
• Try to understand a single example well, rather than ill-digest multiple examples.
• Ask questions during the lecture. There are two main types of questions that you are likely to
ask.
1. Questions of Correction: Is that a minus sign there? If you think that, for example, I have
missed out a minus sign or wrote P where it should have been Q,1 then by all means, ask.
No one likes to carry an error till line XLV because the audience failed to point out an error
on line I. Don’t wait till the end of the class to point out an error. Do it when there is still time
to correct it!
2. Questions of Understanding: I don’t get it! Admitting that you do not understand something is
an act requiring utmost courage. But if you don’t, it is likely that many others in the audience
also don’t. On the same vein, if you feel you can explain a point to an inquiring classmate, I
will allow you time in the lecture to do so. The best way to ask a question is something like:
“How did you get from the second step to the third step?” or “What does it mean to complete
the square?” Asseverations like “I don’t understand” do not help me answer your queries. If
I consider that you are asking the same questions too many times, it may be that you need
extra help, in which case we will settle what to do outside the lecture.
• Don’t fall behind! The sequence of topics is closely interrelated, with one topic leading to another.
1 My doctoral adviser used to say “I said A, I wrote B, I meant C and it should have been D!
iv
To the Student v
• The use of calculators is allowed, especially in the occasional lengthy calculations. However, when
graphing, you will need to provide algebraic/analytic/geometric support of your arguments. The
questions on assignments and exams will be posed in such a way that it will be of no advantage
to have a graphing calculator.
• Presentation is critical. Clearly outline your ideas. When writing solutions, outline major steps
and write in complete sentences. As a guide, you may try to emulate the style presented in the
scant examples furnished in these notes.
A 1 Preliminaries A
1.1 Sets
1 Definition By a set we will understand any well-defined collection of objects. These objects are called
the elements of the set. A subset is a sub-collection of a set. We denote that the set B is a subset of A
by the notation B ⊆ A. If a belongs to the set A, then we write a ∈ A, read “a is an element of A.” If a
does not belong to the set A, we write a 6∈ A, read “a is not an element of A.”
Notation: We will normally denote sets by capital letters, say A, B, Ω, R, etc. Elements will
be denoted by lowercase letters, say a, b, ω, r, etc. The following sets will have the special
symbols below.
☞ Observe that ∅ ⊆ N ⊆ Z ⊆ R,and that the empty set is always a subset of any set.
2 Example There are various ways to allude to a set:
• by a verbal description, as in “the set A of all integers whose absolute value is strictly less than 2.
• by a mathematical description, as in A = {x ∈ Z : |x| < 2}. This is read “the set of x in Z such
that |x| is strictly less than 2.”
• by listing the elements of the set, as in A = {−1, 0, 1}.
Notice that the set A is the same in all three instances above.
3 Definition Given a particular situation, the universe or universal set is the set containing all the points
under consideration. For any particular situation, its universe will be denoted by Ω unless otherwise
noted.1
4 Definition An interval I is a subset of the real numbers with the following property: if s ∈ I and t ∈ I,
and if s < x < t, then x ∈ I. In other words, intervals are those subsets of real numbers with the
property that every number between two elements is also contained in the set. Since there are infinitely
many decimals between two different real numbers, intervals with distinct endpoints contain infinitely
many members. Table 1.1 shews the various types of intervals.
Observe that we indicate that the endpoints are included by means of shading the dots at the endpoints
and that the endpoints are excluded by not shading the dots at the endpoints. 2
1 The capital Greek letter omega.
2 Itmay seem like a silly analogy, but think that in [a; b] the brackets are “arms” “hugging” a and b, but in ]a; b[ the “arms” are
repulsed. “Hugging” is thus equivalent to including the endpoint, and “repulsing” is equivalent to excluding the endpoint.
1
2 Chapter 1
[a; b] {x ∈ R : a ≤ x ≤ b}
a b
]a; b[ {x ∈ R : a < x < b}
a b
[a; b[ {x ∈ R : a ≤ x < b}
a b
]a; b] {x ∈ R : a < x ≤ b}
a b
]a; +∞[ {x ∈ R : x > a}
a +∞
[a; +∞[ {x ∈ R : x ≥ a}
a +∞
] − ∞; b[ {x ∈ R : x < b}
−∞ b
] − ∞; b] {x ∈ R : x ≤ b}
−∞ b
] − ∞; +∞[ R
−∞ +∞
Table 1.1: Intervals.
5 Example Let Ω = {1, 2, . . . , 20}, that is, the set of integers between 1 and 20 inclusive. A sub-
set of Ω is E = {2, 4, 6, . . . , 20}, the set of all even integers in Ω. Another subset of Ω is P =
{2, 3, 5, 7, 11, 13, 17, 19}, the set of primes in Ω. Observe that, for example, 4 ∈ E but 4 6∈ P .
6 Definition The cardinality of a set A, denoted by card (A) is the number of elements that it has. If the
set X has infinitely many elements, we write card (X) = ∞.
and hence, there are 60 + 1 = 61 elements, where we add the 1 because our count started at
284
0. Notice that every element has the form 2 + 5k. If 286 = 2 + 5k then k = , which is not an
5
integer, and hence 286 is not in this set.
◭
One of our main preoccupations will be to obtain the cardinality of a set. If the set is finite, then, in
theory, we could list all of its elements and count them. But a quick realisation shews that this is
not so easy if the number of elements is large. For example, if the set has a million elements, say,
we would be quite discouraged to write all of its elements down. (I usually get tired after writing ten
elements!) Most of the next chapter will be spent on counting finite but large sets. If the set is infinite
we, of course, could not list all of the elements down. Infinite sets are trickier for another reason. The
infinite sets that we will see in this course can be classified into one of two types: countably infinite and
uncountably infinite.
Roughly speaking a countably infinite set is one where we can list all its elements, that is, that it has
as many elements as the natural numbers. For example, the set of even numbers and the set positive
multiples of 3 are countably infinite, as evinced by the following array
0 1 2 3 4 5 6 7 ...
0 2 4 6 8 10 12 14 ...
0 3 6 9 12 15 18 21 ...
We have now arrived at what is called Galileo’s Paradox: a proper subset (in this case, the even numbers
or the multiples of 3) has as many elements as its parent set (in this case the natural numbers). That
this is impossible to do for finite sets is somewhat obvious—but still, requires proof, which we will not
include here—and hence “Galileo’s Paradox” is a defining feature of infinite sets. It can be proved—but
we will not do it here—that the integers Z, and the rational numbers Q are also countably infinite. We
denote this smallest infinity of the natural numbers by the symbol ℵ0 .
Uncountably infinite sets are somewhat larger or denser than countably infinite sets. That is,
their “type of infinity” is larger than the “type of infinity” of the natural numbers. This is somewhat
difficult to prove, and it was only in the XIX-th century, thanks to the work of George Cantor, that
these concepts were discovered. We content ourselves with mentioning here that any non-degenerate
interval, for example {x ∈ R : 0 ≤ x ≤ 1} is uncountably infinite, and that the set of real numbers R is
uncountably infinite. Hence, in a sense, there are as many numbers between 0 and 1 as there are real
numbers! We denote this larger infinity of the real numbers by the symbol c.
9 Definition The set of all subsets of a set A is the power set of A, denoted by 2A . In symbols
2A = {X : X ⊆ A}.3
S1 = ∅ S4 = {c} S7 = {c, a}
S2 = {a} S5 = {a, b}
S3 = {b} S6 = {b, c} S8 = {a, b, c}
◮Solution: The idea is the following. We use the result of example 10. Now, a subset of
{a, b, c, d} either contains d or it does not. This means that {a, b, c, d} will have 2 × 8 = 16
subsets. Since the subsets of {a, b, c} do not contain d, we simply list all the subsets of {a, b, c}
and then to each one of them we add d. This gives
Reasoning inductively, as in the last two examples, we obtain the following theorem.
12 Theorem If card (A) = n < ∞, then card 2A = 2n .
Proof: We use induction. Clearly a set A with n = 1 elements has 21 = 2 subsets: ∅ and A
itself. Assume every set with n − 1 elements has 2n−1 subsets. Let B be a set with n elements.
If x ∈ B then B \ {x} is a set with n − 1 elements and so by the induction hypothesis it has
2n−1 subsets. For each subset S ⊆ B \ {x} we form the new subset S ∪ {x}. This is a subset
of B. There are 2n−1 such new subsets, and so B has a total of 2n−1 + 2n−1 = 2n subsets. A
different proof will be given in Theorem 55.❑
Homework
Problem 1.1.1 Given the set A = {a, b}, find 2A and Problem 1.1.4 How many subsets does the set ∅ have?
card 2A . How many subsets does a set with 10 elements have?
Problem 1.1.3 List all the elements of the set Problem 1.1.6 Consider the set
2
A = {x ∈ Z : x < 6},
that is, the set of all integers whose squares are strictly {1, 7, 13, . . . , 397},
less than 6. Is the set A the same as the set
B = {t ∈ Z : t2 < 9}? where the elements are in arithmetic progression. How
many elements does it have? Is 295 in this set? What is
the sum of the elements of this set?
15 Definition A set Ω 6= ∅ is called a sample space or outcome space. The elements of the sample space
are called outcomes. A subset A ⊆ Ω is called an event. In particular, ∅ ⊆ Ω is called the null or
impossible event.
16 Example If the experiment is flipping a fair coin and recording whether heads H or tails T is ob-
tained, then the sample space is
17 Example If the experiment is rolling a fair die once and observing how many dots are displayed,
1 , 2 , 3 , 4, 5, 6
then the sample space is the set
( )
Ω=
.
2 ,4 ,6
The event E of observing an even number of dots is
( )
E=
1,3,5
and the event O of observing an odd number of dots is
( )
O=
.
2, 3, 5
The event P of observing a prime number score is
( )
P =
.
18 Example If the experiment consists of measuring the time until the bus comes, then the sample
space is [0; +∞[, that is the time could be any positive real number. If we allow for the possibility that
the bus will never shew up (say, we are in a dungeon, where there is no bus service), then a more
precise sample space would be [0; +∞[∪{+∞}.
19 Example An experiment consists of drawing one card from a standard (52-card) deck and recording
the card. The sample space is the set of 52 cards
20 Example If the experiment consists of tossing two (distinguishable) dice (say one red, one blue), then
the sample space consists of the 36 ordered pairs:
1 2 3 4 5 6
1 11 21 31 41 51 61
2 12 22 32 42 52 62
3 13 23 33 43 53 63
4 14 24 34 44 54 64
5 15 25 35 45 55 65
6 16 26 36 46 56 66
Here we record first the number on the red die and then the number on the blue die in the ordered
pair (R, B). The event S of obtaining a sum of 7 is the set of ordered pairs
S = {(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)}.
Homework
Problem 1.2.1 An experiment consists of flipping a fair Problem 1.2.4 A small bookshelf has room for four
coin twice and recording each flip. Determine its sample books: two different Spanish books, an Italian book and
space. a German book. Define a sample space for the number of
ways of arranging the books in a row in this bookshelf.
Problem 1.2.2 In the experiment of tossing two distin- Also, describe the event E that the Spanish novels remain
guishable dice in example 20, determine the event X of together.
getting a product of 6, the event T of getting a sum smaller
than 5, and the event U of getting a product which is a Problem 1.2.5 A purse has two quarters, three nickels,
multiple of 7. one dime and four pennies. Two coins are drawn one by
one, at random and without replacement. Define a sam-
Problem 1.2.3 An urn has two blue and three red mar- ple space for the following experiments:
bles. Three marbles are drawn one by one—without 1. Drawing 26¢,
replacement—and their colour noted. Define a sample
space for this experiment. 2. Drawing 29¢,
3. Drawing at least 10¢ but at most 24¢.
A ∪ B = {x : x ∈ A or x ∈ B}.
Observe that this “or” is inclusive, that is, it allows the possibility of x being in A, or B, or possibly
both A and B.
The intersection of two events A and B, is
A ∩ B = {x : x ∈ A and x ∈ B}.
A \ B = {x : x ∈ A and x 6∈ B}.
Figures 1.1 through 1.3 represent these concepts pictorially, through the use of Venn Diagrams.
Observe that Ac is all that which is outside A. The complement Ac represents the event that A does
not occur. We represent Ac pictorially as in figure 1.4.
Ac
A
A B A B A B
24 Example Let Ω = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} be the universal set of the decimal digits and let A =
{0, 2, 4, 6, 8} ⊆ Ω be the set of even digits. Then Ac = {1, 3, 5, 7, 9} is the set of odd digits.
Observe that
(Ac ) ∩ A = ∅. (1.2)
The following equalities are known as the De Morgan Laws, and their truth can easily be illustrated via
Venn Diagrams.
(A ∪ B)c = Ac ∩ B c , (1.3)
(A ∩ B)c = Ac ∪ B c . (1.4)
The various intersecting regions for two and three sets can be seen in figures 1.5 and 1.6.
In the following problem we will use the notation TxU to denote the floor of x, which is x if x ∈ Z is
an integer, or the integer just left of x if x 6∈ Z. For example, T4U = 4, T4.1U = 4, T4.7U = 4, T−πU = −4.
A ∩ Bc ∩ C Ac ∩ B ∩ C
8 Chapter 1
A∩B A∩B ∩C
A ∩ Bc A ∩ Bc ∩ C c
Ac ∩ B Ac ∩ B ∩ C c
A ∩ B ∩ Cc
A B A B
◮Solution: The progression in A has common difference 5 and the one in B has common
difference 6. Observe that the smallest element they share is 7, and hence, they will share
every lcm[5, 6] = 30 elements, starting with 7. We now want the largest k so that
7 + 30k ≤ 302,
where we have chosen 302 since it is the minimum of 302 and 397. Solving,
302 − 7
k≤T U = 9.
7
Hence there are 9 + 1 = 10 elements in the intersection. They are
A ∩ B = {7, 37, 67, 97, 127, 157, 187, 217, 247, 277}.
➊ The event that only A happens is A ∩ B c ∩ C c . where the equality comes from the De Morgan’s
➋ The event that only A and C happen, but not B is Laws.
A ∩ B c ∩ C.
➏ The event that exactly two of A, B, C occur is
➌ The event that all three happen is A ∩ B ∩ C.
➍ The event that at least one of the three events oc- (A ∩ B ∩ C c ) ∪ (A ∩ B c ∩ C) ∪ (Ac ∩ B ∩ C).
curs is A ∪ B ∪ C.
➎ The event that none of the events occurs is
➐ The event that no more than two of A, B, C occur
(A ∪ B ∪ C)c = Ac ∩ B c ∩ C c , is (A ∩ B ∩ C)c .
Homework
Problem 1.3.1 In how many ways can {1, 2, 3} be writ- Problem 1.3.4 What is a simpler name for (A∪B c )∩B?
ten as the union of two or more non-empty and disjoint
subsets?
Problem 1.3.5 Write (A∪B) as the union of two disjoint
sets.
Problem 1.3.2 What is a simpler name for (Ac )c ?
Problem 1.3.6 Write (A ∪ B) as the union of three dis-
Problem 1.3.3 What is a simpler name for (A ∪ B) ∩ B? joint sets.
Problem 1.3.8 Let A, B be events of some sample space Problem 1.3.11 Consider the two sets
Ω. If A ∩ B = ∅, what is (Ac ∪ B c )c ?
A = {3, 13, 23, . . . , 456}, B = {1, 13, . . . , 361},
Problem 1.3.9 Let A, B, C be events of some sample whose elements are in arithmetic progression. Find
space Ω. Write in symbols A ∩ B.
➊ the event that at least two of the three events oc-
curs.
Problem 1.3.12 Let A, B be events of the same sample
➋ the event that at most one of the three events oc- space Ω. What conclusion can you reach if A ∪ B = A?
curs.
Y = {2, 4, 6, 8, 10, 12, 14, 16}, Problem 1.3.14 Let A, B, C be events of the same sam-
ple space Ω. What conclusion can you reach if
Z = {2, 3, 5, 7, 11, 13, 17},
➊ Determine X \ Z. A ∪ B ∪ C = A?
1.4 Functions
28 Definition By a function f : Dom (f ) → Target (f ) we mean the collection of the following ingredi-
ents:
➋ a set of inputs called the domain of the function. The domain of f is denoted by Dom (f ).
➌ an input parameter , also called independent variable or dummy variable. We usually denote a
typical input by the letter x.
➍ a set of possible outputs of the function, called the target set of the function. The target set of f is
denoted by Target (f ).
➎ an assignment rule or formula, assigning to every input a unique output. This assignment rule
for f is usually denoted by x 7→ f (x). The output of x under f is also referred to as the image of
x under f , and is denoted by f (x).
rule image b
b b b
b b
target set
b b
domain
The notation4
Dom (f ) → Target (f )
f :
x 7→ f (x)
read “the function f , with domain Dom (f ), target set Target (f ), and assignment rule f mapping x to
f (x)” conveys all the above ingredients. See figure 1.7.
29 Definition The image Im (f ) of a function f is its set of actual outputs. In other words,
Im (f ) = {f (a) : a ∈ Dom (f )}.
Observe that we always have Im (f ) ⊆ Target (f ).
30 Example Find all functions with domain {a, b} and target set {c, d}.
2 4 0 4
1 2 1
3 8 3 8
16
It must be emphasised that the uniqueness of the image of an element of the domain is crucial.
For example, the diagram in figure 1.8 does not represent a function. The element 1 in the domain is
assigned to more than one element of the target set. Also important in the definition of a function is
the fact that all the elements of the domain must be operated on. For example, the diagram in 1.9 does
not represent a function. The element 3 in the domain is not assigned to any element of the target set.
31 Example Consider the sets A = {1, 2, 3}, B = {1, 4, 9}, and the rule f given by f (x) = x2 , which
means that f takes an input and squares it. Figures 1.10 through 1.11 give three ways of representing
the function f : A → B.
32 Definition A function is injective or one-to-one whenever two different values of its domain generate
two different values in its image. A function is surjective or onto if every element of its target set is
hit, that is, the target set is the same as the image of the function. A function is bijective if it is both
injective and surjective.
4 Notice the difference in the arrows. The straight arrow −→ is used to mean that a certain set is associated with another set,
whereas the arrow 7→ (read “maps to”) is used to denote that an input becomes a certain output.
1 1
1 2 3
{1, 2, 3} → {1, 4, 9} f : 2 4
f :
3 9
1 4 9
x 7→ x2
Figure 1.10: Example 31. Figure 1.11: Example 31. Figure 1.12: Example 31.
α β γ δ
1 2 1 4 1 4 1 4
2 8 2 2 2 2 2 2
3 4 3 3
8
33 Example The function α in the diagram 1.13 is an injective function. The function represented by
the diagram 1.14, however is not injective, since β(3) = β(1) = 4, but 3 6= 1. The function γ represented
by diagram 1.15 is surjective. The function δ represented by diagram 1.16 is not surjective since 8 is
part of the target set but not of the image of the function.
34 Theorem Let f : A → B be a function, and let A and B be finite. If f is injective, then card (A) ≤
card (B). If f is surjective then card (B) ≤ card (A). If f is bijective, then card (A) = card (B).
If f were injective then f (x1 ), f (x2 ), . . . , f (xn ) are all distinct, and among the yk . Hence
n ≤ m.
If f were surjective then each yk is hit, and for each, there is an xi with f (xi ) = yk . Thus there
are at least m different images, and so n ≥ m. ❑
35 Definition A permutation is a function from a finite set to itself which reorders the elements of the
set.
Homework
Problem 1.4.1 Find all functions from {0, 1, 2} to Problem 1.4.3 List all the permutations of {1, 2} to it-
{−1, 1}. How many are injective? How many are sur- self.
jective?
Problem 1.4.4 List all the permutations of {1, 2, 3} to it-
Problem 1.4.2 Find all functions from {−1, 1} to self.
{0, 1, 2}. How many are injective? How many are sur-
jective?
2.1 Inclusion-Exclusion
In this section we investigate a tool for counting unions of events. It is known as The Principle of
Inclusion-Exclusion or Sylvester-Poincaré Principle.
Observe that card (A) + card (B) ≤ card (A ∪ B), because the sets A and B might overlap. What
the difference of the dextral and sinistral quantities to the inequalities is, is the subject of the following
theorem.
Proof: We have
A ∪ B = (A \ B) ∪ (B \ A) ∪ (A ∩ B),
and this last expression is a union of disjoint sets. Hence
But
A \ B = A \ (A ∩ B) =⇒ card (A \ B) = card (A) − card (A ∩ B) ,
B \ A = B \ (A ∩ B) =⇒ card (B \ A) = card (B) − card (A ∩ B) ,
from where we deduce the result. ❑
In the Venn diagram 2.1, we mark by R1 the number of elements which are simultaneously in both sets
(i.e., in A ∩ B), by R2 the number of elements which are in A but not in B (i.e., in A \ B), and by R3 the
number of elements which are B but not in A (i.e., in B \ A). We have R1 + R2 + R3 = card (A ∪ B),
which illustrates the theorem.
6
A B A B
R2 R1 R3 18 10 6
13
14 Chapter 2
38 Example Of 40 people, 28 smoke and 16 chew tobacco. It is also known that 10 both smoke and
chew. How many among the 40 neither smoke nor chew?
◮Solution: Let A denote the set of smokers and B the set of chewers. Then
card (A ∪ B) = card (A) + card (B) − card (A ∩ B) = 28 + 16 − 10 = 34,
meaning that there are 34 people that either smoke or chew (or possibly both). Therefore the
number of people that neither smoke nor chew is 40 − 34 = 6.
Aliter: We fill up the Venn diagram in figure 2.2 as follows. Since card (A ∩ B) = 10, we put a
10 in the intersection. Then we put a 28 − 10 = 18 in the part that A does not overlap B and a
16 − 10 = 6 in the part of B that does not overlap A. We have accounted for 10 + 18 + 6 = 34
people that are in at least one of the set. The remaining 40 − 34 = 6 are outside these sets. ◭
39 Example How many integers between 1 and 1000 inclusive, do not share a common factor with 1000,
that is, are relatively prime to 1000?
◮Solution: Observe that 1000 = 23 53 , and thus from the 1000 integers we must weed
out those that have a factor of 2 or of 5 in their prime factorisation. If A2 denotes the set of
1000
those integers divisible by 2 in the interval [1; 1000] then clearly card (A2 ) = T U = 500.
2
1000
Similarly, if A5 denotes the set of those integers divisible by 5 then card (A5 ) = T U = 200.
5
1000
Also card (A2 ∩ A5 ) = T U = 100. This means that there are card (A2 ∪ A5 ) = 500 + 200 −
10
100 = 600 integers in the interval [1; 1000] sharing at least a factor with 1000, thus there are
1000 − 600 = 400 integers in [1; 1000] that do not share a factor prime factor with 1000. ◭
We now deduce a formula for counting the number of elements of a union of three events.
R4
R6 R7
R3
A R2 R1 B
R5
40 Theorem (Three set Inclusion-Exclusion) Let A, B, C be events of the same sample space Ω. Then
Proof: Using the associativity and distributivity of unions of sets, we see that
−card (A ∩ B) − card (A ∩ C)
+card (A ∩ B ∩ C) .
This gives the Inclusion-Exclusion Formula for three sets. See also figure 2.3.
❑
☞ In the Venn diagram in figure 2.3 there are 8 disjoint regions: the 7 that form A ∪ B ∪ C
and the outside region, devoid of any element belonging to A ∪ B ∪ C.
41 Example How many integers between 1 and 600 inclusive are not divisible by neither 3, nor 5, nor
7?
◮Solution: Let Ak denote the numbers in [1; 600] which are divisible by k. Then
600
card (A3 ) = T U = 200,
3
600
card (A5 ) = T U = 120,
5
600
card (A7 ) = T U = 85,
7
600
card (A15 ) = T U = 40
15
600
card (A21 ) = T U = 28
21
600
card (A35 ) = T U = 17
35
600
card (A105 ) = T U = 5
105
By Inclusion-Exclusion there are 200 + 120 + 85 − 40 − 28 − 17 + 5 = 325 integers in [1; 600]
divisible by at least one of 3, 5, or 7. Those not divisible by these numbers are a total of
600 − 325 = 275. ◭
42 Example In a group of 30 people, 8 speak English, 12 speak Spanish and 10 speak French. It is
known that 5 speak English and Spanish, 5 Spanish and French, and 7 English and French. The
number of people speaking all three languages is 3. How many do not speak any of these languages?
◮Solution: Let A be the set of all English speakers, B the set of Spanish speakers and C the
set of French speakers in our group. We fill-up the Venn diagram in figure 2.4 successively. In
the intersection of all three we put 8. In the region common to A and B which is not filled up we
put 5−2 = 3. In the region common to A and C which is not already filled up we put 5−3 = 2. In
the region common to B and C which is not already filled up, we put 7 − 3 = 4. In the remaining
part of A we put 8 − 2 − 3 − 2 = 1, in the remaining part of B we put 12 − 4 − 3 − 2 = 3, and
in the remaining part of C we put 10 − 2 − 3 − 4 = 1. Each of the mutually disjoint regions
comprise a total of 1 + 2 + 3 + 4 + 1 + 2 + 3 = 16 persons. Those outside these three sets are
then 30 − 16 = 14. ◭
C Sports
1 u
2 4 z t
3 x
A 1 3 B Movies 20 15 Reading
2 y
43 Example A survey shews that 90% of high-schoolers in Philadelphia like at least one of the following
activities: going to the movies, playing sports, or reading. It is known that 45% like the movies, 48%
like sports, and 35% like reading. Also, it is known that 12% like both the movies and reading, 20%
like only the movies, and 15% only reading. What percent of high-schoolers like all three activities?
◮Solution: We make the Venn diagram in as in figure 2.5. From it we gather the following
system of equations
x + y + z + 20 = 45
x + z + t + u = 48
x + y + t + 15 = 35
x + y = 12
x + y + z + t + u + 15 + 20 = 90
The solution of this system is seen to be x = 5, y = 7, z = 13, t = 8, u = 22. Thus the percent
wanted is 5%. ◭
Homework
• young or old,
Problem 2.1.2 Consider the set of the first 100 positive • male or female, and
integers:
A = {1, 2, 3, . . . , 100}. • married or single.
➊ How many are divisible by 2? Of these policyholders, 3000 are young, 4600 are male,
➋ How many are divisible by 3? and 7000 are married. The policyholders can also be clas-
sified as 1320 young males, 3010 married males, and
➌ How many are divisible by 7? 1400 young married persons. Finally, 600 of the poli-
➍ How many are divisible by 6? cyholders are young married males. How many of the
➎ How many are divisible by 14? company’s policyholders are young, female, and single?
➏ How many are divisible by 21?
Problem 2.1.7 (AHSME 1988) X, Y , and Z are pair-
➐ How many are divisible by 42?
wise disjoint sets of people. The average ages of people
➑ How many are relatively prime to 42? in the sets X, Y , Z, X ∪ Y , X ∪ Y , and Y ∪ Z are given
➒ How many are divisible by 2 and 3 but not by 7? below:
➓ How many are divisible by exactly one of 2, 3 and
7? Set X Y Z X∪Y X∪Z Y ∪Z
Problem 2.1.5 How many strictly positive integers less Problem2.1.11 (AHSME 1991) For a set S, let
than or equal to 1000 are card 2S denote the number of subsets of S. If A, B, C,
are sets for which
➊ perfect squares?
➋ perfect cubes? card 2A + card 2B + card 2C = card 2A∪B∪C
and n(n + 1)
may use the formula 1 + 2 + 3 + · · · + n = .
card (A) = card (B) = 100, 2
45 Example In a group of 8 men and 9 women we can pick one man and one woman in 8 · 9 = 72 ways.
Notice that we are choosing two persons.
46 Example A red die and a blue die are tossed. In how many ways can they land?
◮Solution: From example 20 we know that there are 36 possible outcomes. This can be
confirmed he red die can land in any of 6 ways,
6 6 .
47 Example A multiple-choice test consists of 20 questions, each one with 4 choices. There are 4
ways of answering the first question, 4 ways of answering the second question, etc., hence there are
420 = 1099511627776 ways of answering the exam.
For, the leftmost integer cannot be 0 and so there are only 9 choices {1, 2, 3, 4, 5, 6, 7, 8, 9} for it,
9 .
9 10 ,
9 10 10 .
For, the leftmost integer cannot be 0 and so there are only 9 choices {1, 2, 3, 4, 5, 6, 7, 8, 9} for it,
9 .
9 10 .
Since the integer must be even, the last digit must be one of the 5 choices {0, 2, 4, 6, 8}
9 10 5 .
50 Definition A palindromic integer or palindrome is a positive integer whose decimal expansion is sym-
metric and that is not divisible by 10. In other words, one reads the same integer backwards or
forwards.1
9 .
Once the leftmost digit is chosen, the last digit must be identical to it, so we have
9 1 .
There are 10 choices for the second digit from the left
9 10 1 .
Once this digit is chosen, the second digit from the right must be identical to it, so we have only
1 choice for it,
9 10 1 1 .
Finally, there are 10 choices for the third digit from the right,
9 10 10 1 1 ,
name Camac is a palindrome. So are the phrases (if we ignore punctuation) (a) “A man, a plan, a canal, Panama!” (b) “Sit on a
potato pan!, Otis.” (c) “Able was I ere I saw Elba.” This last one is attributed to Napoleon, though it is doubtful that he knew
enough English to form it. The website http://www.palindromelist.com/ has very interesting palindromes.
◮Solution: A five digit even palindrome has the form ABCBA, where A belongs to {2, 4, 6, 8},
and B, C belong to {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Thus there are 4 choices for the first digit, 10 for
the second, and 10 for the third. Once these digits are chosen, the palindrome is completely
determined. Therefore, there are 4 × 10 × 10 = 400 even palindromes of 5 digits. ◭
◮Solution: We have 300 = 3 · 22 52 . Thus every factor of 300 is of the form 3a 2b 5c , where
0 ≤ a ≤ 1, 0 ≤ b ≤ 2, and 0 ≤ c ≤ 2. Thus there are 2 choices for a, 3 for b and 3 for c. This
gives 2 · 3 · 3 = 18 positive divisors. ◭
54 Example How many paths consisting of a sequence of horizontal and/or vertical line segments, each
segment connecting a pair of adjacent letters in figure 2.6 spell BIP OLAR?
B B
B I B B I
B I P I B B I P
B I P O P I B B I P O
B I P O L O P I B B I P O L
B I P O L A L O P I B B I P O L A
B I P O L A R A L O P I B B I P O L A R
◮Solution: Split the diagram, as in figure 2.7. Since every required path must use the R,
we count paths starting from R and reaching up to a B. Since there are six more rows that we
can travel to, and since at each stage we can go either up or left, we have 26 = 64 paths. The
other half of the figure will provide 64 more paths. Since the middle column is shared by both
halves, we have a total of 64 + 64 − 1 = 127 paths. ◭
We now prove that if a set A has n elements, then it has 2n subsets. To motivate the proof, consider
the set {a, b, c}. To each element we attach a binary code of length 3. We write 0 if a particular element
is not in the set and 1 if it is. We then have the following associations:
Thus there is a one-to-one correspondence between the subsets of a finite set of 3 elements and
binary sequences of length 3.
55 Theorem (Cardinality of the Power Set) Let A be a finite set with card (A) = n. Then A has 2n
subsets.
Proof: We attach a binary code to each element of the subset, 1 if the element is in the subset
and 0 if the element is not in the subset. The total number of subsets is the total number of
such binary codes, and there are 2n in number. ❑
56 Theorem Let A, B be finite sets with card (A) = n and card (B) = m. Then
• the number of functions from A to B is mn .
• if n ≤ m, the number of injective functions from A to B is m(m − 1)(m − 2) · · · (m − n + 1).
If n > m there are no injective functions from A to B.
Proof: Each of the n elements of A must be assigned an element of B, and hence there are
n n
{z· · · m} = m possibilities, and thus m functions.If a function from A to B is injective then
|m · m
n factors
we must have n ≤ m in view of Theorem 34. If to different inputs we must assign different
outputs then to the first element of A we may assign any of the m elements of B, to the second
any of the m − 1 remaining ones, to the third any of the m − 2 remaining ones, etc., and so we
have m(m − 1) · · · (m − n + 1) injective functions. ❑
57 Example Let A = {a, b, c} and B = {1, 2, 3, 4}. Then according to Theorem 56, there are 43 = 64
functions from A to B and of these, 4 · 3 · 2 = 24 are injective. Similarly, there are 34 = 81 functions
from B to A, and none are injective.
Homework
Problem 2.2.1 A true or false exam has ten questions. The hardware was changed and now the software ac-
How many possible answer keys are there? cepts passwords of the form
eeelll.
Problem 2.2.2 Out of nine different pairs of shoes, in
how many ways could I choose a right shoe and a left How many more passwords of the latter kind are there
shoe, which should not form a pair? than of the former kind?
Problem 2.2.3 In how many ways can the following Problem 2.2.5 A license plate is to be made according
prizes be given away to a class of twenty boys: first and to the following provision: it has four characters, the first
second Classical, first and second Mathematical, first Sci- two characters can be any letter of the English alphabet
ence, and first French? and the last two characters can be any digit. One is al-
lowed to repeat letters and digits. How many different
license plates can be made?
Problem 2.2.4 Under old hardware, a certain pro-
gramme accepted passwords of the form
Problem 2.2.6 In problem 2.2.5, how many different li-
eell cense plates can you make if (i) you may repeat letters
but not digits?, (ii) you may repeat digits but not letters?,
where (iii) you may repeat neither letters nor digits?
e ∈ {0, 2, 4, 6, 8}, l ∈ {a, b, c, d, u, v, w, x, y, z}.
Problem 2.2.7 An alphabet consists of the five conso- Problem 2.2.13 How many positive integers are there
nants {p, v, t, s, k} and the three vowels {a, e, o}. A having n ≥ 1 digits?
license plate is to be made using four letters of this al-
phabet.
Problem 2.2.14 How many n-digits integers (n ≥ 1) are
➊ How many letters does this alphabet have? there which are even?
➋ If a license plate is of the form CCV V where C
denotes a consonant and V denotes a vowel, how Problem 2.2.15 How many n-digit nonnegative integers
many possible license plates are there, assuming do not contain the digit 5?
that you may repeat both consonants and vowels?
➌ If a license plate is of the form CCV V where C Problem 2.2.16 How many n-digit numbers do not have
denotes a consonant and V denotes a vowel, how the digit 0?
many possible license plates are there, assuming
that you may repeat consonants but not vowels?
Problem 2.2.17 There are m different roads from town
➍ If a license plate is of the form CCV V where C
A to town B. In how many ways can Dwayne travel from
denotes a consonant and V denotes a vowel, how
town A to town B and back if (a) he may come back the
many possible license plates are there, assuming
way he went?, (b) he must use a different road of return?
that you may repeat vowels but not consonants?
➎ If a license plate is of the form LLLL where L de-
notes any letter of the alphabet, how many possible Problem 2.2.18 How many positive divisors does
license plates are there, assuming that you may not 28 39 52 have? What is the sum of these divisors?
repeat letters?
Problem 2.2.19 How many factors of 295 are larger
Problem 2.2.8 A man lives within reach of three boys’ than 1, 000, 000?
schools and four girls’ schools. In how many ways can
he send his three sons and two daughters to school? Problem 2.2.20 How many positive divisors does 360
have? How many are even? How many are odd? How
Problem 2.2.9 How many distinct four-letter words can many are perfect squares?
be made with the letters of the set {c, i, k, t}
➊ if the letters are not to be repeated? Problem 2.2.21 (AHSME 1988) At the end of a profes-
sional bowling tournament, the top 5 bowlers have a
➋ if the letters can be repeated?
play-off. First # 5 bowls #4. The loser receives the 5th
prize and the winner bowls # 3 in another game. The
Problem 2.2.10 How many distinct six-digit numbers loser of this game receives the 4th prize and the winner
that are multiples of 5 can be formed from the list of digits bowls # 2. The loser of this game receives the 3rd prize
{1, 2, 3, 4, 5, 6} if we allow repetition? and the winner bowls # 1. The loser of this game receives
the 2nd prize and the winner the 1st prize. In how many
orders can bowlers #1 through #5 receive the prizes?
Problem 2.2.11 Telephone numbers in Land of the Fly-
ing Camels have 7 digits, and the only digits available
are {0, 1, 2, 3, 4, 5, 7, 8}. No telephone number may be- Problem 2.2.22 The number 3 can be expressed as
gin in 0, 1 or 5. Find the number of telephone numbers a sum of one or more positive integers in four ways,
possible that meet the following criteria: namely, as 3, 1 + 2, 2 + 1, and 1 + 1 + 1. Shew that
➊ You may repeat all digits. any positive integer n can be so expressed in 2n−1 ways.
60 Example There are five Golden retrievers, six Irish setters, and eight Poodles at the pound. In how
many ways can two dogs be chosen if they are not the same kind?
◮Solution: We choose: a Golden retriever and an Irish setter or a Golden retriever and a
Poodle or an Irish setter and a Poodle.
One Golden retriever and one Irish setter can be chosen in 5 · 6 = 30 ways; one Golden retriever
and one Poodle can be chosen in 5 · 8 = 40 ways; one Irish setter and one Poodle can be chosen
in 6 · 8 = 48 ways. By the sum rule, there are 30 + 40 + 48 = 118 combinations. ◭
61 Example To write a book 1890 digits were utilised. How many pages does the book have?
◮Solution: A total of
1 · 9 + 2 · 90 = 189
digits are used to write pages 1 to 99, inclusive. We have of 1890 − 189 = 1701 digits at our
disposition which is enough for 1701/3 = 567 extra pages (starting from page 100). The book
has 99 + 567 = 666 pages. ◭
◮Solution: It is easy to see that there are 9 palindromes of 1-digit, 9 palindromes with
2-digits, 90 with 3-digits, 90 with 4-digits, 900 with 5-digits and 900 with 6-digits. The last
palindrome with 6 digits, 999999, constitutes the 9 + 9 + 90 + 90 + 900 + 900 = 1998th
palindrome. Hence, the 1997th palindrome is 998899, the 1996th palindrome is 997799, the
1995th palindrome is 996699, the 1994th is 995599, etc., until we find the 1984th palindrome
to be 985589. ◭
63 Example The integers from 1 to 1000 are written in succession. Find the sum of all the digits.
◮Solution: When writing the integers from 000 to 999 (with three digits), 3 × 1000 = 3000
digits are used. Each of the 10 digits is used an equal number of times, so each digit is used
300 times. The the sum of the digits in the interval 000 to 999 is thus
(0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)(300) = 13500.
Therefore, the sum of the digits when writing the integers from 000 to 1000 is 13500+1 = 13501.
(0, 999), (1, 998), (2, 997), (3, 996), . . . , (499, 500).
Each pair has sum of digits 27 and there are 500 such pairs. Adding 1 for the sum of digits of
1000, the required total is
27 · 500 + 1 = 13501.
◭
64 Example How many 4-digit integers can be formed with the set of digits {0, 1, 2, 3, 4, 5} such that no
digit is repeated and the resulting integer is a multiple of 3?
◮Solution: The integers desired have the form D1 D2 D3 D4 with D1 6= 0. Under the stipulated
constraints, we must have
D1 + D2 + D3 + D4 ∈ {6, 9, 12}.
Homework
Problem 2.3.1 How many different sums can be thrown Problem 2.3.6 An n×n×n wooden cube is painted blue
with two dice, the faces of each die being numbered and then cut into n3 1 × 1 × 1 cubes. How many cubes
0, 1, 3, 7, 15, 31? (a) are painted on exactly three sides, (b) are painted in
exactly two sides, (c) are painted in exactly one side, (d)
Problem 2.3.2 How many different sums can be thrown are not painted?
with three dice, the faces of each die being numbered
1, 4, 13, 40, 121, 364? Problem 2.3.7 (AIME 1993) How many even integers
between 4000 and 7000 have four different digits?
Problem 2.3.3 How many two or three letter initials for
people are available if at least one of the letters must be Problem 2.3.8 All the natural numbers, starting with 1,
a D and one allows repetitions? are listed consecutively
123456789101112131415161718192021 . . .
Problem 2.3.4 How many strictly positive integers have
Which digit occupies the 1002nd place?
all their digits distinct?
Problem 2.3.10 All the positive integers with initial digit Problem 2.3.21 Let S be the set of all natural numbers
2 are written in succession: whose digits are chosen from the set {1, 3, 5, 7} such that
no digits are repeated. Find the sum of the elements of S.
2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 200, 201, . . . ,
Find the 1978-th digit written.
Problem 2.3.22 Find the number of ways to choose a
pair {a, b} of distinct numbers from the set {1, 2, . . . , 50}
Problem 2.3.11 (AHSME 1998) Call a 7-digit telephone such that
number d1 d2 d3 − d4 d5 d6 d7 memorable if the prefix se-
quence d1 d2 d3 is exactly the same as either of the se- ➊ |a − b| = 5
quences d4 d5 d6 or d5 d6 d7 or possibly both. Assum- ➋ |a − b| ≤ 5.
ing that each di can be any of the ten decimal digits
0, 1, 2, . . . , 9, find the number of different memorable tele-
Problem 2.3.23 (AIME 1994) Given a positive integer
phone numbers.
n, let p(n) be the product of the non-zero digits of n. (If n
has only one digit, then p(n) is equal to that digit.) Let
Problem 2.3.12 Three-digit numbers are made using
the digits {1, 3, 7, 8, 9}. S = p(1) + p(2) + · · · + p(999).
➊ How many of these integers are there?
Find S.
➋ How many are even?
➌ How many are palindromes?
Problem 2.3.24 n equally spaced points 1, 2, . . . , n are
➍ How many are divisible by 3? marked on a circumference. If 15 directly opposite to 49,
how many points are there total?
Problem 2.3.13 (AHSME 1989) Five people are sitting
at a round table. Let f ≥ 0 be the number of people sit- Problem 2.3.25 An urn has 900 chips, numbered 100
ting next to at least one female, and let m ≥ 0 be the through 999. Chips are drawn at random and without
number of people sitting next to at least one male. Find replacement from the urn, and the sum of their digits is
the number of possible ordered pairs (f, m). noted. What is the smallest number of chips that must be
drawn in order to guarantee that at least three of these
Problem 2.3.14 How many integers less than 10000 digital sums be equal?
can be made with the eight digits 0, 1, 2, 3, 4, 5, 6, 7?
Problem 2.3.26 Little Dwayne has 100 cards where the
Problem 2.3.15 (ARML 1999) In how many ways can integers from 1 through 100 are written. He also has an
one arrange the numbers 21, 31, 41, 51, 61, 71, and 81 unlimited supply of cards with the signs + and =. How
such that the sum of every four consecutive numbers is many true equalities can he make, if he uses each card
divisible by 3? no more than once?
Problem 2.3.16 The sequence of palindromes is written Problem 2.3.27 (AIME 1993) How many ordered four-
in increasing order tuples of integers (a, b, c, d) with
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, . . . . 0 < a < b < c < d < 500
Thus 11 occupies the tenth position, 22 the eleventh, etc.
Which position is occupied by 1003001? satisfy satisfy a + d = b + c and bc − ad = 93?
Problem 2.3.17 When writing all the integers from 1 to Problem 2.3.28 A is a set of one hundred distinct natu-
2007, inclusive, how many 0’s are used? ral numbers such that any triplet a, b, c of A (repetitions
are allowed in a triplet) gives a non-obtuse triangle whose
sides measure a, b, and c. Let S(A ) be the sum of the
Problem 2.3.18 How many pairs of integers (x, y) are perimeters obtained by adding all the triplets in A . Find
there for which x2 − y 2 = 81? the smallest value of S(A ). Note: we count repetitions in
the sum S(A ), thus all permutations of a triplet (a, b, c)
Problem 2.3.19 A die consists of a cube which has a appear in S(A ).
different color on each of 6 faces. How many distinguish-
ably different kinds of dice can be made? Problem 2.3.29 Prove that the sum of the digits appear-
ing in the integers
Problem 2.3.20 Each of the six faces of a cube is
painted in a different color. The cube has now a fixed color 1, 2, 3, . . . , |99 {z
. . . 9}
scheme. A die can be formed by painting the numbers n 9′ s
{1, 2, 3, 4, 5, 6} in such a way that the opposing faces
9n10n
add up to 7. How many different dice can be formed? is .
2
Problem 2.3.30 (The Locker-room Problem) A locker factor into the product of two linear factors with integer
room contains n lockers, numbered 1 through n. Initially coefficients?
all doors are open. Person number 1 enters and closes
all the doors. Person number 2 enters and opens all the
Problem 2.3.32 How many triplets (a, b, c) with
doors whose numbers are multiples of 2. Person num-
a, b, c ∈ {1, 2, . . . , 101} simultaneously satisfy a < b
ber 3 enters and if a door whose number is a multiple of
and a < c?
3 is open then he closes it; otherwise he opens it. Per-
son number 4 enters and changes the status (from open
to closed and viceversa) of all doors whose numbers are Problem 2.3.33 (Putnam 1987) The sequence of digits
multiples of 4, and so forth till person number n enters
and changes the status of door number n. Which lockers 12345678910111213141516171819202122 . . .
are now closed?
is obtained by writing the positive integers in order. If
the 10n digit of this sequence occurs in the part in which
Problem 2.3.31 (AHSME 1992) For how many integers the m-digit numbers are placed, define f : N → N by
between 1 and 100 does f (n) = m. For example f (2) = 2, because the hundredth
digit enters the sequence in the placement of the two-digit
x2 + x − n integer 55. Find, with proof, f (1987).
n! = 1 · 2 · 3 · · · n.
n! is read n factorial.
66 Example We have
1! = 1,
2! = 1 · 2 = 2,
3! = 1 · 2 · 3 = 6,
4! = 1 · 2 · 3 · 4 = 24,
5! = 1 · 2 · 3 · 4 · 5 = 120.
67 Example We have
7! 7 · 6 · 5 · 4!
= = 210,
4! 4!
(n − 2)! (n − 2)! 1
= = .
(n + 1)! (n + 1)(n)(n − 1)(n − 2)! (n + 1)(n)(n − 1)
M AT H M AHT M T AH M T HA M HT A M HAT
AM T H AM HT AT M H AT HM AHT M AHM T
T AM H T AHM T M AH T M HA T HM A T HAM
HAT M HAM T HT AM HT M A HM T A HM AT
Proof: The first position can be chosen in n ways, the second object in n − 1 ways, the third
in n − 2, etc. This gives
n(n − 1)(n − 2) · · · 2 · 1 = n!.
❑
71 Example The number of permutations of the letters of the word RET ICU LA is 8! = 40320.
72 Example A bookshelf contains 5 German books, 7 Spanish books and 8 French books. Each book
is different from one another.
➊ How many different arrangements can be done of these books if all the French books must be next
these books? to each other?
➋ How many different arrangements can be done of
these books if books of each language must be ➍ How many different arrangements can be done of
next to each other? these books if no two French books must be next
➌ How many different arrangements can be done of to each other?
◮Solution:
Homework
Problem 2.4.1 How many changes can be rung with a how many rational numbers between 0 and 1 will 20! be
peal of five bells? the resulting product?
Problem 2.4.2 A bookshelf contains 3 Russian novels, Problem 2.4.6 (AMC12 2001) A spider has one sock
4 German novels, and 5 Spanish novels. In how many and one shoe for each of its eight legs. In how many dif-
ways may we align them if ferent orders can the spider put on its socks and shoes,
assuming that, on each leg, the sock must be put on be-
➊ there are no constraints as to grouping?
fore the shoe?
➋ all the Spanish novels must be together?
➌ no two Spanish novels are next to one another? Problem 2.4.7 How many trailing 0’s are there when
1000! is multiplied out?
Problem 2.4.3 How many permutations of the word
IMPURE are there? How many permutations start with P Problem 2.4.8 In how many ways can 8 people be
and end in U? How many permutations are there if the P seated in a row if
and the U must always be together in the order PU? How
➊ there are no constraints as to their seating arrange-
many permutations are there in which no two vowels (I,
ment?
U, E) are adjacent?
➋ persons X and Y must sit next to one another?
Problem 2.4.4 How many arrangements can be made ➌ there are 4 women and 4 men and no 2 men or 2
of out of the letters of the word DRAUGHT, the vowels women can sit next to each other?
never separated? ➍ there are 4 married couples and each couple must
sit together?
Problem 2.4.5 (AIME 1991) Given a rational number, ➎ there are 4 men and they must sit next to each
write it as a fraction in lowest terms and calculate the other?
product of the resulting numerator and denominator. For
M ASSACHU SET T S
be permuted?
M A1 S1 S2 A2 CHU S3 ET1 T2 S4 .
There are now 13 distinguishable objects, which can be permuted in 13! different ways by
Theorem 70. For each of these 13! permutations, A1 A2 can be permuted in 2! ways, S1 S2 S3 S4
can be permuted in 4! ways, and T1 T2 can be permuted in 2! ways. Thus the over count 13! is
corrected by the total actual count
13!
= 64864800.
2!4!2!
◭
74 Theorem Let there be k types of objects: n1 of type 1; n2 of type 2; etc. Then the number of ways
in which these n1 + n2 + · · · + nk objects can be rearranged is
(n1 + n2 + · · · + nk )!
.
n1 !n2 ! · · · nk !
75 Example In how many ways may we permute the letters of the word M ASSACHU SET T S in such
a way that M ASS is always together, in this order?
◮Solution: The particle M ASS can be considered as one block and the 9 letters A, C, H,
U, S, E, T, T, S. In A, C, H, U, S, E, T, T, S there are four S’s and two T ’s and so the total
number of permutations sought is
10!
= 907200.
2!2!
◭
76 Example In how many ways may we write the number 9 as the sum of three strictly positive integer
summands? Here order counts, so, for example, 1 + 7 + 1 is to be regarded different from 7 + 1 + 1.
a + b + c = 9, 1≤a≤b≤c≤7
(1, 3, 5) 3! = 6
3!
(1, 4, 4) =3
2!
3!
(2, 2, 5) =3
2!
(2, 3, 4) 3! = 6
3!
(3, 3, 3) =1
3!
Thus the number desired is
3 + 6 + 6 + 3 + 3 + 6 + 1 = 28.
77 Example In how many ways can the letters of the word MURMUR be arranged without letting two
letters which are alike come together?
M U R R ,
M U R R ,
M U R R .
In the first case there are 2! = 2 of putting the remaining M and U, in the second there are 2! = 2
and in the third there is only 1!. Thus starting the word with MU gives 2 + 2 + 1 = 5 possible
arrangements. In the general case, we can choose the first letter of the word in 3 ways, and
the second in 2 ways. Thus the number of ways sought is 3 · 2 · 5 = 30. ◭
78 Example In how many ways can the letters of the word AFFECTION be arranged, keeping the vowels
in their natural order and not letting the two F’s come together?
9!
◮Solution: There are ways of permuting the letters of AFFECTION. The 4 vowels can be
2!
permuted in 4! ways, and in only one of these will they be in their natural order. Thus there
9!
are ways of permuting the letters of AFFECTION in which their vowels keep their natural
2!4!
order.
Now, put the 7 letters of AFFECTION which are not the two F’s. This creates 8 spaces in
between them where we put the two F’s. This means that there are 8 · 7! permutations of AF-
8 · 7!
FECTION that keep the two F’s together. Hence there are permutations of AFFECTION
4!
where the vowels occur in their natural order.
79 Example How many arrangements of five letters can be made of the letters of the word PALLMALL?
➊ there are four L’s and a different letter. The different letter can be chosen in 3 ways, so
3 · 5!
there are = 15 permutations in this case.
4!
5!
➋ there are three L’s and two A’s. There are = 10 permutations in this case.
3!2!
➌ there are three L’s and two different letters. The different letters can be chosen in 3 ways (
3 · 5!
either P and A; or P and M; or A and M), so there are = 60 permutations in this case.
3!
➍ there are two L’s, two A’s and a different letter from these two. The different letter can be
2 · 5!
chosen in 2 ways. There are = 60 permutations in this case.
2!2!
➎ there are two L’s and three different letters. The different letters can be chosen in 1 way.
1 · 5!
There are = 60 permutations in this case.
2!
➏ there is one L. This forces having two A’s and two other different letters. The different
1 · 5!
letters can be chosen in 1 way. There are = 60 permutations in this case.
2!
The total number of permutations is thus seen to be
15 + 10 + 60 + 60 + 60 + 60 = 265.
Homework
Problem 2.5.1 In how many ways may one permute the Problem 2.5.5 An urn has 2 white marbles, 3 red mar-
letters of the word MEPHISTOPHELES? bles, and 5 blue marbles. Marbles are drawn one by one
and without replacement. Urns of each colour are indis-
tinguishable.
Problem 2.5.2 How many arrangements of four letters
can be made out of the letters of KAFFEEKANNE with- 1. In how many ways may one draw the marbles out
out letting the three E’s come together? of the urn?
2. In how many ways may one draw the marbles out
Problem 2.5.3 How many numbers can be formed with of the urn if the second, fourth, sixth, eighth and
the digits tenth marbles are blue?
1, 2, 3, 4, 3, 2, 1 3. In how many instances will all red marbles come
so that the odd digits occupy the odd places? before any of the blue marbles?
Problem 2.5.4 The password of the anti-theft device of Problem 2.5.6 In this problem you will determine how
a car is a four digit number, where one can use any digit many different signals, each consisting of 10 flags hung
in the set in a line, can be made from a set of 4 white flags, 3 red
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. flags, 2 blue flags, and 1 orange flag, if flags of the same
colour are identical.
A. ➊ How many such passwords are possible?
➊ How many are there if there are no constraints on
➋ How many of the passwords have all their dig-
the order?
its distinct?
➋ How many are there if the orange flag must always
B. After an electrical failure, the owner must reintro-
be first?
duce the password in order to deactivate the anti-
theft device. He knows that the four digits of the ➌ How many are there if there must be a white flag at
code are 2, 0, 0, 3 but does not recall the order. the beginning and another white flag at the end?
➊ How many such passwords are possible using
only these digits? Problem 2.5.7 In how many ways may we write the
number 10 as the sum of three positive integer sum-
➋ If the first attempt at the password fails, the
mands? Here order counts, so, for example, 1 + 8 + 1
owner must wait two minutes before a second
is to be regarded different from 8 + 1 + 1.
attempt, if the second attempt fails he must
wait four minutes before a third attempt, if the
third attempt fails he must wait eight minutes Problem 2.5.8 Three distinguishable dice are thrown. In
before a fourth attempt, etc. (the time doubles how many ways can they land and give a sum of 9?
from one attempt to the next). How many pass-
words can the owner attempt in a period of 24
Problem 2.5.9 In how many ways can 15 different re-
hours?
cruits be divided into three equal groups? In how many
ways can they be drafted into three different regiments?
☞ Observe that in the last fraction, there are k factors in both the numerator and denominator.
Also, observe the boundary conditions
n n n n
= = 1, = = n.
0 n 1 n−1
81 Example We have
6 6·5·4
= = 20,
3 1·2·3
11 11 · 10
= = 55,
2 1·2
12 12 · 11 · 10 · 9 · 8 · 7 · 6
= = 792,
7 1·2·3·4·5·6·7
110
= 110,
109
110
= 1.
0
This can be interpreted as follows: if there are n different tickets in a hat, choosing k of them
out of the hat is the same as choosing n − k of them to remain in the hat.
82 Example
11 11
= = 55,
9 2
12 12
= = 792.
5 7
XY Z, XY W, XZW, Y W Z.
Proof: Pick any of the k objects. They can be ordered in n(n − 1)(n − 2) · · · (n − k + 1), since
there are n ways of choosing the first, n − 1 ways of choosing the second, etc. This particular
choice of k objects can be permuted in k! ways. Hence the total number of k-combinations is
n(n − 1)(n − 2) · · · (n − k + 1) n
= .
k! k
❑
10
87 Example From a group of 10 people, we may choose a committee of 4 in = 210 ways.
4
88 Example In a group of 2 camels, 3 goats, and 10 sheep in how many ways may one choose 6 animals
if
◮Solution:
without a 9
B B
b
O 9550
14266 14266
14406
A A 9550 9550
14266
without a 7 without an 8
Figure 2.8: Example 89. Figure 2.9: Example 90. Figure 2.10: Example 91.
89 Example To count the number of shortest routes from A to B in figure 2.8 observe that any shortest
path must consist of 6 horizontal moves and 3 vertical ones for a total of 6 + 3 = 9 moves. Of these
moves
9 once we choose the 6 horizontal ones the 3 vertical ones are determined. Thus there are
9
= 84 paths.
6
91 Example Consider the set of 5-digit positive integers written in decimal notation.
1. How many are there? 7. How many have exactly four 9’s?
2. How many do not have a 9 in their decimal repre- 8. How many have exactly five 9’s?
sentation?
9. How many have neither an 8 nor a 9 in their deci-
3. How many have at least one 9 in their decimal rep- mal representation?
resentation?
10. How many have neither a 7, nor an 8, nor a 9 in
4. How many have exactly one 9? their decimal representation?
5. How many have exactly two 9’s? 11. How many have either a 7, an 8, or a 9 in their
6. How many have exactly three 9’s? decimal representation?
◮Solution:
1. There are 9 possible choices for the first digit 6. Again we condition on the first digit. If the first
and 10 possible choices for the remaining dig- digit is a 9 then two of the remaining four must
its. The number of choices is thus 9 · 104 = be 9’s, and the ! choice of place can be accom-
90000. 4
plished in = 6 ways. The other two re-
2. There are 8 possible choices for the first digit 2
and 9 possible choices for the remaining digits. maining digits must be different from 9, giving
The number of choices is thus 8 · 94 = 52488. 6 · 92 = 486 such numbers. If the first digit is
3. The difference 90000 − 52488 = 37512. not a 9, then there are 8! choices for this first
4. We condition on the first digit. If the first digit 4
digit. Also, we have = 4 ways of choos-
is a 9 then the other four remaining digits must 3
be different from 9, giving 94 = 6561 such ing where the three 9’s will be, and we have
numbers. If the first digit is not a 9, then there 9 ways of filling the remaining spot. Thus in
are!8 choices for this first digit. Also, we have this case there are 8· 4· 9 = 288 such numbers.
4 Altogether there are 486 + 288 = 774 five-digit
= 4 ways of choosing where the 9 will positive integers with exactly three 9’s in their
1
decimal representation.
be, and we have 93 ways of filling the 3 re-
maining spots. Thus in this case there are 7. If the first digit is a 9 then three of the remain-
8 · 4 · 93 = 23328 such numbers. In total there ing four must be 9’s, and the ! choice of place
are 6561+23328 = 29889 five-digit positive in- 4
can be accomplished in = 4 ways. The
tegers with exactly one 9 in their decimal rep- 3
resentation. other remaining digit must be different from 9,
5. We condition on the first digit. If the first digit giving 4 · 9 = 36 such numbers. If the first
is a 9 then one of the remaining four must be digit is not a 9, then there are 8!choices for
a 9, and the !choice of place can be accom- 4
this first digit. Also, we have = 4 ways
4 4
plished in = 4 ways. The other three re-
1 of choosing where the four 9’s will be, thus fill-
maining digits must be different from 9, giving ing all the spots. Thus in this case there are
4 · 93 = 2916 such numbers. If the first digit is 8 · 1 = 8 such numbers. Altogether there are
not a 9, then there are 8! choices for this first 36 + 8 = 44 five-digit positive integers with ex-
4 actly three 9’s in their decimal representation.
digit. Also, we have = 6 ways of choos-
2 8. There is obviously only 1 such positive integer.
ing where the two 9’s will be, and we have 9
ways of filling the two remaining spots. Thus
2
☞ Observe that 37512 = 29889 +
6804 + 774 + 44 + 1.
in this case there are 8·6·92 = 3888 such num-
bers. Altogether there are 2916 + 3888 = 6804 9. We have 7 choices for the first digit and 8
five-digit positive integers with exactly two 9’s choices for the remaining 4 digits, giving 7·84 =
in their decimal representation. 28672 such integers.
10. We have 6 choices for the first digit and 7 11. We use inclusion-exclusion. From figure 2.10,
choices for the remaining 4 digits, giving 6·74 = the numbers inside the circles add up to
14406 such integers. 85854. Thus the desired number is 90000 −
85854 = 4146.
◮Solution: The trick here is that we know how to count the number of functions from one
finite set to the other (Theorem 56). What we do is over count the number of functions, and
then sieve out those which are not surjective by meansofInclusion-Exclusion. By Theorem 56,
3 4
there are 34 = 81 functions from A to B. There are 2 = 48 functions from A to B that
1
3 4
miss one element from B. There are 1 = 3 functions from A to B that miss two elements
2
3 4
from B. There are 0 = 0 functions from A to B that miss three elements from B. By
0
Inclusion-Exclusion there are
81 − 48 + 3 = 36
surjective functions from A to B. ◭
In analogy to example 92, we may prove the following theorem, which complements Theorem 56 by
finding the number of surjections from one set to another set.
93 Theorem Let A and B be two finite sets with card (A) = n and card (B) = m. If n < m then
there are no surjections from A to B. If n ≥ m then the number of surjective functions from A to
B is
n m n m n m n m−1 m
m − (m − 1) + (m − 2) − (m − 3) + · · · + (−1) (1)n .
1 2 3 m−1
Homework
! ! !
Problem 2.6.1 Verify the following. 6 6 6
➎ + + = 25
! 1 3 5
20 ! ! ! !
➊ = 1140 7 7 7 7
3 ➏ + + = 26 −
0 2 4 6
! !
12 12
➋ = 457380 Problem 2.6.2 A publisher proposes to issue a set of dic-
4 6
tionaries to translate from any one language to any other.
! If he confines his system to seven languages, how many
n
dictionaries must be published?
1
➌ ! =1
n Problem 2.6.3 From a group of 12 people—7 of which
n−1 are men and 5 women—in how many ways may choose
! a committee of 4 with 1 man and 3 women?
n n(n − 1)
➍ =
2 2
Problem 2.6.4 N friends meet and shake hands with Problem 2.6.16 (AHSME 1990) How many of the num-
one another. How many handshakes? bers
100, 101, . . . , 999,
Problem 2.6.5 How many 4-letter words can be made have three different digits in increasing order or in de-
by taking 4 letters of the word RETICULA and permuting creasing order?
them?
Problem 2.6.17 There are twenty students in a class. In
Problem 2.6.6 (AHSME 1989) Mr. and Mrs. Zeta want how many ways can the twenty students take five differ-
to name baby Zeta so that its monogram (first, middle ent tests if four of the students are to take each test?
and last initials) will be in alphabetical order with no let-
ters repeated. How many such monograms are possible? Problem 2.6.18 In how many ways can a deck of play-
ing cards be arranged if no two hearts are adjacent?
Problem 2.6.7 In how many ways can {1, 2, 3, 4} be
written as the union of two non-empty, disjoint subsets?
Problem 2.6.19 Given a positive integer n, find the
number of quadruples (a, b, c, d, ) such that
Problem 2.6.8 How many lists of 3 elements taken from
the set {1, 2, 3, 4, 5, 6} list the elements in increasing or- 0 ≤ a ≤ b ≤ c ≤ d ≤ n.
der?
Problem 2.6.20 There are T books on Theology, L
Problem 2.6.9 How many times is the digit 3 listed in books on Law and W books on Witchcraft on Dr. Faustus’
the numbers 1 to 1000? shelf. In how many ways may one order the books
➊ there are no constraints in their order?
Problem 2.6.10 How many subsets of the set ➋ all books of a subject must be together?
{a, b, c, d, e} have exactly 3 elements? ➌ no two books on Witchcraft are juxtaposed?
➍ all the books on Witchcraft must be together?
Problem 2.6.11 How many subsets of the set
{a, b, c, d, e} have an odd number of elements?
Problem 2.6.21 From a group of 20 students, in how
many ways may a professor choose at least one in or-
Problem 2.6.12 (AHSME 1994) Nine chairs in a row der to work on a project?
are to be occupied by six students and Professors Al-
pha, Beta and Gamma. These three professors arrive
Problem 2.6.22 From a group of 20 students, in how
before the six students and decide to choose their chairs
many ways may a professor choose an even number
so that each professor will be between two students. In
how many ways can Professors Alpha, Beta and Gamma number of them, but at least four in order to work on a
project?
choose their chairs?
Problem 2.6.13 There are E (different) English novels, Problem 2.6.23 How many permutations of the word
F (different) French novels, S (different) Spanish novels, CHICHICUILOTE
and I (different) Italian novels on a shelf. How many dif-
ferent permutations are there if are there
➊ if there are no restrictions? ➊ if there are no restrictions?
➋ if all books of the same language must be together? ➋ if the word must start in an I and end also in an I?
➌ if all the Spanish novels must be together? ➌ if the word must start in an I and end in a C?
➍ if no two Spanish novels are adjacent?
➎ if all the Spanish novels must be together, and all ➍ if the two H’s are adjacent?
the English novels must be together, but no Spanish
novel is next to an English novel? ➎ if the two H’s are not adjacent?
Problem 2.6.14 How many committees of seven with a ➏ if the particle LOTE must appear, with the letters in
given chairman can be selected from twenty people? this order?
Problem 2.6.15 How many committees of seven with a Problem 2.6.24 There are M men and W women in a
given chairman and a given secretary can be selected group. A committee of C people will be chosen. In how
from twenty people? Assume the chairman and the sec- many ways may one do this if
retary are different persons.
➊ there are no constraints on the sex of the committee
members?
➋ there must be exactly T women? each write five chapters, the second must write four chap-
➌ A committee must always include George and Bar- ters, and the fourth must write three chapters. How
bara? many ways can the book be divided between the au-
thors? What if the first and third had to write ten chapters
➍ A committee must always exclude George and Bar- combined, but it did not matter which of them wrote how
bara? many (i.e. the first could write ten and the third none, the
Assume George and Barbara form part of the original set first could write none and the third one, etc.)?
of people.
Problem 2.6.34 In how many ways can a woman
Problem 2.6.25 There are M men and W women in a choose three lovers or more from seven eligible suitors?
group. A committee of C people will be chosen. In how
many ways may one do this if George and Barbara are Problem 2.6.35 (AIME 1988) One commercially avail-
feuding and will not work together in a committee? As- able ten-button lock may be opened by depressing—in
sume George and Barbara form part of the original set of any order—the correct five buttons. Suppose that these
people. locks are redesigned so that sets of as many as nine but-
tons or as few as one button could serve as combinations.
Problem 2.6.26 Out of 30 consecutive integers, in how How many additional combinations would this allow?
many ways can three be selected so that their sum be
even? Problem 2.6.36 From a set of n ≥ 3 points on the plane,
no three collinear,
Problem 2.6.27 In how many ways may we choose ➊ how many straight lines are determined?
three distinct integers from {1, 2, . . . , 100} so that one of ➋ how many straight lines pass through a particular
them is the average of the other two? point?
➌ how many triangles are determined?
Problem 2.6.28 How many vectors (a1 , a2 , . . . , ak ) ➍ how many triangles have a particular point as a
with integral vertex?
ai ∈ {1, 2, . . . , n}
are there satisfying Problem 2.6.37 In how many ways can you pack
twelve books into four parcels if one parcel has one book,
1 ≤ a1 ≤ a2 ≤ · · · ≤ ak ≤ n? another has five books, and another has two books, and
another has four books?
Problem 2.6.29 A square chessboard has 16 squares (4
rows and 4 columns). One puts 4 checkers in such a way Problem 2.6.38 In how many ways can a person invite
that only one checker can be put in a square. Determine three of his six friends to lunch every day for twenty
the number of ways of putting these checkers if days if he has the option of inviting the same or differ-
ent friends from previous days?
➊ there must be exactly one checker per row and col-
umn.
Problem 2.6.39 A committee is to be chosen from a set
➋ there must be exactly one column without a checker.
of nine women and five men. How many ways are there
➌ there must be at least one column without a checker. to form the committee if the committee has three men and
three women?
Problem 2.6.30 A box contains 4 red, 5 white, 6 blue,
and 7 magenta balls. In how many of all possible sam- Problem 2.6.40 At a dance there are b boys and g girls.
ples of size 5, chosen without replacement, will every In how many ways can they form c couples consisting of
colour be represented? different sexes?
Problem 2.6.31 In how many ways can eight students Problem 2.6.41 From three Russians, four Americans,
be divided into four indistinguishable teams of two each? and two Spaniards, how many selections of people can
be made, taking at least one of each kind?
Problem 2.6.32 How many ways can three boys share
fifteen different sized pears if the youngest gets seven Problem 2.6.42 The positive integer r satisfies
pears and the other two boys get four each?those in 1 1 11
!− ! = !.
which the digit 1 occurs or those in which it does not oc-
9 10 11
cur? 6
r r r
! !
28 24 Problem 2.6.52 If there are fifteen players on a baseball
Problem 2.6.43 If 11 = 225 , find r.
2r 2r − 4 team, how many ways can the coach choose nine play-
ers for the starting lineup if it does not matter which posi-
tion the players play (i.e., no distinction is made between
Problem 2.6.44 Compute the number of ten-digit num- player A playing shortstop, left field, or any other posi-
bers which contain only the digits 1, 2, and 3 with the tions as long as he is on the field)? How many ways are
digit 2 appearing in each number exactly twice. there if it does matter which position the players play?
94 Theorem (De Moivre) Let n be a positive integer. The number of positive integer solutions to
x1 + x2 + · · · + xr = n
is
n−1
.
r−1
Proof: Write n as
n = 1 + 1 + · · · + 1 + 1,
where there are n 1s and n − 1 +s. To decompose n in r summands we only need to choose
r − 1 pluses from the n − 1, which proves the theorem. ❑
95 Example In how many ways may we write the number 9 as the sum of three positive integer sum-
mands? Here order counts, so, for example, 1 + 7 + 1 is to be regarded different from 7 + 1 + 1.
◮Solution: Notice that this is example 76. We are seeking integral solutions to
By Theorem 94 this is
9−1 8
= = 28.
3−1 2
◭
96 Example In how many ways can 100 be written as the sum of four positive integer summands?
a + b + c + d = 100,
which by Theorem 94 is
99
= 156849.
3
◭
y1 + y2 + · · · + yr = n
is
n+r−1
.
r−1
x1 − 1 + x2 − 1 + · · · + xr − 1 = n
is equivalent to
x1 + x2 + · · · + xr = n + r,
99 Example There are five people in a lift of a building having eight floors. In how many ways can they
choose their floor for exiting the lift?
◮Solution: Let xi be the number of people that floor i receives. We are looking for non-
negative solutions of the equation
x1 + x2 + · · · + x8 = 5.
Putting yi = xi + 1, then
=⇒ y1 + y2 + · · · + y8 = 13,
100 Example Find the number of quadruples (a, b, c, d) of non-negative integers which satisfy the in-
equality
a + b + c + d ≤ 2001.
101 Example
How many integral solutions to the equation
a + b + c + d = 100,
1 ≤ a ≤ 10, b ≥ 0, c ≥ 2, 20 ≤ d ≤ 30?
80
◮Solution: We use Inclusion-Exclusion. There are = 82160 integral solutions to
3
a + b + c + d = 100, a ≥ 1, b ≥ 0, c ≥ 2, d ≥ 20.
a ≥ 11, b ≥ 0, c ≥ 2, d ≥ 20
a ≥ 1, b ≥ 0, c ≥ 2, d ≥ 31.
70 69 59
Then card (A) = , card (B) = , card (A ∩ B) = and so
3 3 3
70 69 59
card (A ∪ B) = + − = 74625.
3 3 3
Homework
Problem 2.7.1 How many positive integral solutions are Problem 2.7.4 How many integral solutions are there to
there to the equation
a + b + c = 10?
x1 + x2 + · · · + x100 = n
Problem 2.7.2 Three fair dice, one red, one white, and subject to the constraints
one blue are thrown. In how many ways can they land
x1 ≥ 1, x2 ≥ 2, x3 ≥ 3, . . . , x99 ≥ 99, x100 ≥ 100?
so that their sum be 10 ?
(x + y)(x + y) · · · (x + y)
| {z }
n times
consists of adding up all the terms obtained from multiplying either an x or a y from the first
set of parentheses times either an x or a y from the second set of parentheses etc. To get xk ,
must
x be chosen from exactly k of the sets of parentheses. Thus the number of xk terms is
n
. It follows that
k
n 0 n n n 2 n−2 n n 0
(x + y)n = x y + xy n−1 + x y + ··· + x y
0 1 2 n (2.2)
Pn n k n−k
= k=0 x y .
k
which is another proof that the number of subsets of a set with n elements is 2n , since the
dextral side counts how many subsets there are with 0, 1, 2, . . . , n elements, respectively.
104 Theorem Let n ∈ N. If A is a finite set with n elements, then the power set of A has 2n different
elements, i.e., A has 2n different subsets.
n n
Proof: A has exactly 1 = subset with 0 elements, exactly n = subsets with 1
0 1
n
elements,. . . , and exactly 1 = subset with n elements. By the Binomial Theorem,
n
n n n n
+ + + ··· + = (1 + 1)n = 2n .
0 1 2 n
❑
105 Example (AIME 1989) Ten points are marked on a circle. How many distinct convex polygons of
three or more sides can be drawn using some (or all) of the ten points as vertices? (Polygons are
distinct unless they have exactly the same vertices.)
◮Solution: Choosing k points 3 ≤ k ≤ 10 points will determine a k-sided polygon, since the
polygons are convex and thus have no folds. The answer is thus
10
X 10 10 10 10 10
=2 − − − = 1024 − 1 − 10 − 45 = 968.
k=3
k 0 1 2
11 k P11
◮Solution: By the Binomial Theorem, the complete sum k=0 2 = 311 . The required
k
11 0 11 11
sum lacks the zeroth term, 2 = 1, and the eleventh term, 2 from this complete
0 11
sum. The required sum is thus 311 − 211 − 1. ◭
(x2 + 2x)10 .
◮Solution: We have
10 10
2 10
X 10 2 k 10−k
X 10 10−k k+10
(x + 2x) = (x ) (2x) = 2 x .
k=0
k k=0
k
12
10 8
To obtain x we need k = 2. Hence the coefficient sought is 2 = 11520 ◭
2
108 Lemma
n n n−1
= .
k k k−1
Proof:
n n! n (n − 1)! n n−1
= = · = .
k k!(n − k)! k (k − 1)!(n − k)! k k−1
❑
109 Lemma
n n n−1 n−2
= · · .
k k k−1 k−2
Proof:
n n! n(n − 1) (n − 2)! n n−1 n−2
= = · = · · .
k k!(n − k)! k(k − 1) (k − 2)!(n − k)! k k−1 k−2
❑
110 Theorem
n
X n k
k p (1 − p)n−k = np.
k=1
k
n n−1
Proof: We use the identity k =n . Then
k k−1
Pn n k n−k
Pn n−1 k
k=1 k p (1 − p) = k=1 n p (1 − p)n−k
k k − 1
Pn−1 n − 1 k+1
= k=0 n p (1 − p)n−1−k
k
Pn−1 n − 1 k
= np k=0 p (1 − p)n−1−k
k
= np(p + 1 − p)n−1
= np.
111 Lemma
n
X n k
k(k − 1) p (1 − p)n−k = n(n − 1)p2 .
k=2
k
= n(n − 1)p2 .
112 Theorem
n
X n k
2
(k − np) p (1 − p)n−k = np(1 − p).
k=0
k
Then
Pn n k Pn
k=0 (k − np)
2
p (1 − p)n−k = − 1) + k(1 − 2np)
k=0 (k(k
k
n k
+n2 p2 ) p (1 − p)n−k
k
Pn n k
= k=0 k(k − 1) p (1 − p)n−k
k
Pn n k
+(1 − 2np) k=0 k p (1 − p)n−k
k
Pn n k
+n2 p2 k=0 p (1 − p)n−k
k
= n(n − 1)p2 + np(1 − 2np) + n2 p2
= np(1 − p).
Homework
Problem 2.8.1 Expand (a − 2b)5 . quantities, deduce the identities
! ! !
n−1 n n n
2 = + + + ··· ,
Problem 2.8.2 Expand (2a + 3b)4 . 0 2 4
! ! !
n−1 n n n
Problem 2.8.3 By alternately putting x = 1 and x = −1 2 = + + + ··· ,
1 3 5
in 2.2 and adding and subtracting the corresponding
Most of the combinatorial ideas that we learned in the preceding chapter were born out of the
correspondence in the XVII century between the great French mathematicians Pierre de Fermat (1601-
1665) and Blaise Pascal (1623-1662). Pascal was a child prodigy, producing most of his mathematical
output during his teen years. He later became a religious fanatic and quit Mathematics altogether,
except for a one night exception: He was kept awake by a terrible toothache. In order to take his mind
away from the toothache he worked on a mathematical problem. A while later the toothache was gone,
a sign that Pascal took as the divine approval of Mathematics.
In the XVIII century, Jacques Bernoulli (654- 1705) applies probabilistic methods to social phenom-
ena and proves the law of large numbers. Abraham De Moivre (1667-1754) refines his predecessors
ideas and gives a better mathematical formulation of the idea of probability.
In the XIX century Pierre Simon, Marquis of Laplace (1749-1827) and Karl Friedrich Gauss (1777-
1856) introduced and demonstrated the practical value of the normal curve. The Reverend Thomas
Bayes (c. 1702-1761) discovered his theorem on a posteriori probability.
In the XX century probability is put on a firm axiomatic base by Andrei Kolmogorov (1903-1987),
whose axioms we will study in the next section.
113 Example What is meant when a meteorologist announces that there is 20% probability of rain on
1 April 2007? Does it mean that, say, in the last 100 years, there has been rain twenty times on 1 April
2007? Does it mean that during the last few months, of every ten days there have been two days with
rain?
47
48 Chapter 3
114 Example Suppose that test for a disease gives false positives 90% of the time and false negatives
90% of the time. Suppose moreover, that 15% of the population has this disease and that there is an
evil employer that wants to keep out of his company people afflicted with this disease. Suppose that
your results on the test are positive? Is it fair for the employer to argue that you have 90% chance of
having the disease and hence he should not hire you?
115 Example Suppose we flip a coin a large number of times. If the coin is somehow “fair” we would
expect it to shew heads half of the time and tails half of the time. Thus we would like to define the
1
probability of obtaining heads, which we will denote by P (H) to be P (H) = , and similarly we would
2
1
like the probability of obtaining tails to be P (T ) = . Now, we would expect only these two outcomes to
2
be possible: there should be no way for our coin to land “standing up.” We have thus defined a sample
space S = {H, T } with P (H) + P (T ) = 1.
116 Definition A probability P () is a real valued function defined on subsets of a sample space Ω and
satisfying the following axioms, called the Kolmogorov Axioms:
➊ 0 ≤ P (A) ≤ 1 for A ⊆ Ω,
➋ P (Ω) = 1,
➌ for a finite or countably infinite sequence A1 , A2 , . . . ⊆ Ω of disjoint events,
+∞
! +∞
[ X
P Ai = P (Ai ) .
i=1 i=1
In words: a probability is a number between zero and one, the probability of the event that the sample
space will occur is always one, and if a union can be decomposed into disjoint sets, then the probability
of this union is the sum over the probabilities of the disjoint sets. This, of course, does not tell you
anything meaningful in terms of clarifying your intuition of what probability is. But let us consider
more examples.
☞ If A ⊆ Ω is an event with only one outcome a, that is, A = {a}, the following will all mean
the same:
P (A) = P ({a}) = P (a) .
This last notation will be preferred for typographical convenience.
Axioms (2) and (3) are sometimes used as follows. Suppose that
Ω = {x1 , x2 , . . . , xn }
is a sample space with a finite number of outcomes xk . Then by Axioms (2) and (3),
that is, the sum of the probabilities over all the outcomes of the sample space is always 1.
117 Example An Admissions Office of a large Midwestern university has an admission formula that
classifies all applicants into three mutually exclusive groups, I, J, or K. This formula gives 10%
preference to people in pool I over people in pool J, and 20% preference to people in pool J over people
in pool K. What are the respective probabilities for the people belonging to a particular pool to be
admitted?
118 Theorem Let Y ⊆ X belong to the same sample space Ω. Then P (X \ Y ) = P (X) − P (Y ).
P (A ∪ B) = P (A) + P (B) − P (A ∩ B) .
is a decomposition of A ∪ B into three disjoint sets. Thus by Axiom (3) of the definition of
probability,
P (A ∪ B) = P (A \ (A ∩ B)) + P (B \ (A ∩ B)) + P (A ∩ B) .
Since by Theorem 118 we have P (A \ (A ∩ B)) = P (A) − P (A ∩ B) and P (B \ (A ∩ B)) =
P (B) − P (A ∩ B), we deduce that
P (A ∪ B) = P (A) − P (A ∩ B) + P (B) − P (A ∩ B) + P (A ∩ B) ,
122 Example There are two telephone lines A and B. Let E1 be the event that line A is engaged and
let E2 be the event that line B is engaged. After a statistical study one finds that P (E1 ) = 0.5, that
P (E2 ) = 0.6 and that P (E1 ∩ E2 ) = 0.3. Find the probability of the following events:
➊ F: “line B is free.”
➋ G: “at least one line is engaged.”
➌ H: “both lines are free.”
◮Solution: The event that line A is free is E1c , similarly, E2c is the event that line B is free.
➊ Observe that F = E2c and hence P (F ) = P E2c = 1 − P (E2 ) = 1 − 0.6 = 0.4.
➋ Observe that the event that both lines are free is E1c ∩ E2c and hence G = (E1c ∩ E2c )c =
(E1c )c ∪ (E2c )c = E1 ∪ E2 using the De Morgan Laws. Hence, by Inclusion-Exclusion,
P (G) = P (E1 ∪ E2 )
= 0.8.
hence by Inclusion-Exclusion,
P (H) = P E1c ∩ E2c
= P E1c + P E2c − P E1c ∪ E2c
= 0.2.
Homework
Problem 3.2.1 Let S = {a, b, c, d} be a sample space a randomly chosen member of this group visits a physical
with a, b, c, d being different outcomes. Outcome a is 2 therapist.
times as likely as outcome b; outcome b is 4 times as
likely as outcome c; outcome c is 2 times as likely as out-
Problem 3.2.6 Let P (A ∩ B) = 0.2, P (A) = 0.6,
come d. Find
P (B) = 0.5. Find P (Ac ∪ B c ).
P (a) , P (b) , P (c) , P (d) .
Problem 3.2.7 In a horse race, the odds in favour of
Rocinante winning in an 8-horse race are 2 : 5. The odds
Problem 3.2.2 Let S = {a, b, c, d} be a sample space against Babieca winning are 7 : 3. What is the probability
with P (a) = 3P (b), P (b) = 3P (c), P (c) = 3P (d). Find that either Rocinante or Babieca will win this race?
the numerical value of P (a), P (b), P (c) , and P (d).
Problem 3.2.4 Let P (A) = 0.9, P (B) = 0.6. Find the P (A1 ∪ A2 ∪ A3 ) = P (A1 ) + P (A2 ) + P (A3 )
maximum and minimum possible values for P (A ∩ B).
−P (A1 ∩ A2 )
Problem 3.2.5 Among a large group of patients recover- −P (A2 ∩ A3 )
ing from shoulder injuries, it is found that 22% visit both a
physical therapist and a chiropractor, whereas 12% visit −P (A3 ∩ A1 )
neither of these. The probability that a patient visits a
chiropractor exceeds by 0.14 the probability that a patient +P (A1 ∩ A2 ∩ A3 ) .
visits a physical therapist. Determine the probability that
FX (x) = P (X ≤ x) .
124 Definition A random variable is said to be discrete if the cardinality of its image is either finite or
countably infinite. The function x 7→ P (X = x) its call the probability mass function of X.
{x1 , x2 , x3 , . . . , }
125 Example A fair die is tossed. If the resulting number is even, you add 1 to your score and get that
many dollars. If the resulting number is odd, you add 2 to your score and get that many dollars. Let
X be the random variable counting your gain, in dollars. Then the range of X is {3, 5, 7}. By (3.1) we
must have
P (X = 3) + P (X = 5) + P (X = 7) = 1.
126 Example A hand of three cards is chosen from a standard deck of cards. You get $3 for each heart
in your hand. Let Z be the random variable measuring your gain. Then the range of Z is {0, 3, 6, 9}. By
(3.1) we must have
P (Z = 0) + P (Z = 3) + P (Z = 6) + P (Z = 9) = 1.
127 Definition Let X be a discrete random variable with range {x1 , x2 , . . . , }. A histogram of X is a bar
chart of X against P (X).
We will usually situate the centre of the base of the j-th bar at (xj , 0). The height of the j-th bar is
P (X = xj ).
6
21
−
5
21
−
4
21
−
3
21
−
1 2
6
− 21
−
1
21
−
1 2 3 4 5 6 1 2 3 4 5 6
Figure 3.1: Histogram for example 128. Figure 3.2: Histogram for example 129.
128 Example Consider a fair ordinary die. If X is the random variable counting the number of dots,
1
then P (X = k) = , for k = 1, 2, . . . , 6. Observe that
6
P (X = 1) + P (X = 2) + P (X = 3) + P (X = 4) + P (X = 5) + P (X = 6) = 1
since
1 1 1 1 1 1
+ + + + + = 1.
6 6 6 6 6 6
A histogram for X is given in figure 3.1.
129 Example The six faces of a die are numbered 1, 2, 3, 4, 5, 6, but the die is loaded so that the the
probability of obtaining a given number is proportional to the number of the dots. If X is the random
variable counting the number of dots, find P (X = k) for k = 1, 2, . . . , 6.
◮Solution: The hypothesis implies that there is a constant α such that P (X = k) = αk for
1 ≤ k ≤ 6. Then
1 = P (X = 1) + · · · + P (X = 6) = α(1 + · · · + 6) = 21α
1 k
giving α = and P (X = k) = . Observe that
21 21
P (X = 1) + P (X = 2) + P (X = 3) + P (X = 4) + P (X = 5) + P (X = 6) = 1
since
1 2 3 4 5 6
+ + + + + = 1.
21 21 21 21 21 21
A histogram for X is given in figure 3.2. ◭
130 Example Two fair dice, a red and a blue die, are tossed at random and their score added. Let S
be the random variable of the sum of the dots displayed. Determine its probability mass function and
draw its histogram.
6
36
−
5
36
−
4
36
−
3
36
−
2
36
−
1
36
−
1 2 3 4 5 6 7 8 9 10 11 12
◮Solution: From example 20, we know that the sample space for this experiment consists of
6 · 6 = 36 possible outcomes. Assuming each outcome is equally likely, we see that range of S
is obtained as follows:
S (red, blue)
2 (1, 1)
7 (1, 6), (6, 1), (2, 5), (5, 2), (3, 4), (4, 3)
12 (6, 6)
2 1 4 1 6 1
P (S = 3) = = , P (S = 5) = = , P (S = 7) = = ,
36 18 36 9 36 6
5 3 1 1
P (S = 8) = , P (S = 10) = = , P (S = 12) = .
36 36 12 36
4 1 2 1
P (S = 9) = = , P (S = 11) = = ,
36 9 36 18
Homework
Problem 3.3.1 The six faces of a die are numbered Problem 3.3.4 A fair die is tossed. If the resulting num-
1, 2, 3, 4, 5, 6, but the die is loaded so that the the prob- ber is either 2 or 3, you multiply your score by 2 and get
ability of obtaining a given number is proportional to the that many dollars. If the resulting number is either 1 or
square of the number of the dots. If X is the random 4, you add 1 to your score and get that many dollars. If
variable counting the number of dots, find P (X = k) for the resulting number is either 5 or 6, you get that many
k = 1, 2, . . . , 6. dollars. Let X be the random variable counting your gain,
in dollars. Give the range of X. Construct a histogram for
X.
Problem 3.3.2 Three fair dice, a red, a white and a blue
one are thrown. The sum of the dots is given by the ran-
dom variable Y. What is the range of the random variable
Y? Construct a histogram for Y.
Problem 3.3.5 (AHSME 1994) When n fair dice are
rolled, the probability of obtaining a sum of 1994 is strictly
Problem 3.3.3 Two fair dice, a red and a blue one are positive and is the same as the probability of obtaining a
thrown. The product of the dots is given by the random sum of S. What is the smallest possible value of S? (Hint:
variable Y. What is the range of the random variable Y? In a fair die there are 7 − a dots on the face opposite a
Construct a histogram for Y. dots. Hence P (S = x) = P (S = 7n − x).)
3.4 Independence
131 Definition Two events A and B are said to be independent if
P (A ∩ B) = P (A) · P (B) .
132 Example Recall 130. Two dice, a red one and a blue one, are thrown. If A is the event: “the red
die lands on 4” and B is the event: “the sum on the dice is 9” then A and B are not independent. For
1 1 1
P (A) = , P (B) = , and hence P (A) P (B) = . On the other hand,
6 9 54
1
P (A ∩ B) = P (blue die shews 5) = .
6
☞ More often than not independence is built into a problem physically, that is, an event A
does not physically influence an event B. In particular, in problems where sampling is done
with replacement, we should infer independence.
133 Example Two dice, a red one and a blue one, are thrown. If A is the event: “the red die lands
on an even number” and B is the event: “the blue die lands on a prime number” then A and B are
independent, as they do not physically influence one another.
1
134 Example Let A, B be independent events with P (A) = P (B) and P (A ∪ B) = . Find P (A).
2
P (A ∪ B) = P (A) + P (B) − P (A ∩ B) ,
which yields
1
= 2P (A) − (P (A))2 =⇒ 2x2 − 4x + 1 = 0,
2
with x = P (A). Solving this quadratic
√ equation and bearing in mind that we must have
2
0 < x < 1, we find P (A) = x = 1 − .◭
2
135 Example A die is loaded so that if D is the random variable giving the score on the die, then
k
P (D = k) = , where k = 1, 2, 3, 4, 5, 6. Another die is loaded differently, so that if X is the random
21
k2
variable giving the score on the die, then P (X = k) = . Find P (D + X = 4).
91
◮Solution: Clearly the value on which the first die lands does not influence the value on
which the second die lands. Thus by independence
P (D + X = 4) ⇐⇒ P (D = 1 ∩ X = 3) + P (D = 2 ∩ X = 2)
+P (D = 3 ∩ X = 1)
= P (D = 1) · P (X = 3) + P (D = 2) · P (X = 2)
+P (D = 3) · P (X = 1)
1 3 4 2 9 1
= · + · + ·
91 21 91 21 91 21
20
= .
1911
◭
136 Example Two men, A and B are shooting a target. The probability that A hits the target is P (A) =
1 1
, and the probability that B shoots the target is P (B) = , one independently of the other. Find
3 5
➊ That A misses the target.
➋ That both men hit the target.
➌ That at least one of them hits the target.
➍ That none of them hits the target.
137 Example A certain type of missile hits its target 30% of the time. Determine the minimum number
of missiles that must be shot at a certain target in order to obtain a change higher than 80% of hitting
the target.
◮Solution: The probability that n missiles miss the target is (0.7)n . The probability that at
least one of the n missiles hits the target is thus 1 − (0.7)n . We need 1 − (0.7)n > 0.8 and by
a few calculations,
1 − (0.7)1 = 0.3,
1 − (0.7)2 = 0.51,
1 − (0.7)3 = 0.657,
1 − (0.7)4 = .7599,
1 − (0.7)5 = .83193,
When we deal with more than two events, the following definition is pertinent.
138 Definition The events A1 , A2 , . . . , An are independent if for any choice of k (2 ≤ k ≤ n) indexes
{i1 , i2 , . . . , lk } we have
Considerations of independence are important in the particular case when trials are done in suc-
cession.
2
139 Example A biased coin with P (H) = is tossed three times in a row. Find the probability that
5
one will obtain HHT , in that order. What is the probability of obtaining two heads and one tail, in the
three tosses?
◮Solution: Each toss is physically independent from the other. The required probability is
2 2 3 12
P (HHT ) = P (H) · P (H) · P (T ) = · · = .
5 5 5 125
For the second question, we want
12 36
P ({HHT, HT H, T HH}) = P (HHT ) + P (HT H) + P (T HH) = 3 · = .
125 125
◭
140 Example An urn has 3 white marbles, 4 red marbles, and 5 blue marbles. Three marbles are drawn
in succession from the urn with replacement, and their colour noted. What is the probability that a
red, a white and another white marble will be drawn, in this order?
◮Solution: Since the marbles are replaced, the probability of successive drawings is not
affected by previous drawings. The probability sought is thus
4 3 3 1
· · = .
12 12 12 48
◭
141 Example A box contains 20 white balls, 30 blue balls, and 50 red balls. Ten balls are selected, one
at a time, with replacement. Find the probability that at least one colour will be missing from the ten
selected balls.
◮Solution: Let W be the event that the white balls are not represented among the ten
selected balls, and similarly define R and B. Since selection is done with replacement, these
events are independent.Then by Inclusion-Exclusion
P (W ∪ B ∪ R) = P (W ) + P (B) + P (R) − P (W ∩ B) − P (W ∩ R) − P (R ∩ B)
+P (W ∩ R ∩ B)
≈ 0.1356.
Homework
Problem 3.4.1 Suppose that a monkey is seated at a 1 1 1
independent. If P (A) = , P (B) = , P (C) = , find
computer keyboard and randomly strikes the 26 letter 2 4 8
P (A ∪ B ∪ C).
keys and the space bar. Find the probability that its
first 48 characters typed (including spaces) will be: “the
slithy toves did gyre and gimble in the wabe”1 . Problem 3.4.7 A population consists of 20% zeroes,
40% ones, and 40% twos. A random sample X, Y of size
2 is selected with replacement. Find P (|X − Y | = 1).
Problem 3.4.2 An urn has 3 white marbles, 4 red mar-
bles, and 5 blue marbles. Three marbles are drawn
in succession from the urn with replacement, and their
colour noted. What is the probability that a red, a white Problem 3.4.8 A book has 4 typos. After each re-
and a blue marble will be drawn, in this order? reading, an uncorrected typo is corrected with probability
1
. The correction of different typos is each independent
3
Problem 3.4.3 A fair coin is tossed three times in suc- one from the other. Each of the re-readings is also inde-
cession. What is the probability of obtaining exactly two pendent one from the other. How many re-readings are
heads? necessary so that the probability that there be no more
errors be greater than 0.9?
Problem 3.4.4 Two cards are drawn in succession and
with replacement from an ordinary deck of cards. What Problem 3.4.9 A die is rolled three times in succession.
is the probability that the first card is a heart and the Find the probability of obtaining at least one six.
second one a queen?
142 Definition Given an event B, the probability that event A happens given that event B has occurred
is defined and denoted by
P (A ∩ B)
P (A|B) = , P (B) 6= 0.
P (B)
1 From Lewis Carroll’s The Jabberwock.
143 Example Ten cards numbered 1 through 10 are placed in a hat, mixed and then one card is pulled
at random. If the card is an even numbered card, what is the probability that its number is divisible
by 3?
◮Solution: Let A be the event “the card’s number is divisible by 3” and B be the event “the
5 1
card is an even numbered card.” We want P (A|B) . Observe that P (B) = = . Now the
10 2
event A ∩ B is the event that the card’s number is both even and divisible by 3, which happens
1
only when the number of the card is 6. Hence P (A ∩ B) = . The desired probability is
10
1
P (A ∩ B) 1
P (A|B) = = 10 = .
P (B) 1 5
2
◭
144 Example A coin is tossed twice. What is the probability that in both tosses appear heads given that
in at least one of the tosses appeared heads?
◮Solution: Let E = {(H, H)} and F = {(H, H), (H, T ), (T, H)}. Then
1
P (E ∩ F ) P ({(H, H)}) 1
P (E|F ) = = = 4 = .
P (F ) P ({(H, H), (H, T ), (T, H)}) 3 3
4
◭
The conditional probability formula can be used to obtain probabilities of intersections of events.
Thus
P (A ∩ B) = P (B) P (A|B) (3.2)
Observe that the sinistral side of the above equation is symmetric. Thus we similarly have
145 Example Darlene is undecided on whether taking Statistics or Philosophy. She knows that if she
1
takes Statistics she will get an A with probability , while if she takes Philosophy she will receive an
3
1
A with probability . Darlene bases her decision on the flip of a coin. What is the probability that
2
Darlene will receive an A in Statistics?
◮Solution: Let E be the event that Darlene takes Statistics and let F be the event that she
receives an A in whatever course she decides to take. Then we want P (E ∩ F ) . But
1 1 1
P (E ∩ F ) = P (E) P (F |E) = · = .
2 3 6
◭
146 Example An urn contains eight black balls and three white balls. We draw two balls without
replacement. What is the probability that both balls are black?
◮Solution: Let B1 be the event that the first ball is black and let B2 be the event that the
8
second ball is black. Clearly P (B1 ) = . If a black ball is taken out, there remain 10 balls in
11
7
the urn, 7 of which are black. Thus P (B2 |B1 ) = . We conclude that
10
8 7 28
P (B1 ∩ B2 ) = P (B1 ) P (B2 |B1 ) = · = .
11 10 55
◭
The formula for conditional probability can be generalised to any number of events. Thus if A1 , A2 ,
. . ., An are events, then
P (A1 ∩ A2 ∩ . . . ∩ An ) = P (A1 )
147 Example An urn contains 5 red marbles, 4 blue marbles, and 3 white marbles. Three marbles are
drawn in succession, without replacement. Find the probability that the first two are white and the
third one is blue.
Sometimes we may use the technique of conditioning, which consists in decomposing an event into
mutually exclusive parts. Let E and F be events. Then
P (E) = P (E ∩ F ) + P (E ∩ F c )
(3.5)
c c
= P (F ) P (E|F ) + P (F ) P (E|F ) .
1
.02 C 52 A
M S
1
0.53 4
.98 Cc 51 Ac
52
1
.001 C 51 A
Mc 3 Sc
0.47 4
.999 Cc 50 Ac
51
148 Example A population consists of 53% men. The probability of colour blindness is .02 for a man
and .001 for a woman. Find the probability that a person picked at random is colour blind.
◮Solution: We condition on the sex of the person. Let M be the event that the person is a
man and let C be the event that the person is colour-blind. Then
P (C) = P (C ∩ M ) + P (C ∩ M c ) .
149 Example Draw a card. If it is a spade, put it back and draw a second card. If the first card is not a
spade, draw a second card without replacing the second one. Find the probability that the second card
is the ace of spades.
◮Solution: We condition on the first card. Let S be the event that the first card is a spade
and let A be the event that the second card is the ace of spades. Then
P (A) = P (A ∩ S) + P (A ∩ S c ) .
1 1 1 3 1 1
But P (A ∩ S) = P (S) P (A|S) = · = and P (A ∩ S c ) = P (S c ) P (A|S c ) = · = .
4 52 108 4 51 68
We thus have
1 1 11
P (A) = + = .
108 68 459
A tree diagram explaining this calculation can be seen in figure 3.5. ◭
150 Example A multiple-choice test consists of five choices per question. You think you know the
answer for 75% of the questions and for the other 25% you guess at random. When you think you
know the answer, you are right only 80% of the time. Find the probability of getting an arbitrary
question right.
◮Solution: We condition on whether you think you know the answer to the question. Let K
be the event that you think you know the answer to the question and let R be the event that
you get a question right. Then
P (R) = P (K ∩ R) + P (K c ∩ R)
If instead of conditioning on two disjoint sets we conditioned in n pairwise disjoint sets, we would
obtain
152 Example An urn contains 4 red marbles and 5 green marbles. A marble is selected at random and
its colour noted, then this marble is put back into the urn. If it is red, then 2 more red marbles are put
into the urn and if it is green 1 more green marble is put into the urn. A second marble is taken from
the urn. Let R1 , R2 be the events that we select a red marble on the first and second trials respectively,
and let G1 , G2 be the events that we select a green marble on the first and second trials respectively.
➊ Find P (R2 ).
➋ Find P (R2 ∩ R1 ).
◮Solution: Plainly,
➊
4 6 5 3 19
P (R2 ) = · + · = .
9 11 9 5 33
➋
4 6 8
P (R2 ∩ R1 ) = · =
9 11 33
➌
P (R2 ∩ R1 ) 8
P (R1 |R2 ) = = .
P (R2 ) 19
◭
153 Example An urn contains 10 marbles: 4 red and 6 blue. A second urn contains 16 red marbles and
an unknown number of blue marbles. A single marble is drawn from each urn. The probability that
both marbles are the same colour is 0.44. Calculate the number of blue marbles in the second urn.
◮Solution: Let b be the number of blue marbles in the second urn, let Rk , k = 1, 2 denote the
event of drawing a red marble from urn k, and similarly define Bk , k = 1, 2. We want
P ((R1 ∩ R2 ) ∪ (B1 ∩ B2 )) .
Observe that the events R1 ∩R2 and B1 ∩B2 are mutually exclusive, and that R1 is independent
of R2 and B1 is independent of B2 (drawing a marble from the first urn does not influence
drawing a second marble from the second urn). We then have
= P (R1 ∩ R2 ) + P (B1 ∩ B2 )
154 Example A sequence of independent trials is performed by rolling a pair of fair dice. What is the
probability that an 8 will be rolled before rolling a 7?
◮Solution: Let A be the event that an 8 occurs before a 7. Now, either: (i) the first trial will
be an 8, which we will call event X, or (ii) the first trial will be a 7, which we will call event
Y , or (iii) the first trial will be neither an 8 nor a 7, which we will call event Z. Since X , Y , Z
partition A we have
Observe that
5 6 25
P (A|X) P (X) = 1 · , P (A|Y ) P (Y ) = 0 · , P (A|Z) P (Z) = P (A) · ,
36 36 36
where the last equality follows because if the first outcome is neither an 8 nor a 7 we are in the
situation as in the beginning of the problem. Thus
5 25 5
P (A) = + · P (A) =⇒ P (A) = .
36 36 11
This will be considered again as example 182. ◭
155 Example Three people, X, Y, Z, in order, roll a fair die. The first one to roll an even number wins
and the game is ended. What is the probability that X will eventually win?
◮Solution: Either X wins on his first attempt, or it does not. Let F be the event that F wins
on his first attempt and let P (X) be the probability eventually wins. Then
1 P (X) 1 4
P (X) = P (X|F ) P (F ) + P (X|F c ) P (F c ) = 1 · + · =⇒ P (X) = .
2 4 2 7
Here we observe that
1 1
P (X|F c ) =· · P (X) ,
2 2
since if X does not win on the first attempt but still wins, we need Y and Z to lose on the first
attempts. This problem will be considered again in example 181. ◭
156 Example (Monty Hall Problem) You are on a television shew where the host shews you three doors.
Behind two of them are goats, and behind the remaining one a car. You choose one door, but the door
is not yet opened. The host opens a door that has a goat behind it (he never opens the door that hides
the car), and asks you whether you would like to switch your door to the unopened door. Should you
switch?
◮Solution: It turns out that by switching, the probability of getting the car increases from
1 2
to . Let us consider the following generalisation: an urn contains a white marbles and b
3 3
black marbles with a + b ≥ 3. You have two strategies:
➊ You may simply draw a marble at random. If it is white you win, otherwise you lose.
➋ You draw a marble at random without looking at it, and you dispose of it. The host removes
a black marble from the urn. You now remove a marble from the urn. If it is white you win,
otherwise you lose.
a
In the first strategy your probability of winning is clearly . To compute the probability of
a+b
winning on the second strategy we condition on the colour of the marble that you first drew.
The probability of winning is thus
a a−1 b a a 1
· + · = 1+ .
a+b a+b−2 a+b a+b−2 a+b a+b−2
This is greater than the probability on the first strategy, so the second strategy is better. ◭
157 Example A simple board game has four fields A, B, C, and D. Once you end up on field A you
have won and once you end up on field B you have lost. From fields C and D you move to other fields
by flipping a coin. If you are on field C and you throw a head, then you move to field A, otherwise to
field D. From field D, you move to field C if you throw a head, and otherwise you mover to field B.
Suppose that you start in field D. What is the probability that you will win (i.e., what is the
probability that you will end up on field A)?
◮Solution: We want P (A|D). This can happen in two moves (from D to C to A) with
1 1 1
probability · = , or it can happen in 4 moves (from D to C to D to C to A) with probability
2 2 4
1 1 1 1 1
· · · = , or in six moves, . . . ,etc. We must sum thus the infinite geometric series
2 2 2 2 16
1
1 1 1 4 1
+ + + ··· = = .
4 42 43 1 3
1−
4
1
The required probability is therefore .◭
3
Homework
Problem 3.5.1 Two cards are drawn in succession from Problem 3.5.6 A fair coin is tossed until a head ap-
a well-shuffled standard deck of cards. What is the prob- pears. Given that the first head appeared on an even
ability of successively obtaining numbered toss, what is the conditional probability that
➊ a red card and then a black card? the head appeared on the fourth toss?
Problem 3.5.2 Five cards are drawn at random from a Problem 3.5.8 An urn contains 5 red marbles and 5
standard deck of cards. It is noticed that there is at least green marbles. A marble is selected at random and its
one picture (A, J, Q, or K) card. Find the probability that colour noted, then this marble is put back into the urn. If
this hand of cards has two knaves. it is red, then 2 more red marbles are put into the urn and
if it is green 3 more green marbles are put into the urn. A
Problem 3.5.3 Five cards are drawn at random from a second marble is taken from the urn. Let R1 , R2 be the
standard deck of cards. It is noticed that there is exactly events that we select a red marble on the first and sec-
one ace card. Find the probability that this hand of cards ond trials respectively, and let G1 , G2 be the events that
has two knaves. we select a green marble on the first and second trials
respectively.
the number is not a prime number, you select a second shuffled, and a card drawn from it. Find the probability
urn from the remaining four urns and you receive the to- that this drawn card is an ace.
tal amount of money in the two urns selected. What is
the probability that you end up with $25?
Problem 3.5.14 An insurance company examines its
pool of auto insurance customers and gathers the follow-
Problem 3.5.10 A family has five children. Assuming ing information:
1
that the probability of a girl on each birth was and that • All customers insure at least one car.
2
the five births were independent, what is the probability
• 70% of the customers insure more than one car.
the family has at least one girl, given that they have at
least one boy? • 20% of the customers insure a sports car.
• Of those customers who insure more than one car,
Problem 3.5.11 Events S and T have probabilities 15% insure a sports car.
1 1
P (S) = P (T ) = and P (S|T ) = . What is Calculate the probability that a randomly selected cus-
3 6
P (S c ∩ T c )? tomer insures exactly one car and that car is not a sports
car.
Problem 3.5.12 Peter writes to Paul and does not re-
ceive an answer. Assuming that one letter in n is lost Problem 3.5.15 Let A and B be independent events
in the mail, find the probability that Paul received the let- with probabilities P (A) = 0.2 and P (B) = 0.3. Let C
ter. (Assume that Paul would have answered the letter denote the event that “both A and B occur,” and let D be
had he received it.) the event “either A or B, but not both, occur.”
1. Express D in terms of A and B using set-theoretic
Problem 3.5.13 A deck of cards is shuffled and then di- notation and compute P (D)
vided into two halves of 26 cards each. A card is drawn 2. Find P (A|D).
from one of the halves; it turns out to be an ace. The ace
is then placed in the second half-deck. This half is then 3. Are C and D independent?
P (Ak ∩ B)
P (Ak |B) = .
P (B)
By the Law of Total Probability Theorem 151, P (B) = P (A1 ) P (B|A1 ) + P (A2 ) P (B|A2 ) + · · · +
P (An ) P (B|An ) . This gives
158 Theorem (Bayes’ Rule) . Let A1 , A2 , . . . , An be pairwise disjoint with union Ω. Then
P (Ak ∩ B) P (Ak ∩ B)
P (Ak |B) = = Pn .
P (B) k=1 P (Ak ) P (B|Ak )
159 Example A supermarket buys its eggs from three different chicken ranches. They buy 1/3 of their
eggs from Eggs’R Us, 1/2 of their eggs from The Yolk Ranch, and 1/6 of their eggs from Cheap Eggs.
The supermarket determines that 1% of the eggs from Eggs’R Us are cracked, 2% of the eggs from the
Yolk Ranch are cracked, and 5% of the eggs from Cheap Eggs are cracked. What is the probability that
an egg chosen at random is from Cheap Eggs, given that the egg is cracked?
.01 cracked
R′ U s
.02 cracked
YR
1/2
.98 not cracked
160 Example 6% of Type A spark plugs are defective, 4% of Type B spark plugs are defective, and 2%
of Type C spark plugs are defective. A spark plug is selected at random from a batch of spark plugs
containing 50 Type A plugs, 30 Type B plugs, and 20 Type C plugs. The selected plug is found to be
defective. What is the probability that the selected plug was of Type A?
◮Solution: Let A, B, C denote the events that the plug is type A, B, C respectively, and D
the event that the plug is defective. We have
Hence
P (A ∩ D)
P (A|D) =
P (D)
P (D|A) · P (A)
=
P (D)
6 50
·
= 100 100
23
500
15
= .
23
◭
Homework
Problem 3.6.1 There are three coins in a box. When marbles and d green marbles, and urn C has a red mar-
tossed, one of the coins comes up heads only 30% of bles and c green marbles. Let A be the event of choosing
the time, one of the coins is fair, and the third comes up urn A, B of choosing urn B and, C of choosing urn C. Let
heads 80% of the time. A coin is selected at random from R be the event of choosing a red marble and G be the
the box and tossed three times. If two heads and a tails event of choosing a green marble. An urn is chosen at
come up—in this order—what is the probability that the random, and after that, from this urn, a marble is chosen
coin was the fair coin? at random.
➊ Find P (G).
Problem 3.6.2 On a day when Tom operates the ma- ➋ Find P (G|C).
chinery, 70% of its output is high quality. On a day when
➌ Find P (C|G).
Sally operates the machinery, 90% of its output is high
quality. Tom operates the machinery 3 days out of 5. ➍ Find P (R).
Three pieces of a random day’s output were selected at ➎ Find P (R|A).
random and 2 of them were found to be of high quality.
What is the probability that Tom operated the machinery ➏ Find P (A|R).
that day?
Problem 3.6.6 Three dice have the following probabili-
ties of throwing a 6: p, q, r, respectively. One of the dice
Problem 3.6.3 Two distinguishable dice have probabili-
is chosen at random and thrown. A 6 appeared. What is
ties p, and 1 respectively of throwing a 6. One of the dice
the probability that the die chosen was the first one?
is chosen at random and thrown. A 6 appeared.
➊ Find the probability of throwing a 6. Problem 3.6.7 Three boxes identical in appearance con-
➋ What is the probability that one simultaneously tain the following coins: Box A has two quarters; Box B
chooses die I and one throws a 6? has 1 quarter and 2 dimes; Box C has 1 quarter and 1
dime. If a coin drawn at random from a box selected is
➌ What is the probability that the die chosen was the a quarter, what is the probability that the randomly se-
first one? lected box contains at least one dime?
Problem 3.6.4 Three boxes identical in appearance con- Problem 3.6.8 An urn contains 6 red marbles and 3
tain the following coins: Box I has two quarters and a green marbles. One marble is selected at random and
dime; Box II has 1 quarter and 2 dimes; Box III has 1 is replaced by a marble of the other colour. A second mar-
quarter and 1 dime. A coin drawn at random from a box ble is then drawn. What is the probability that the first
selected is a quarter. marble selected was red given that the second one was
➊ Find the probability of obtaining a quarter. also red?
➋ What is the probability that one simultaneously
choosing box III and getting a quarter? Problem 3.6.9 There are three dice. Die I is an ordinary
fair die, so if F is the random variable giving the score on
➌ What is the probability that the quarter came from 1
box III? this die, then P (F = k) = , Die II is loaded so that if D
6
is the random variable giving the score on the die, then
k
Problem 3.6.5 There are three urns, A, B, and C. Urn A P (D = k) = , where k = 1, 2, 3, 4, 5, 6. Die is loaded
21
has a red marbles and b green marbles, urn B has c red differently, so that if X is the random variable giving the
card (A)
P (A) = . (4.1)
card (Ω)
1
Observe that in this model the probability of any single outcome is , that is, every outcome is
card (Ω)
equally likely.
Since
n n
X X 1 card (Ω)
P (X = xk ) = = = 1,
k=1 k=1
card (Ω) card (Ω)
this is a bonafide random variable.
162 Example If the experiment is flipping a fair coin, then Ω = {H, T } is the sample space (H for heads,
T for tails) and E = {H} is the event of obtaining a head. Then
1
P (H) = = P (T ) .
2
163 Example Consider a standard deck of cards. One card is drawn at random.
68
Uniform Random Variables 69
➊ Find the size of the sample space of this experi- ➏ Find the probability P (K ∪ R) of drawing either a
ment. king or a red card.
➋ Find the probability P (K) of drawing a king. ➐ Find the probability P (K \ R) of drawing a king
1
which is not red.
➌ Find the probability P (J) of drawing a knave .
➑ Find the probability P (R \ K) of drawing a red
➍ Find the probability P (R) of drawing a red card. card which is not a king.
➎ Find the probability P (K ∩ R) of drawing a red ➒ Find the probability P (K ∩ J) of drawing a king
king. which is also a knave.
◮Solution:
◮Solution: There are 9 palindromes with 1-digit, 9 with 2 digits and 90 with three digits.
Thus the number of palindromes in the set is 9 + 9 + 90 = 108. The probability sought is
108 27
= .◭
1000 250
165 Example A fair die is rolled three times and the scores added. What is the probability that the sum
of the scores is 6?
◮Solution: Let A be the event of obtaining a sum of 6 in three rolls, and let Ω be the sample
space created when rolling a die thrice. The sample space has 63 = 216 elements, since the
first roll can land in 6 different ways, as can the second and third roll. To obtain a sum of 6 in
three rolls, the die must have the following outcomes:
A = {(2, 2, 2), (4, 1, 1), (1, 4, 1), (1, 1, 4), (1, 2, 3),
(1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)}
10 5
and so card (A) = 10. Hence P (A) = = .◭
216 108
166 Example Consider a standard deck of cards. Four cards are chosen at random without regards to
order and without replacement. Then
1A knave is what refined people call a jack. Cf. Charles Dickens’ Great Expectations.
➊ The sample space for this experiment has size ➍ The probability of choosing four cards of the same
! colour is
52
= 270725.
4 ! !
2 26
➋ The probability of choosing the four kings is 1 4 (2)(14950) 92
! ! = = .
4 52 270725 833
4 1 4
! = .
52 270725
4 ➎ The probability of choosing four cards of the same
suit is
➌ The probability of choosing four cards of the same
face is ! !
! ! 4 13
13 4
1 4 (4)(715) 44
1 4 13 1 ! = = .
! = = . 52 270725 4165
52 270725 20825
4
4
167 Example Consider again the situation in example 167, but this time order is taken into account,
that is, say, you shuffle the cards, draw them one by one without replacement, and align them from
left to right. Then
➊ The sample space for this experiment has size in 26 · 25 · 24 · 23 ways. The probability of choosing
52 · 51 · 50 · 49 = 6497400. four cards of the same colour is thus
➋ The probability of choosing the four kings is 2 · 26 · 25 · 24 · 23 92
= ,
4·3·2·1 1 52 · 51 · 50 · 49 833
= ,
52 · 51 · 50 · 49 270725
as before.
as before.
➌ One chooses the face for a card in 13 ways, and ➎ To choose four cards of the same suit, one first
thus the probability of choosing four cards of the chooses the suit in 4 ways, and then the cards in
same face, using the previous probability, is 13 · 12 · 11 · 10 ways.The probability of choosing
four cards of the same suit is
1 13 1
13 = = . 4 · 13 · 12 · 11 · 10 44
270725 270725 20825 = ,
52 · 51 · 50 · 49 4165
➍ To choose four cards of the same colour, first
choose the colour in 2 ways, and the four cards as before.
◮Solution: There are 100 terms in each of the arithmetic progressions. Hence we may choose
X in 100 ways and Y in 100 ways. The size of the sample space for this experiment is thus 100·
100 = 10000. Now we note that 11 is the smallest number that belongs to both progressions.
Since the first progression has common difference 3 and the second progression has common
difference 4, and since the least common multiple of 3 and 14 is 12, the progressions have in
common numbers of the form
11 + 12k.
We need the largest integer k with
11 + 12k ≤ 299 =⇒ k = 24.
169 Example Hands) A poker hand consists of 5 cards from a standard deck of 52 cards, and
(Poker
52
so there are = 2598960 ways of selecting a poker hand. Various hands, and their numbers, are
5
shewn below.
170 Example (The Birthday Problem) If there are n people in a classroom, what is the probability that
no pair of them celebrates their birthday on the same day of the year?
of a day of the year for each person. The number of ways in which no two people have the
same birthday is
365 · 364 · 363 · · · (365 − n + 1),
as the first person can have his birthday in 365 days, the second in 364 days, etc. Thus if A is
the event that no two people have the same birthday, then
365 · 364 · 363 · · · (365 − n + 1)
P (A) = .
365n
The probability sought is
365 · 364 · 363 · · · (365 − n + 1)
P (Ac ) = 1 − P (A) = 1 − .
365n
1 1
A numerical computation shews that for n = 23, P (A) < , and so P (Ac ) > . This means
2 2
1
that if there are 23 people in a room, the probability is better than that two will have the
2
same birthday. ◭
171 Example An urn has five blue and eight red marbles. Jack and Jill draw marbles, alternately and
without replacement, until the first blue marble is drawn, which is considered a win. What is the
probability that Jill will win?
◮Solution: For each 1 ≤ k ≤ 9, let Ak denote the event that the first blue ball appears on the
kth attempt. Since Jill draws on the 2nd , 4th , 6th , and 8th attempts, the probability of winning
at these attempts are
8·5 40 10
P (A2 ) = = = ,
13 · 12 156 39
8·7·6·5 1, 680 14
P (A4 ) = = = ,
13 · 12 · 11 · 10 17, 160 143
8·7·6·5·4·5 33, 600 35
P (A6 ) = = = ,
13 · 12 · 11 · 10 · 9 · 8 1, 235, 520 1287
8·7·6·5·4·3·2·5 201, 600 5
P (A8 ) = = = .
13 · 12 · 11 · 10 · 9 · 8 · 7 · 6 51, 891, 840 1287
As these events are mutually exclusive, the probability of Jill winning is
4
! 4
[ X 496
P A2i = P (A2i ) = ≈ 0.3854.
i=1 i=1
1287
◭
172 Example (Derangements) A hat contains three tickets, numbered 1, 2 and 3. The tickets are drawn
from the box one at a time. Find the probability that the ordinal number of at least one ticket coincides
with its own number.
◮Solution: Let Ak , k = 1, 2, 3 be the event that when drawn from the hat, ticket k is the k-th
chosen. We want
P (A1 ∪ A2 ∪ A3 ) .
By Inclusion-Exclusion for three sets (problem 3.2.8),
+P (A1 ∩ A2 ∩ A3 )
By symmetry,
2! 1
P (A1 ) = P (A2 ) = P (A3 ) = = ,
3! 3
1! 1
P (A1 ∩ A2 ) = P (A2 ∩ A3 ) = P (A3 ∩ A1 ) = = ,
3! 6
1 1
P (A1 ∩ A2 ∩ A3 ) = = .
3! 6
The probability sought is finally
1 1 1 2
P (A1 ∪ A2 ∪ A3 ) = 3 · −3· + = .
3 6 6 3
◭
Homework
Problem 4.1.1 There are 100 cards: 10 of each red— Problem 4.1.7 A number N is chosen at random from
numbered 1 through 10; 20 white—numbered 1 through {1, 2, . . . , 25}. Find the probability that N 2 + 1 be divis-
20; 30 blue—numbered 1 through 30; and 40 magenta— ible by 10.
numbered 1 through 40.
➊ Let R be the event of picking a red card. Find
P (R) . Problem 4.1.8 An urn has 3 white marbles, 4 red mar-
bles, and 5 blue marbles. Three marbles are drawn at
➋ Let B be the event of picking a blue card. Find
once from the urn, and their colour noted. What is the
P (B) .
probability that a marble of each colour is drawn?
➌ Let E be the event of picking a card with face value
11. Find P (E).
➍ Find P (B ∪ R) . Problem 4.1.9 Two cards are drawn at random from a
➎ Find P (E ∩ R) . standard deck. What is the probability that both are
queens?
➏ Find P (E ∩ B) .
➐ Find P (E ∪ R) .
➑ Find P (E ∪ B) . Problem 4.1.10 Four cards are drawn at random from
➒ Find P (E \ B) . a standard deck. What is the probability that two are red
queens and two are spades? What is the probability that
➓ Find P (B \ E) .
there are no hearts?
Problem 4.1.14 Twelve married couples (men and ➊ Find the probability of getting no 5 on the faces.
wives) end up in an island populated by savage canni- ➋ Find the probability of getting at least one 5 on the
bals. The cannibals each twelve people for dinner. What faces.
is the probability that exactly one member of each family ➌ Find the probability of obtaining at least two faces
is eaten? with the same number.
➍ Find the probability that the sum of the points on
Problem 4.1.15 Ten married communist couples from the faces is even.
the English Department go in pilgrimage to Lenin’s Tomb.
Suddenly, a gang of capitalists raids them, and only six
Problem 4.1.23 Six cards are drawn without replace-
communitsts are able to escape. What is the probabil-
ment from a standard deck of cards. What is the prob-
ity that there are no married couples among the six es-
ability that
capees? Exactly one married couple? Exactly two mar-
ried couples? Three married couples? ➊ three are red and three are black?
➋ two are queens, two are aces, and two are kings?
➌ four have the same face (number or letter)?
Problem 4.1.16 Three fair dice, a red, a white, and a
blue one are tossed, and their scores registered in the ➍ exactly four are from the same suit?
random variables R, W, B respectively. What is the prob- ➎ there are no queens?
ability that R ≤ W ≤ B?
Problem 4.1.24 An ordinary fair die and a die whose
Problem 4.1.17 From a group of A males and B females faces have 2, 3, 4, 6, 7, 9 dots but is otherwise balanced
a committee of C people will be chosen. are tossed and the total noted. What is the probability
➊ What is the probability that there are exactly T fe- that the sum of the dots shewing on the dice exceeds 9?
males?
➋ What is the probability that at least C − 2 males Problem 4.1.25 (AHSME 1976) A point in the plane,
will be chosen? both of whose rectangular coordinates are integers with
absolute value less than or equal to four, is chosen at ran-
➌ What is the probability that at most 3 females will dom, with all such points having an equal probability of
be chosen? being chosen. What is the probability that the distance
➍ What is the probability that Mary and Peter will be from the point to the origin is at most two units?
serving together in a committee?
➎ What is the probability that Mary and Peter will not Problem 4.1.26 What is the probability that three
be serving together? randomly-selected people were born on different days of
the week? (Assume that the chance of someone being
Problem 4.1.18 A school has 7 men and 5 women on its born on a given day of the week is 1/7).
faculty. What is the probability that women will outnum-
ber men on a randomly selected five-member committee? Problem 4.1.27 Let k, N be positive integers. Find
the probability that an integer chosen at random from
Problem 4.1.19 Five (distinguishable) camels and five {1, 2, . . . , N } be divisible by k.
(distinguishable) goats are lined up at random. What is
the probability that all the camels are grouped together Problem 4.1.28 What is the probability that a random
and all the camels are grouped together? What is the integer taken from {1, 2, 3, . . . , 100} has no factors in
probability that either the camels are grouped together or common with 100?
the goats are grouped together?
Problem 4.1.29 A number N is chosen at random from
Problem 4.1.20 Of the 120 students in a class, 30 speak {1, 2, . . . , 25}. Find the probability that N 2 − 1 be divis-
Chinese, 50 speak Spanish, 75 speak French, 12 speak ible by 10.
Spanish and Chinese, 30 speak Spanish and French, and
15 speak Chinese and French. Seven students speak all Problem 4.1.30 Three integers are drawn at random
three languages. What is the probability that a randomly and without replacement from the set of twenty integers
chosen student speaks none of these languages? {1, 2, . . . , 20}. What is the probability that their sum be
divisible by 3?
Problem 4.1.21 A box contains 3 red balls, 4 white
balls, and 3 blue balls. Balls are drawn from the box one Problem 4.1.31 There are twenty guns in a row, and it
at a time, at random, without replacement. What is the is known that exactly three will fire. A person fires the
probability that all three red balls will be drawn before guns, one after the other. What is the probability that he
any white ball is obtained? will have to try exactly seventeen guns in order to know
which three will fire?
Problem 4.1.22 Three fair dice are thrown at random.
Problem 4.1.32 Two different numbers X and Y are Problem 4.1.41 Find the chance of throwing more that
chosen from {1, 2, . . . , 10}. Find the probability that 15 in a single throw of three dice.
X 2 + Y 2 ≤ 27.
Problem 4.1.42 Little Edna is playing with the four let-
Problem 4.1.33 Ten different numbers are chosen at ters of her name, arranging them at random in a row.
random from the set of 30 integers {1, 2, . . . , 30}. Find What is the probability that the two vowels come to-
the probability that gether?
➊ all the numbers are odd.
➋ exactly 5 numbers be divisible by 3. Problem 4.1.43 (Galileo’s Paradox) Three distinguish-
➌ exactly 5 numbers are even, and exactly one of able fair dice are thrown (say, one red, one blue, and
them is divisible by 10. one white). Observe that
Problem 4.1.47 (AHSME 1986) Six distinct integers be drawn at random without replacement. What is the
are chosen at random from {1, 2, 3, . . . , 10}. What is the probability that both counters will be of the same colour
probability that, among those selected, the second small- or bear the same number?
est is 3?
Problem 4.1.53 (AIME 1984) A gardener plants three
Problem 4.1.48 An urn contains n black and n white maple trees, four oak trees and five birch trees in a row.
balls. Three balls are chosen from the urn at random and He plants them in random order, each arrangement being
without replacement. What is the value of n if the proba- equally likely. Let m/n in lowest terms be the probability
1 that no two birch trees are next to each other. Find m + n.
bility is that all three balls are white?
12
Problem 4.1.54 Five fair dice are thrown. What is the
Problem 4.1.49 A standard deck is shuffled and the
probability that a full house in thrown (that is, where two
cards are distributed to four players, each one holding
dice shew one number and the other three dice shew a
thirteen cards. What is the probability that each has an
second number)?
ace?
where n is the number of independent trials, p is the probability of success in one trial, and k is the
number of successes.
Thus a binomial random variable counts the number of successes in a sequence of independent trials.
Since
n n
X X n
P (X = k) = pk (1 − p)n−k = (p + (1 − p))n = 1,
k=0 k=0
k
0.324135
0.302526
0.375
0.3125
P (X = k) P (X = k) P (X = k)
0.234375
0.234375
0.18522
0.117649
0.25
0.25
0.059535
0.09375
0.09375
0.015625
0.015625
0.010206
0.000729
0.0625
0.0625
0 1 2 3 4 5 6 k 0 1 2 3 4 k 0 1 2 3 4 5 6 k
1 1 7
Figure 4.1: n = 6, p = 2
. Figure 4.2: n = 4, p = 2
. Figure 4.3: n = 6, p = 10
.
◮Solution:
1
➊ Let X be the random variables counting the number of heads. Here p = 1 − p = . Hence
2
3 2
5 1 1 5
P (X = 3) = = .
3 2 2 16
175 Example A multiple-choice exam consists of 10 questions, and each question has four choices. You
are clueless about this exam and hence, guessing the answer. It is assumed that for every question
one, and only one of the choices is the correct answer.
➊ Find n, the number of trials, p, the probability of success, and 1 − p, the probability of failure.
➋ Find the probability of answering exactly 7 questions right.
➌ Find the probability of answering 8 or more questions right.
◮Solution:
1 3
➊ Clearly n = 10, p = , and also, 1 − p =
.
4 4
➋ Let X be the random variables counting the number of right questions. Then
7 3
10 1 3 405
P (X = 7) = = .
7 4 4 131072
109
= .
262144
176 Example A die is rolled repeatedly. Let X denote the number of the roll at which the third six
occurs. Find P (X > 1000).
◮Solution: The desired probability is the same as the probability that there are at most two
sixes within the first 1000 rolls:
1000 999 1 998 2
5 1000 5 1 1000 5 1
P (X > 1000) = + + .
6 1 6 6 2 6 6
◭
Homework
Problem 4.2.1 When two fair coins are tossed, what is Problem 4.2.4 In the world series of foosball, a five-
the probability of getting no heads exactly four times in game match is played, and the player who wins the most
five tosses? games is the champion. The probability of Player A win-
ning any given game against player B is constant and
1
3 equals . What is the probability that Player A will be
Problem 4.2.2 A coin is loaded so that P (H) = and 3
4 the champion? You may assume that all five games are
1 played, even when a player wins three of the first five
P (T ) = . The coin is flipped 5 times and its outcome
4 games.
recorded. Find the probability that heads turns up at
least once.
Problem 4.2.5 In a certain game John’s skill is to Peter’s
as 3 to 2. Find the chance of John winning 3 games at
Problem 4.2.3 A fair coin is to be flipped 1000 times. least out of 5.
What is the probability that the number of heads exceeds
the number of tails?
Problem 4.2.6 A coin whose faces are marked 2 and 3
is thrown 5 times. What is the chance of obtaining a total
P (X = k) = (1 − p)k−1 p, k = 1, 2, 3, . . . .
Thus the random variable X counts the number of trials necessary until success occurs.
Since
∞ ∞
X X p
P (X = k) = (1 − p)k−1 p = = 1,
k=1 k=1
1 − (1 − p)
this is a bonafide random variable.
Observe that
P (X ≥ k) = (1 − p)k−1 , k = 1, 2, 3, . . . , (4.2)
since the probability that at least k trials are necessary for success is equal to the probability that the
first k − 1 trials are failures.
178 Example An urn contains 5 white, 4 black, and 1 red marble. Marbles are drawn, with replacement,
until a red one is found. If X is the random variable counting the number of trials until a red marble
appears, then
1
➊ P (X = 1) = is the probability that the marble appears on the first trial.
10
9 1 9
➋ P (X = 2) = · = is the probability that the red marble appears on the second trial.
10 10 100
9k−1
➌ P (X = k) = is the probability that the marble appears on the k-th trial.
10k
179 Example A drunk has five keys in his key-chain, and an only one will start the car 2 He tries each
key until he finds the right one (he is so drunk that he may repeat the wrong key several times), then
he starts his car and (by cheer luck), arrives home safely, where his wife is waiting for him, frying pan
in hand. If X is the random variable counting the number of trials until he find the right key, then
1
➊ P (X = 1) = is the probability that he finds the key on the first trial.
5
4 1 4
➋ P (X = 2) = · = is the probability that he finds the key on the second trial.
5 5 25
4 4 1 16
➌ P (X = 3) = · · = is the probability that he finds the key on the third trial.
5 5 5 125
4 4 4 1 64
➍ P (X = 4) = · · · = is the probability that he finds the key on the fourth trial.
5 5 5 5 625
4 4 4 4 1 256
➎ P (X = 5) = · · · · = is the probability that he finds the key on the fifth trial.
5 5 5 5 5 3125
2 Caution: don’t drink and drive!
4 4 4 4 4 1 1024
➏ P (X = 6) = · · · · · = is the probability that he finds the key on the sixth trial.
5 5 5 5 5 5 15625
180 Example An urn contains 5 white, 4 black, and 1 red marble. Marbles are drawn, with replacement,
until a red one is found. If X is the random variable counting the number of trials until the red marble
appears.
➊ Find the probability that it takes at most 3 trials to obtain a red marble.
➋ Find the probability that it takes more than 3 trials to obtain a red marble.
◮Solution:
1 9 81 271
➊ This is asking for P (X = 1) + P (X = 2) + P (X = 3) = + + = .
10 100 1000 1000
➋ This is asking for the infinite geometric sum
∞ ∞
X X 9k−1
P (X > 3) = P (X = k) = .
k=4 k=4
10k
We can sum this directly, or we may resort to the fact that the event “more than 3 trials” is
complementary to the event “at most 3 trials.” Thus
271 729
P (X > 3) = 1 − (P (X = 1) + P (X = 2) + P (X = 3)) = 1 − = .
1000 1000
We may also resort to (4.2) by noticing that
4−1
9 729
P (X > 3) = P (X ≥ 4) = = .
10 1000
181 Example Three people, X, Y, Z, in order, roll a fair die. The first one to roll an even number wins
and the game is ended. What is the probability that X will win?
◮Solution: We have
182 Example A sequence of independent trials is performed by rolling a pair of fair dice. What is the
probability that an 8 will be rolled before rolling a 7?
5 6
◮Solution: The probability of rolling an 8 is and the probability of rolling a 7 is
. Let
36 36
An be the event that no 8 or 7 appears on the first n − 1 trials and that a 8 appears on the nth
trial. Since the trials are independent,
n−1
11 n−1 5 25 5
P (An ) = 1 − = .
36 36 36 36
The probability sought is
! ∞
25 n−1 5
∞ ∞
[ X X 5
P An = P (An ) = = .
n=1 n=1 n=1
36 36 11
Homework
Problem 4.3.1 An urn has three red marbles and two Problem 4.3.3 Six persons throw for a stake, which is to
white ones. Homer and Marge play alternately (Homer be won by the one who first throws head with a penny;
first, then Marge, then Homer, etc.) drawing marbles with if they throw in succession, find the chance of the fourth
replacement until one of them draws a white one, and person.
then the game ends. What is the probability that Homer
will eventually win?
Problem 4.3.4 Consider the following experiment: A fair
coin is flipped until heads appear, and the number of flips
Problem 4.3.2 Two people, X, Y, in order, roll a die. The is recorded. If this experiment is repeated three times,
first one to roll either a 3 or a 6 wins and the game is what is the probability that the result (number of flips) is
ended. the same all three times?
➊ What is the probability of throwing either a 3 or a
6? Problem 4.3.5 A game consists of looking for 7’s in rolls
➋ What is the probability that Y will win on the second of a pair of dice. What is the probability that it takes ten
throw? rolls in order to observe eight 7’s?
➌ What is the probability that Y will win on the fourth
throw?
➍ What is the probability that Y will win?
This makes sense, since for the r-th success to occur on the x-th
trial,
the first r − 1 successes must
x − 1 r−1
occur somewhere during the x − 1 first trials, with probability p (1 − p)x−r and the x-th
r−1
trial must be a success with probability p.
184 Example (The Problem of the Points) Consider a number of independent trials performed, each with
probability p of success. What is the probability of having r successes occurring before m failures?
◮Solution: Observe that r successes occur before m failure, if the last success occurs no
later than on the r + m − 1-th trial. The desired probability is thus
X n − 1
r+m−1
pr (1 − p)n−r .
n=r
r − 1
185 Example (Banach Matchbox Problem) A mathematician carries at all times two matchboxes, one
in his left pocket, and the other in his right pocket, each having initially N matches. Each time he
needs a match he reaches for either pocket with equal probability. At the moment when he first notices
that one of the matchboxes is empty, what is the probability that there are k matches (0 ≤ k ≤ N )
matches in the other pocket?
◮Solution: Let P (L = k) be the probability that there are k matches in the left pocket when
he first discovers that the right pocket is empty. Observe that this occurs on the N + 1 + N − k
trial. Thus 2N −k+1
2N − k 1
P (L = k) = ,
N 2
and the probability sought is hence
2N −k
2N − k 1
2P (L = k) = .
N 2
◭
Homework
Problem 4.4.1 A cholera patient lives in a building a dispenser at random and uses one sheet (OK, these
where his toilet stall has two dispensers (one on the left sheets are very large, but let’s continue with the prob-
and another one on the right of the toilet). Initially each lem. . . ). At a certain moment, he first realises that one of
roll has 100 sheets of paper. Each time he visits the toi- the dispensers is empty. What is the probability that the
let (which is often, given that he has cholera), he chooses other roll of paper has 25 sheets?
186 Definition Let C be a body in one dimension (respectively, two, or three dimensions) having positive
length meas (C) (respectively, positive area or positive volume). A continuous random variable X defined
on C is a random variable with probability given by
meas (A)
P (X ∈ A) = .
meas (C)
This means that the probability of of an event is proportional to the length (respectively, area or volume)
that this body A occupies in C.
187 Example A dartboard is made of three concentric circles of radii 3, 5, and 7, as in figure 5.1. A dart
is thrown and it is assumed that it always lands on the dartboard. Here the inner circle is blue, the
middle ring is white and the outer ring is red.
➊ The size of the sample space for this experiment is π(7)2 = 49π.
π(3)2 9
➋ The probability of landing on blue is = .
49π 49
π(5)2 − π(3)2 16
➌ The probability of landing on white is = .
49π 49
π(7)2 − π(5)2 24
➍ The probability of landing on red is = .
49π 49
3
5
7
Figure 5.1: Example 187
➋ lima→−∞ F (a) = 0,
➌ lima→+∞ F (a) = 1.
83
84 Chapter 5
P (X ≤ x) = κmeas (x) ,
where meas (x) denotes the area of the polygon in figure 189 up to abscissa x. Assume that P (X ≤ 0) =
0 and that P (X ≤ 6) = 1.
➊ Find the value of κ.
➋ Find P (X ≤ 2) .
➌ Find P (3 ≤ X ≤ 4) .
◮Solution:
1
➊ The figure is composed of a rectangle and a triangle, and its total area is (4)(2)+ (4)(5) =
2
1
8 + 10 = 18. Since 1 = P (X ≤ 6) = κmeas (6) = 18κ we have κ = .
18
➋ P (X ≤ 2) is the area of the rectangle between x = 0 and x = 2 and so P (X ≤ 2) =
1 4
(8) = .
18 9
➌ P (3 ≤ X ≤ 4) is the area of a trapezoid of bases of length 2.5 and 5 and height 1, thus
1 1 5 5
P (3 ≤ X ≤ 4) = · +5 = .
18 2 2 24
◭
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6 7
P (X ≤ x) = κA(x),
where A(x) denotes the area of the polygon in figure 190 up to abscissa x. Assume that P (X ≤ 0) = 0
and that P (X ≤ 7) = 1.
➎ Find P (1 ≤ X ≤ 2) .
➏ Find P (X ≥ 6) .
1
➐ Find a median m of X, that is, an abscissa that simultaneously satisfies P (X ≥ m) ≥ and
2
1
P (X ≤ m) ≥ .
2
◮Solution:
➊ In [0; 3] the figure is a triangle with base 3 and height 4, and so its area is 6. In [3; 5] the
figure is a rectangle, with base 2 and height 4, and so its area is 8. In [5; 6] the figure is a
rectangle, with base 1 and height 2, and so its area is 2. In [6; 7] the figure is a trapezium,
with bases 2 and 4 and height 1, and so its area is 3. Adding all these areas together we
obtain 6 + 8 + 2 + 3 = 19. Since
1 = P (X ≤ 7) = κA(7) = κ(19),
1
we obtain κ = .
19
6
➋ This measures the proportion of the area enclosed by the triangle, and so P (X ≤ 3) = .
19
➌ This measures the proportion of the area enclosed by the triangle and the first rectangle,
6 + 8 14
and so P (X ≤ 5) = = .
19 19
➍ This measures the proportion of the area enclosed by the triangle, and the first and second
6 + 8 + 2 16
rectangle, and so P (X ≤ 6) = = .
19 19
➎ The area sought is that of a trapezium. One (of many possible ways to obtain this) is to
observe that
P (1 ≤ X ≤ 2) = P (X ≤ 2) − P (X ≤ 1) .
To find P (X ≤ 2) observe that the triangle with base on [0; 4] is similar to the one with
h1 2 8
base on [0; 2]. If its height is h1 then = , whence h1 = , and
4 3 3
1 1 8 8
P (X ≤ 2) = ·2· = .
19 2 3 57
To find P (X ≤ 1) observe that the triangle with base on [0; 4] is similar to the one with
h2 1 4
base on [0; 1]. If its height is h2 then = , whence h2 = , and
4 3 3
1 1 4 2
P (X ≤ 1) = ·1· = .
19 2 3 57
Finally,
8 2 2
P (1 ≤ X ≤ 2) = P (X ≤ 2) − P (X ≤ 1) = − = .
57 57 19
➏ Since the curve does not extend from x = 7, we have
2
P (X ≥ 6) = P (6 ≤ X ≤ 7) = .
19
➐ From parts (2) and (3), 3 < m < 5. For m in this range, a rectangle with base m − 3 and
height 4 has area 4(m − 3). Thus we need to solve
1 6 + 4(m − 3)
= P (X ≤ m) = ,
2 19
which implies
19 31
= 6 + 4(m − 3) =⇒ m = = 3.875.
2 8
◭
l L
l
2
K
l l K L
2
Figure 5.4: Example 191 Figure 5.5: Example 192
191 Example A rod of length l is broken into three parts. What is the probability that these parts form
a triangle?
◮Solution: Let x, y, and l − x − y be the lengths of the three parts of the rod. If these parts
are to form a triangle, then the triangle inequality must be satisfied, that is, the sum of any two
sides of the triangle must be greater than the third. So we simultaneously must have
l
x + y > l − x − y =⇒ x + y > ,
2
l
x + l − x − y > y =⇒ y < ,
2
l
y + l − x − y > x =⇒ x < .
2
Since trivially 0 ≤ x + y ≤ l, what we are asking is for the ratio of the area of the region
l l l
A = {(x, y) : 0 < x < ,0 < y < ,x + y > }
2 2 2
to that of the triangle with vertices at (0, 0), (l, 0) and (0, l). This is depicted in figure 5.4. The
desired probability is thus
l2
8 = 1.
l2 4
2
◭
192 Example Two points are chosen at random on a segment of length L. Find the probability that the
distance between the points is at most K, where 0 < K < L.
Homework
Problem 5.0.2 A point (x, y) are chosen at random on tive real numbers uniformly√at random,
√ for instance, into
a rectangle 5 feet by 3 feet. What is the probability that 2.03 and 0.47 or into 2.5 − 3 and 3. Then each of the
their coordinates are within one foot of each other? parts is rounded to the nearest integer, for instance 2 and
0 in the first case above and 1 and 2 in the second. What
is the probability that the two numbers so obtained will
Problem 5.0.3 The amount 2.5 is split into two nonnega- add up to 3?
194 Example A player is paid $1 for getting heads when flipping a fair coin and he loses $0.50 if he gets
tails.
➊ Let G denote the random variables measuring his gain. What is the image of G?
◮Solution:
195 Example A player is playing with a fair die. He gets $2 if the die lands on a prime, he gets nothing
if the die lands on 1, and he loses $1 if the die lands on a composite number.
➊ Let G denote the random variables measuring his gain. What is the image of G?
◮Solution:
196 Example A player chooses, without replacement, two cards from a standard deck of cards. He gets
$2 for each heart suit card.
88
Expectation and Variance 89
➊ Let G denote the random variables measuring his gain. What is the image of G?
◮Solution:
➊ G can either be 0, 1 or 2.
➋
13 39
0 2 19
P (G = 0) = = ,
52 34
2
13 39
1 1 13
P (G = 1) = = ,
52 34
2
and
13 39
2 0 1
P (G = 2) = = .
52 17
2
➌
13 2 1
E (G) = 0P (G = 0) + 1P (G = 1) + 2P (G = 2) = 0 + + = .
34 17 2
◭
197 Definition Let X be a discrete random variable taking on the values x1 , x2 , . . . , xk , . . .. Then E X2
is defined by
∞
X
E X2 = x2k P (X = xk ) .
k=1
198 Definition Let X be a random variable. The variance var (X) of X is defined by
var (X) = E X2 − (E (X))2 .
X P (X)
−1 2k
1 3k
2 4k
➌ Find E (X).
➍ Find E X2 .
◮Solution:
1
2k + 3k + 4k = 1 =⇒ k = .
9
➋
2
P (X = −1) = 2k = ,
9
3
P (X = 1) = 3k = ,
9
4
P (X = 2) = 4k = .
9
➌
2 3 4
E (X) = −1P (X = −1) + 1P (X = 1) + 2P (X = 2) = −1 · +1· +2· = 1.
9 9 9
➍
2 3 4 21
E X2 = (−1)2 P (X = −1) + 12 P (X = 1) + 22 P (X = 2) = 1 · + 1 · + 4 · = .
9 9 9 9
➎
21 4
var (X) = E X2 − (E (X))2 = − 12 = .
9 3
◭
200 Example John and Peter play the following game with three fair coins: John plays a stake of $10
and tosses the three coins in turn. If he obtains three heads, his stake is returned together with a prize
of $30. For two consecutive heads, his stake money is returned, together with a prize of $10. In all
other cases, Peter wins the stake money. Is the game fair?
◮Solution: The game is fair if the expected gain of both players is the same. Let J be the
random variable measuring John’s gain and let P be the random variable measuring Peter’s
gain. John wins when the coins shew HHH, HHT, T HH. Thus
201 Example There are eight socks in a box, of which four are white and four are black. Socks are
drawn one at a time (without replacement) until a pair is produced. What is the expected value of
drawings? (Clearly, this number should be between 2 and 3.)
◮Solution: Let X be the random variable counting the number of drawings. Now, X = 2
means that matching socks are obtained when 2 socks are drawn. Hence
2 4
1 2 3
P (X = 2) = = ,
8 7
2
4
and thus P (X = 3) = . Therefore
7
3 4 18
EX = 2P (X = 2) + 3P (X = 3) = 2 · +3· = .
7 7 7
◭
202 Example Suppose that a player starts with a fortune of $8. A fair coin is tossed three times. If
the coin comes up heads, the player’s fortune is doubled, otherwise it is halved. What is the player’s
expected fortune?
Homework
Problem 6.1.1 A fair die is tossed. If the resulting num- Problem 6.1.2 A casino game consists of a single toss
ber is even, you multiply your score by 2 and get that of a fair die and pays off as follows: if the die comes up
many dollars. If the resulting number is odd, you add 1 with an odd number, the player is paid that number of
to your score and get that many dollars. Let X be the dollars (i.e., $1 for rolling a 1, $3 for rolling a 3, and $5 for
random variable counting your gain, in dollars. rolling a 5), and if an even number comes up the player is
paid nothing. What fee should the casino charge to play
➊ Give the range of X.
the game to make it exactly fair?
➋ Give the distribution of X.
➌ Find E (X).
➍ Find var (X). Problem 6.1.3 At a local carnival, Osa pays $1 to play a
game in which she chooses a card at random from a stan-
dard deck of 52 cards. If she chooses a heart, then she
receives $2 (that is, $1 plus her initial bet of $1). If she where k = 1, 2, 3, 4, 5, 6. Another die is loaded differently,
chooses the Queen of Spades she receives $13. Which of so that if X is the random variable giving the score on the
the following is closest to Osa’s expected net profit from k2
die, then P (X = k) = .
playing the game? 91
➊ Find the expectation E (D + X).
Problem 6.1.4 Consider the random variable X with
distribution table as follows. ➋ Find the variance var (D + X).
X P (X)
Problem 6.1.7 John and Peter each put $1 into a pot.
They then decide to throw a pair of dice alternately (John
−2 0.3 plays first, Peter second, then John again, etc.). The first
one who throws a 5 wins the pot. How much money
−1 k should John add to the pot in order to make the game
fair?
0 5k
Problem 6.1.6 A die is loaded so that if D is the random with k = 7, n = 20 we have S = 12. Shew that the aver-
k 2k(n − k)
variable giving the score on the die, then P (D = k) = , age value of S is .
21 n
◮Solution: Let Xi = 0 if the i-th pair does not come back, and Xi = 1 if it does. We want
21
and the required expectation is .◭
11
204 Example A standard deck of cards is turned face up one card at a time. What is the expected
number of cards turned up in order to obtain a king?
◮Solution: (1) Consider the 48 cards which are not kings and for 1 ≤ i ≤ 48 put
1 if the i−th non − king appears before a king.
Xi =
0 otherwise
Then
48
X
X =1+ Xi
i=1
1
is the number of cards turned up in order to obtain a king. Let us prove that P (Xi = 1) = .
5
To this end, paint card i blue, then we have 47 cards which are not kings, card i, and 4 kings.
52!
The experiment consists in permuting all these cards, which can be done in ways. A
47!4!
favourable arrangement has the form
where the B is the blue card, K is a king, and xn can be any of the of the 47 other non-Kings.
The number of favourable arrangements
is
thus the number of non-negative integral solutions
47 + 6 − 1 52!
to x1 + · · · + x6 = 47, which is = . Hence
5 5!47!
52!
5!47! 1
P (Xi = 1) = = .
52! 5
4!47!
Notice that
1 48 53
P (Xi = 1) = =⇒ EX = 1 + = .
5 5 5
◭
205 Example An urn contains 30 cards: two numbered 1, two numbered 2, . . . , two numbered 15. Ten
cards are drawn at random from the urn. What is the expected number of pairs remaining in the urn?
Then
28 2 28!
10 2 18!10! 38
P (Xi = 1) = = = ,
30 30! 87
10 20!18!
15 · 38 190
and the desired expectation is = .◭
87 29
Homework
Problem 6.2.1 A standard deck of cards is turned face boys that are selected and let Y denote the number of
up one card at a time. What is the expected number of girls that are selected. Find E(X − Y ).
cards turned up in order to obtain a heart?
◮Solution:
1 7 1 21
EX = P (H) P (X|H) + P (T) P (X|T) = · + ·7 = .
2 2 2 4
◭
207 Example In the city of Jerez de la Frontera, in Cádiz, Spain, true sherry is made according to a
multistage system called Solera. Assume that a winemaker has three barrels, A, B, and C. Every year,
a third of the wine from barrel C is bottled and replaced by wine from B; then B is topped off with a
third of the wine from A; finally A is topped off with new wine. Find the mean of the age of the wine in
each barrel, under the assumption that the operation has been going on since time immemorial.
◮Solution: We start with barrel A. Abusing notation, we will let A the random variable
indicating the number of years of wine in barrel A, etc. After the transfer has been made, the
mean age of the new wine is 0 years and the mean age of the old wine is a year older than
what it was. Hence
1 2 1 2 1 2
A= Anew + Aold =⇒ EA = EAnew + EAold =⇒ EA = · 0 + (1 + EA) =⇒ EA = 2.
3 3 3 3 3 3
Thus EAold = 3. Now,
1 2 1 2 1 2 3 2
B= Bnew + Bold = Aold + Bold =⇒ EB = ·3+ EBold =⇒ EB = + (1+EB) =⇒ EB = 5.
3 3 3 3 3 3 3 3
Hence, EBold = 6. Similarly,
1 2 1 2 1 2 6 2
C= Cnew + Cold = Bold + Cold =⇒ EC = ·6+ ECold =⇒ EC = + (1+EC) =⇒ EC = 8.
3 3 3 3 3 3 3 3
◭
Homework
Problem 6.3.1 A fair coin is tossed repeatedly until heads within the first flip, what is the expected number
heads is produced. If it is known that the coin produces of flips to produce the first heads?
1.1.1 2A = {∅, {a}, {b}, A} so card 2A = 4.
1.1.2 {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, and {2, 3, 4}, whence card (A) = 4.
1.1.5 Yes. The first is the empty set, and has 0 elements. The second is a set containing the empty set, and hence it has 1
element.
Let the sum of the elements be S. Observe that we obtain S by also adding backwards, Adding,
= 67 · 398,
whence
67 · 398
S= = 13333.
2
1.2.1 {HH, HT , T H, T T }
1.2.2 We have
X = {(1, 6), (2, 3), (3, 2), (6, 1)}
T = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (3, 1)}
U = ∅
1.2.3 R denotes a red marble and B denotes a blue one. The sample space is Ω = {BRR, RBR, RRB, BBR, BRB, RBB, RRR}.
1.2.4 Let S1 , S2 represent the Spanish novels, I the Italian novel, and G the German book. Then the sample space has 24
elements:
Ω = {S1 S2 IG, S1 S2 GI, IGS1 S2 , GIS1 S2 , S1 IGS2 , S1 GIS2 , S1 IS2 G, S1 GS2 I, IS1 S2 G, GS1 S2 I, S1 GS2 I, S1 IS2 G,
S2 S1 IG, S2 S1 GI, IGS2 S1 , GIS2 S1 , S2 IGS1 , S2 GIS1 , S2 IS1 G, S2 GS1 I, IS2 S1 G, GS2 S1 I, S2 GS1 I, S2 IS1 G}.
1.2.5 Let P, N, D, Q represent a penny, a nickel, a dime, and a quarter, respectively. Then
1. this is {QP, P Q},
2. this is the null event ∅,
3. this is {P D, DP, N N, N D, DN }.
95
96 Appendix A
➋ {2} ∪ {1, 3}
➌ {3} ∪ {1, 2}
➍ {1} ∪ {2} ∪ {3}
1.3.2 A
1.3.3 B
1.3.4 A ∩ B
1.3.6 (A \ B) ∪ (B \ A) ∪ (A ∩ B)
1.3.9 We have
➊ (A ∩ B ∩ C c ) ∪ (A ∩ B c ∩ C) ∪ (Ac ∩ B ∩ C) ∪ (A ∩ B ∩ C).
➋ (A ∩ B c ∩ C c ) ∪ (Ac ∩ B c ∩ C) ∪ (Ac ∩ B c ∩ C) ∪ (Ac ∩ B c ∩ C c ).
1.3.10 We have
➊ {1, 4, 6, 8, 9, 10, 12, 14, 15}
➋ {4, 6, 8, 10, 12, 14, 16}
➌ {4, 6, 8, 10, 12, 14}
1.3.11 The progression in A has common difference 10 and the one in B has common difference 12. Observe that the smallest
element they share is 13, and hence, they will share every lcm[10, 12] = 60 elements, starting with 13. We now want the largest
k so that
13 + 60k ≤ 361,
where we have chosen 361 since it is the minimum of 361 and 456. Solving,
361 − 13
k≤T U = 5.
60
Hence there are 5 + 1 = 6 elements in the intersection. They are
A ∩ B = {13, 73, 133, 193, 253, 313}.
1.3.12 B ⊆ A.
1.3.13 A ⊆ B.
1.3.14 B ∪ C ⊆ A.
= 57 − 27
= 30.
➐ We want
card ((A3 ∪ A5 ) \ (A3 ∩ A5 )) = card ((A3 ∪ A5 ))
−card (A3 ∩ A5 )
= 27 − 3
= 24.
2.1.2 We have
100
➊ T U= 50
2
100
➋ T U= 33
3
100
➌ T U= 14
7
100
➍ T U= 16
6
100
➎ T U= 7
14
100
➏ T U= 4
21
100
➐ T U=2
42
➑ 100 − 50 − 33 − 14 + 16 + 7 + 4 − 2 = 28
➒ 16 − 2 = 14
➓ 52
2.1.3 52%
2.1.4 Let A be the set of students liking Mathematics, B the set of students liking theology, and C be the set of students liking
alchemy. We are given that
card (A) = 14, card (B) = 16,
card (C) = 11, card (A ∩ B) = 7, card (B ∩ C) = 8, card (A ∩ C) = 5,
and
card (A ∩ B ∩ C) = 4.
By the Principle of Inclusion-Exclusion,
−card (A ∩ B ∩ C) .
2.1.5 We have
➊ 31
➋ 10
➌ 3
➍ 3
➎ 1
➏ 1
➐ 1
➑ 960
2.1.6 Let Y, F, S, M stand for young, female, single, male, respectively, and let H stand for married.1 We have
= card (Y ) − card (Y ∩ M )
−(card (Y ∩ H) − card (Y ∩ H ∩ M ))
= 880.
2.1.7 34
2.1.8 30; 7; 5; 18
2.1.9 4
2.1.10 Let C denote the set of people who like candy, I the set of people who like ice cream, and K denote the set of people
who like cake. We are given that card (C) = 816, card (I) = 723, card (K) = 645, card (C ∩ I) = 562, card (C ∩ K) = 463,
card (I ∩ K) = 470, and card (C ∩ I ∩ K) = 310. By Inclusion-Exclusion we have
+card (C ∩ I ∩ K)
= 999.
The investigator miscounted, or probably did not report one person who may not have liked any of the three things.
1 Or H for hanged, if you prefer.
−card (B ∪ C) − 199
= 97.
By letting
A = {1, 2, . . . , 100}, B = {3, 4, . . . , 102},
and
C = {1, 2, 3, 4, 5, 6, . . . , 101, 102}
we see that the bound card (A ∩ B ∩ C) = card ({4, 5, 6, . . . , 100}) = 97 is achievable.
2.1.12 One computes the sum of all integers from 1 to 1000 and weeds out the sum of the multiples of 3 and the sum of the
multiples of 5, but puts back the multiples of 15, which one has counted twice. The desired sum is
(1 + 2 + 3 + · · · + 1000) − (3 + 6 + 9 + · · · + 999)
−(5 + 10 + 15 + · · · + 1000)
+(15 + 30 + 45 + · · · + 990)
−5(1 + 2 + 3 + · · · + 200)
+15(1 + 2 + 3 + · · · + 66)
= 500500 − 3 · 55611
−5 · 20100 + 15 · 2211
= 266332
2.1.13 Let A denote the set of those who lost an eye, B denote those who lost an ear, C denote those who lost an arm and D
denote those losing a leg. Suppose there are n combatants. Then
n ≥ card (A ∪ B)
n ≥ card (C ∪ D)
card (C ∩ D) ≥ .65n.
This means that
n ≥ card ((A ∩ B) ∪ (C ∩ D))
2.2.2 I can choose a right shoe in any of nine ways, once this has been done, I can choose a non-matching left shoe in eight
ways, and thus I have 72 choices.
Aliter: I can choose any pair in 9 × 9 = 81 ways. Of these, 9 are matching pairs, so the number of non-matching pairs is
81 − 9 = 72.
2.2.5 The number of different license plates is the number of different four-tuples (Letter 1 , Letter 2 , Digit 1 , Digit 2 ). The first
letter can be chosen in 26 ways, and so we have
26 .
26 26 .
26 26 10 .
26 26 10 10 .
By the multiplication principle, the number of different four-tuples is 26 · 26 · 10 · 10 = 67600.
26 26 10 9 ,
since after a digit has been used for the third position, it cannot be used again. Thus this can be done in 26 · 26 · 10 · 9 = 60840
ways.
(ii) In this case we have a grid like
26 25 10 10 ,
since after a letter has been used for the first position, it cannot be used again. Thus this can be done in 26 · 25 · 10 · 10 = 65000
ways.
(iii) After a similar reasoning, we obtain a grid like
26 25 10 9 .
Thus this can be done in 26 · 25 · 10 · 9 = 58500 ways.
2.2.7 [1] 8, [2] 52 32 = 225, [3] 52 · 3 · 2 = 150, [4] 5 · 4 · 32 = 180, [5] 8 · 7 · 6 · 5 = 1680.
2.2.8 432
2.2.9 Solution:
➊ The first letter can be one of any 4 ways. After choosing the first letter, we have 3 choices for the second letter, etc.. The
total number of words is thus 4 · 3 · 2 · 1 = 24.
➋ The first letter can be one of any 4. Since we are allowed repetitions, the second letter can also be one of any 4, etc.. The
total number of words so formed is thus 44 = 256.
2.2.10 The last digit must perforce be 5. The other five digits can be filled with any of the six digits on the list: the total number
is thus 65 .
2.2.11 We have
➊ This is 5 · 86 = 1310720.
➋ This is 5 · 7 · 6 · 5 · 4 · 3 · 2 = 25200.
➌ This is 5 · 85 · 4 = 655360.
➍ This is 5 · 85 · 4 = 655360.
➎ We condition on the last digit. If the last digit were 1 or 5 then we would have 5 choices for the first digit, and so we would
have
5 · 6 · 5 · 4 · 3 · 2 · 2 = 7200
phone numbers. If the last digit were either 3 or 7, then we would have 4 choices for the last digit and so we would have
4 · 6 · 5 · 4 · 3 · 2 · 2 = 5760
phone numbers. Thus the total number of phone numbers is
7200 + 5760 = 12960.
2.2.13 For the leftmost digit cannot be 0 and so we have only the nine choices
{1, 2, 3, 4, 5, 6, 7, 8, 9}
for this digit. The other n − 1 digits can be filled out in 10 ways, and so there are
9 · 10 · · · 10 = 9 · 10n−1 .
| {z }
n−1 10′ s
2.2.14 The leftmost digit cannot be 0 and so we have only the nine choices
{1, 2, 3, 4, 5, 6, 7, 8, 9}
for this digit. If the integer is going to be even, the last digit can be only one of the five {0, 2, 4, 6, 8}. The other n − 2 digits can
be filled out in 10 ways, and so there are
9 · 10 · · · 10 ·5 = 45 · 10n−2 .
| {z }
n−2 10′ s
2.2.16 One can choose the last digit in 9 ways, one can choose the penultimate digit in 9 ways, etc. and one can choose the
second digit in 9 ways, and finally one can choose the first digit in 9 ways. The total number of ways is thus 9n .
2.2.17 m2 , m(m − 1)
2.2.18 We will assume that the positive integers may be factorised in a unique manner as the product of primes. Expanding the
product
(1 + 2 + 22 + · · · + 28 )(1 + 3 + 32 + · · · + 39 )(1 + 5 + 52 )
each factor of 28 39 52 appears and only the factors of this number appear. There are then, as many factors as terms in this
product. This means that there are (1 + 8)(1 + 9)(1 + 3) = 320 factors.
The sum of the divisors of this number may be obtained by adding up each geometric series in parentheses. The desired sum
is then
29 − 1 310 − 1 53 − 1
· · = 467689684.
2−1 3−1 5−1
☞ A similar argument gives the following. Let p1 , p2 , . . . , pk be different primes. Then the integer
a
n = pa1 a2
1 p2 · · · pk
k
has
d(n) = (a1 + 1)(a2 + 1) · · · (ak + 1)
positive divisors. Also, if σ(n) denotes the sum of all positive divisors of n, then
a1 +1 a2 +1 a +1
p1 − 1 p2 −1 p k −1
σ(n) = · ··· k .
p1 − 1 p2 − 1 pk − 1
2.2.19 The 96 factors of 295 are 1, 2, 22 , . . . , 295 . Observe that 210 = 1024 and so 220 = 1048576. Hence
219 = 524288 < 1000000 < 1048576 = 220 .
The factors greater than 1, 000, 000 are thus 220 , 221 , . . . 295 . This makes for 96 − 20 = 76 factors.
2.2.21 16
2.2.23 There are 589 such values. The easiest way to see this is to observe that there is a bijection between the divisors of n2
which are > n and those < n. For if n2 = ab, with a > n, then b < n, because otherwise n2 = ab > n · n = n2 , a contradiction.
Also, there is exactly one decomposition n2 = n · n. Thus the desired number is
d(n2 ) (63)(39)
T U + 1 − d(n) = T U + 1 − (32)(20) = 589.
2 2
2.2.24 The total number of sequences is 3n . There are 2n sequences that contain no 0, 1 or 2. There is only one sequence
that contains only 1’s, one that contains only 2’s, and one that contains only 0’s. Obviously, there is no ternary sequence that
contains no 0’s or 1’s or 2’s. By the Principle of Inclusion-Exclusion, the number required is
3n − (2n + 2n + 2n ) + (1 + 1 + 1) = 3n − 3 · 2n + 3.
2.2.25 The conditions of the problem stipulate that both the region outside the circles in diagram 2.3 and R3 will be empty. We
are thus left with 6 regions to distribute 100 numbers. To each of the 100 numbers we may thus assign one of 6 labels. The
number of sets thus required is 6100 .
2.3.1 21
2.3.2 56
2.3.3 There are 262 − 252 = 51 using two letters with at least one of the letters a D, since from the total of 262 we delete the
252 that do not have a D. Similarly, there are 263 − 253 with three letters, with at least one of the letters a D. Thus there is a
total of (262 − 252 ) + (263 − 253 ) = 2002.
Aliter: The ones with two initials are of the form D, D, or DD, where is any of the 25 letters not D. Hence there are
25 + 25 + 1 = 51 with two letters. The ones with three letters are of the form DDD, DD, DD, DD, D, D, D, and
hence there are
1 + 3 · 25 + 3 · 252 = 1951.
Altogether there are
51 + 1951 = 2002,
like before.
2.3.4
9+9·9
+9 · 9 · 8 + 9 · 9 · 8 · 7
+9 · 9 · 8 · 7 · 6 + 9 · 9 · 8 · 7 · 6 · 5
+9 · 9 · 8 · 7 · 6 · 5 · 4 + 9 · 9 · 8 · 7 · 6 · 5 · 4 · 3
+9 · 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2
+9 · 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1
= 8877690
2.3.5 2 + 4 + 8 + 16 = 30.
2.3.7 We condition on the first digit, which can be 4, 5, or 6. If the number starts with 4, in order to satisfy the conditions
of the problem, we must choose the last digit from the set {0, 2, 6, 8}. Thus we have four choices for the last digit. Once this
last digit is chosen, we have 8 choices for the penultimate digit and 7 choices for the antepenultimate digit. There are thus
4 × 8 × 7 = 224 even numbers which have their digits distinct and start with a 4. Similarly, there are 224 even numbers will all
digits distinct and starting with a 6. When they start with a 5, we have 5 choices for the last digit, 8 for the penultimate and 7
for the antepenultimate. This gives 5 × 8 × 7 = 280 ways. The total number is thus 224 + 224 + 280 = 728.
2.3.9 4
2.3.10 There is 1 such number with 1 digit, 10 such numbers with 2 digits, 100 with three digits, 1000 with four digits, etc.
Starting with 2 and finishing with 299 we have used 1 · 1 + 2 · 10 + 3 · 100 = 321 digits. We need 1978 − 321 = 1657 more
1657
digits from among the 4-digit integers starting with 2. Now T U = 414, so we look at the 414th 4-digit integer starting with 2,
4
namely, at 2413. Since the 3 in 2413 constitutes the 321 + 4 · 414 = 1977-th digit used, the 1978-th digit must be the 2 starting
2414.
2.3.11 19990
2.3.13 8
2.3.14 4095
2.3.15 144
2.3.16 Observe that there are 9 × 10n−1 palindromes of n digits. The number 1003001 has seven digits. After writing 999999,
the last palindrome with six digits, one has written
9 + 9 + 90 + 90 + 900 + 900 = 1998
palindromes. The 1999-th, 2000-th, 2001-st and 2002-nd are thus
1000001, 1001001, 1002001, 1003001,
and so 1003001 occupies the 2002-nd position.
2.3.17 There are none used when writing the numbers from 1 through 9.
When writing the numbers from 10 to 99, there are 9 zeroes used, when writing {10, 20, . . . , 90}.
When writing a three-digit integer ABC (numbers in the 100-999 range), one can use either one or two zeroes. If ABC has
exactly one zero, then it is either B or C. If one of B or C is 0, then there are 9 choices for the other and 9 for A. Thus of the
numbers ABC there are 9 · 9 · 2 = 162 that use exactly one 0. If ABC has exactly two 0’s then B and C must be 0 and there are 9
choices for A. Those 9 numbers use 2 · 9 = 18 zeroes. Thus in this range we have used 162 + 18 = 180 zeroes.
A number in the 1000-1999 range has the form 1ABC. When writing them, one may use exactly one, two, or three zeroes. If
there is only exactly one zero, then exactly one of A, B, or C, is 0, and since there are 9 choices for each of the other two letters,
one has used 9 · 9 · 3 = 243 zeroes this way. If there are exactly two zeroes, then either A and B, or A and C, or B and C, are zero,
and there are 9 for the remaining letter. Therefore there are 9 · 3 = 27 numbers with 2 zeroes and 27 · 2 = 54 zeroes are used. Also,
there is exactly one number in the 1000-1999 range using 3 zeroes. Altogether in this range we have used 243 + 54 + 3 = 300
zeroes in this range.
Finally, in the range 2000-2007, there is one number using 3 zeroes, and 7 numbers using 2 zeroes. Hence in this range we
have used 3 + 2 × 7 = 17 zeroes.
2.3.18 Observe that we need x > y. Since x2 − y 2 = 81 ⇐⇒ (x + y)(x − y) = 81, we examine the positive divisors of 81. We
need
x + y = 81, x − y = 1, x + y = 27, x − y = 3, x + y = 9, x − y = 9.
Hence, by inspection, the following solutions lie on the first quadrant,
(41, 40), (15, 12),
and the solution (9, 0) lies on the x-axis. Thus on each quadrant there are two solutions, and a solution each on the positive
and the negative portion of the x-axis, giving a total of
4 · 2 + 2 = 10
solutions.
2.3.19 Choose a specific colour for the upper face of the cube, say A. Then we have five choices for colouring the lower face of
the cube, say with colour B. Rotate the cube so that some colour C is facing us. Now the remaining sides are fixed with respect
to these three. We can distribute the three colours in 3 × 2 × 1 = 6 ways, giving 5 × 6 = 30 possibilities.
2.3.20 Put the 6 in any of the 6 faces, leaving five faces. You have only one face to put the 1 (opposite of the 6), leaving 4 faces.
Put the 4 in any of the 4 remaining faces, leaving 3 faces. You must put the 3 in the opposite face, leaving 2 faces. You can now
put the 2 in any of the two remaining faces, and in the last face you put the 5. In total you have 6 · 4 · 2 = 48 different dice.
2.3.21 First observe that 1 + 7 = 3 + 5 = 8. The numbers formed have either one, two, three or four digits. The sum of the
numbers of 1 digit is clearly 1 + 7 + 3 + 5 = 16.
There are 4 × 3 = 12 numbers formed using 2 digits, and hence 6 pairs adding to 8 in the units and the tens. The sum of
the 2 digits formed is 6((8)(10) + 8) = 6 × 88 = 528.
There are 4 × 3 × 2 = 24 numbers formed using 3 digits, and hence 12 pairs adding to 8 in the units, the tens, and the
hundreds. The sum of the 3 digits formed is 12(8(100) + (8)(10) + 8) = 12 × 888 = 10656.
There are 4 × 3 × 2 · 1 = 24 numbers formed using 4 digits, and hence 12 pairs adding to 8 in the units, the tens the
hundreds, and the thousands. The sum of the 4 digits formed is 12(8(1000) + 8(100) + (8)(10) + 8) = 12 × 8888 = 106656.
➋ If |a − b| = 1, then we have
{1, 2}, {2, 3}, {3, 4}, . . . , {49, 50},
or 49 pairs. If |a − b| = 2, then we have
{1, 3}, {2, 4}, {3, 5}, . . . , {48, 50},
or 48 pairs. If |a − b| = 3, then we have
{1, 4}, {2, 5}, {3, 6}, . . . , {47, 50},
or 47 pairs. If |a − b| = 4, then we have
{1, 5}, {2, 6}, {3, 7}, . . . , {46, 50},
or 46 pairs. If |a − b| = 5, then we have
{1, 6}, {2, 7}, {3, 8}, . . . , {45, 50},
or 45 pairs.
The total required is thus
49 + 48 + 47 + 46 + 45 = 235.
2.3.23 If x = 0, put m(x) = 1, otherwise put m(x) = x. We use three digits to label all the integers, from 000 to 999 If a, b, c are
digits, then clearly p(100a + 10b + c) = m(a)m(b)m(c). Thus
p(000) + · · · + p(999) = m(0)m(0)m(0) + · · · + m(9)m(9)m(9),
which in turn
= (m(0) + m(1) + · · · + m(9))3
= (1 + 1 + 2 + · · · + 9)3
= 463
= 97336.
Hence
S = p(001) + p(002) + · · · + p(999)
= 97336 − p(000)
= 97336 − m(0)m(0)m(0)
= 97335.
2.3.24 Points 16, 17, . . . , 48 are 33 in total and are on the same side of the diameter joining 15 to 49. For each of these points
there is a corresponding diametrically opposite point. There are thus a total of 2 · 33 + 2 = 68 points.
2.3.25 There are 27 different sums. The sums 1 and 27 only appear once (in 100 and 999), each of the other 25 sums appears
thrice. Thus if 27 + 25 + 1 = 53 are drawn, at least 3 chips will have the same sum.
2.3.26 The shortest equality under the stated conditions must involve 3 numbers, and hence a maximum of 33 equalities can
be achieved. The 33 equalities below shew that this maximum can be achieved.
1 + 75 = 76 23 + 64 = 87 45 + 53 = 98
3 + 74 = 77 25 + 63 = 88 47 + 52 = 99
5 + 73 = 78 27 + 62 = 89 49 + 51 = 100
7 + 72 = 79 29 + 61 = 90 24 + 26 = 50
9 + 71 = 80 31 + 60 = 91 20 + 28 = 48
11 + 70 = 81 33 + 59 = 92 16 + 30 = 46
13 + 69 = 82 35 + 58 = 93 12 + 32 = 44
15 + 68 = 83 37 + 57 = 94 8 + 34 = 42
17 + 67 = 84 39 + 56 = 95 2 + 38 = 40
19 + 66 = 85 41 + 55 = 96 4 + 6 = 10
21 + 65 = 86 43 + 54 = 97 14 + 22 = 36
2.3.27 Since a + d = b + c, we can write the four-tuple (a, b, c, d) as (a, b, c, d) = (a, a + x, a + y, a + x + y), with integers
x, y, 0 < x < y. Now, 93 = bc − ad = (a + x)(a + y) − a(a + x + y) = xy. Thus either (x, y) = (1, 93) or (x, y) = (3, 31). In
the first case
(a, b, c, d) = (a, a + 1, a + 93, a + 94)
is in the desired range for 1 ≤ a ≤ 405. In the second case,
(a, b, c, d) = (a, a + 3, a + 31, a + 34)
is in the desired range for 1 ≤ a ≤ 465. These two sets of four-tuples are disjoint, and so the sought number of four-tuples is
870.
2.3.28 Let m be the largest member of the set and let n be its smallest member. Then m ≥ n + 99 since there are 100 members
in the set. If the triangle with sides n, n, m is non-obtuse then m2 ≤ 2n2 from where
√
(n + 99)2 ≤ 2n2 ⇐⇒ n2 − 198n − 992 ≥ 0 ⇐⇒ n ≥ 99(1 + 2) ⇐⇒ n ≥ 240.
If n < 240 the stated condition is not met since m2 ≥ (n + 99)2 ≥ 2n2 and the triangle with sides of length n, n, m is not
obtuse. Thus the set
A = {240, 241, 242, . . . , 339}
achieves the required minimum. There are 1003 = 1000000 triangles that can be formed with length in A and so 3000000 sides
to be added. Of these 3000000/100 = 30000 are 240, 30000 are 241, etc. Thus the value required is
100(240 + 339)
30000(240 + 241 + · · · + 339) = (30000) = 868500000.
2
2.3.30 Observe that person d changes the status of door n if and only if d divides n. Each divisor d of n can be paired off with
n n
, and unless d = , n would have an even number of divisors. Thus the doors closed are those for which n has an odd number
d d
of divisors, i.e. d2 = n, or n is a square. Hence doors 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 are closed.
2.3.31 Assume x2 + x − n = (x + a)(x − b), with 1 ≤ ab ≤ 100, and a − b = 1. This means that b = a − 1, and so we
need integers a such that 1 ≤ a(a − 1) ≤ 100. If a > 0, then 2 ≤ a ≤ 10, and there are 9 possibilities for n. If a < 0, then
−9 ≤ a ≤ −1, give the same 9 possibilities for n. Conclusion: there are 9 possibilities for n.
2.3.32 We condition on a, which can take any of the values a = 1, 2, . . . , 100. Given a, b can be any of the 101 − a values in
{a + 1, a + 2, . . . , 101}. Similarly, c can be any of the 101 − a values in {a + 1, a + 2, . . . , 101}. Given a then, b and c may be
chosen in (101 − a)(101 − a) = (101 − a)2 ways. The number of triplets is therefore
P100
a=1 (101 − a)2 = 1002 + 992 + 982 + · · · + 12
100(100 + 1)(2(100) + 1)
=
6
= 338350.
2.3.33 There are 9 · 10j−1 j-digit positive integers. The total number of digits in numbers with at most r digits is the arithmetic-
geometric sum
j
X 10r − 1
g(r) = j · 9 · 10j−1 = r10r − .
j=1
9
10r − 1
As 0 < < 10r , we get
9
(r − 1)10r < g(r) < r10r .
Thus g(1983) < 1983 · 101983 < 104 101983 = 101987 and g(1984) > 1983 · 101984 > 103 101984 = 101987. Therefore
f (1987) = 1984.
2.4.1 120
2.4.4 1440
2.4.5 128
2.4.6 81729648000
2.4.7 249
2.4.8 We have
➊ This is 8!.
➋ Permute XY in 2! and put them in any of the 7 spaces created by the remaining 6 people. Permute the remaining 6
people. This is 2! · 7 · 6!.
➌ In this case, we alternate between sexes. Either we start with a man or a woman (giving 2 ways), and then we permute the
men and the women. This is 2 · 4!4!.
➍ Glue the couples into 4 separate blocks. Permute the blocks in 4! ways. Then permute each of the 4 blocks in 2!. This is
4!(2!)4 .
➎ Sit the women first, creating 5 spaces in between. Glue the men together and put them in any of the 5 spaces. Permute
the men in 4! ways and the women in 4!. This is 5 · 4!4!.
2.5.1 1816214400
2.5.2 548
2.5.3 18
2.5.5
10!
1.
2!3!5!
5!
2.
2!3!
8!
3.
3!5!
2.5.6 We have
➊ This is
10!
4!3!2!
➋ This is
9!
4!3!2!
➌ This is
8!
2!3!2!
2.5.7 36
2.5.8 25
7
2.6.2 = 21
2
75
2.6.3 = (7)(10) = 70
1 3
N
2.6.4
2
8
2.6.5 4! = 1680
4
25
2.6.6 = 300
2
4
2.6.7 Let the subsets be A and B. We have either card (A) = 1 or card (A) = 2. If card (A) = 1 then there are = 4 ways of
3 4 1
choosing its elements and = 1 ways of choosing the elements of B. If card (A) = 2 then there are = 6 ways of choosing
2 3 2
its elements and = 1 ways of choosing the elements of B. Altogether there are 4 + 6 = 10 ways.
2
6
2.6.8 = 20
3
2.6.9 We count those numbers that have exactly once, twice and three times. There is only one number that has it thrice
3
(namely 333). Suppose the number xyz is to have the digit 3 exactly twice. We can choose these two positions in ways.
2 3
The third position can be filled with any of the remaining nine digits (the digit 3 has already been used). Thus there are 9
3 2
numbers that the digit 3 exactly twice. Similarly, there are 92 numbers that have 3 exactly once. The total required is hence
3 3 2
3·1+2·9· + 92 = 300.
2 1
5
2.6.10 = 10
3
5 5 5
2.6.11 + + = 5 + 10 + 1 = 16.
1 3 5
2.6.12 10 × 3! = 60
2.6.13 We have
➊ (E + F + S + I)!
➋ 4! · E!F !S!I!
E + F + I + 1
➌ S!(E + F + I)!
1
E + F + I + 1
➍ S!(E + F + I)!
S
F + I + 1
➎ 2! S!E!(F + I)!
2
20
2.6.14 We can choose the seven people in ways. Of the seven, the chairman can be chosen in seven ways. The answer is
7
thus 20
7 = 542640.
7
Aliter: Choose the chairman first. This can be done in twenty ways. Out of the nineteen remaining people, we just have to choose
19 19
six, this can be done in ways. The total number of ways is hence 20 = 542640.
6 6
20
2.6.15 We can choose the seven people in ways. Of these seven people chosen, we can choose the chairman in seven ways
7 20
and the secretary in six ways. The answer is thus 7 · 6 = 3255840.
7
Aliter: If one chooses the chairman first, then the secretary and finally the remaining five people of the committee, this can be
18
done in 20 · 19 · = 3255840 ways.
5
10
2.6.16 For a string of three-digit numbers to be decreasing, the digits must come from {0, 1, . . . , 9} and so there are = 120
3
three-digit numbers with all its digits in decreasing order. If the string of three-digit numbers is increasing, the digits have to
9
come from {1, 2, . . . , 9}, thus there are = 84 three-digit numbers with all the digits increasing. The total asked is hence
3
120 + 84 = 204.
20
2.6.17 We can choose the four students who are going to take the first test in ways. From the remaining ones, we can
16 4 12 8
choose students in ways to take the second test. The third test can be taken in ways. The fourth in ways and
4 4 4 4
the fifth in ways. The total number is thus
4 20161284
.
4 4 4 4 4
2.6.18 We align the thirty-nine cards which are not hearts first. There are thirty-eight spaces between them and one at the
40
beginning and one at the end making a total of forty spaces where the hearts can go. Thus there are ways of choosing
13
the places where the hearts can go. Now, since we are interested in arrangements, there are 39! different configurations of the
40
non-hearts and 13! different configurations of the hearts. The total number of arrangements is thus 39!13!.
13
2.6.19 The equality signs cause us trouble, since allowing them would entail allowing repetitions in our choices. To overcome
that we establish a one-to-one correspondence between the vectors (a, b, c, d), 0 ≤ a ≤ b ≤ c ≤ d ≤ n and the vectors
(a′ , b′ , c′ , d′ ), 0 ≤ a′ < b′ < c′ < d′ ≤ n + 3. Let (a′ , b′ , c′ , d′ ) = (a, b + 1, c + 2, d + 3). Now we just have to pick four different
n + 4
numbers from the set {0, 1, 2, 3, . . . , n, n + 1, n + 2, n + 3}. This can be done in ways.
4
2.6.20 We have
➊ (T + L + W )!
➋ 3!T !L!W ! = 6T !L!W !
T + L + 1
➌ (T + L)!W !
W
T + L + 1
➍ (T + L)!W !
1
2.6.23 We have
13!
➊ = 86486400
2!3!3!
11!
➋ = 3326400
2!3!
11!
➌ = 4989600
2!2!2!
12 11!
➍ = 13305600
1 3!3!
12 11!
➎ = 73180800
2 3!3!
10 9!
➏ = 50400
1 3!3!2!
2.6.24 We have
M + W
➊
C
M W
➋
C−T T
M + W − 2
➌
C−2
M + W − 2
➍
C
2.6.25 M + W M + W − 2 M + W − 2 M + W − 2
− =2 + .
C C −2 C −1 C
2.6.26 2030
50
2.6.27 2
2
n + k − 1
2.6.28
k
2.6.29 [1] For the first column one can put any of 4 checkers, for the second one, any of 3, etc. hence there are 4 · 3 · 2 · 1 = 24.
[2] If there is a column without a checker then
4there must be a column with 2 checkers.
4 There are 3 choices for this column. In
this column we can put the two checkers in = 6 ways. Thus there are 4 · 3 4 · 4 = 1152 ways of putting the checkers. [3]
2 16 2
The number of ways of filling the board with no restrictions is . The number of ways of of of filling the board so that there
16 4
is one checker per column is 44 . Hence the total is − 44 = 1564.
4
2.6.30 7560.
1 864
2.6.31 .
4! 2 2 2
158
2.6.32 .
7 4
10
2.6.35 210 − 1 − 1 − = 1024 − 2 − 252 = 770
5
n n n − 1
2.6.36 ; n − 1; ;
2 3 2
121164
2.6.37
1 5 2 4
620
2.6.38 = 104857600000000000000000000
3
95
2.6.39 = 840
3 3
bg
2.6.40 c!
c c
2.6.45 We have
n − 1 n − 1 (n − 1)! (n − 1)!
+ = +
k−1 k (k − 1)!(n − k)! k!(n
− k − 1)!
(n − 1)! 1 1
= +
(n − k − 1)!(k − 1)! n − k k
(n − 1)! n
=
(n − k − 1)!(k − 1)! (n − k)k
n!
= .
(n − k)!k!
n
= .
k
A combinatorial interpretation can be given as follows. Suppose we have a bag with n red balls. The number of ways of choosing
k balls is n. If we now paint one of these balls blue, the number of ways of choosing k balls is the number of ways of choosing
n − 1
balls if we always include the blue ball (and this can be done in ) ways, plus the number of ways of choosing k balls if
n − 1 k − 1
we always exclude the blue ball (and this can be done in ways).
k
2.6.46 The sinistral side counts the number of ways of selecting r elements from a set of n, then selecting k elements from those
r. The dextral side counts how many ways to select the k elements first, then select the remaining r − k elements to be chosen
from the remaining n − k elements.
2.6.48 Consider choosing n balls from a bag of r yellow balls and s white balls.
2.6.49 The numbers belong to the following categories: (I) all six digits are identical; (II) there are exactly two different digits
used, three of one kind, three of the other; (III) there are exactly two different digits used, two of one kind, four of the other; (IV)
there are exactly three different digits used, two of each kind.
There are clearly 9 numbers belonging to category (I). To count the numbers in the remaining categories, we must consider the
9 6! 98 6!
cases when the digit 0 is used or not. If 0 is not used, then there are · = 720 integers in category (II); · = 1080
9 2 3!3! 1 1 2!4!
6!
integers in category (III); and · = 7560 integers in category (IV). If 0 is used, then the integers may not start with 0.
9 5! 3 2!2!2! 9
9 5! 5! 5!
There are · = 90 in category (II) ; ·( + ) = 135 in category (III) ; and ·2· = 3240 in category (IV).
1 2!3! 1 1!4! 3!2! 2 1!2!2!
Thus there are altogether
9 + 720 + 1080 + 7560 + 90 + 135 + 3240 = 12834
such integers.
2.6.50 The numbers belong to the following categories: (I) all seven digits are identical; (II) there are exactly two different digits
used, three of one kind, four of the other.
There are clearly 9 numbers belonging to category (I). To count the numbers in the remaining category (II), we must consider
98 7!
the cases when the digit 0 is used or not. If 0 is not used, then there are · = 2520 integers in category (II). If 0 is
9 9 1 1 3!4!
6! 6!
used, then the integers may not start with 0. There are · + · = 315 in category (II). Thus there are altogether
1 2!4! 1 3!3!
2520 + 315 + 9 = 2844 such integers.
2.6.51 432
15
2.6.52 ; 15!/6!
9
2.6.53 29.
2.6.54 24
8
2.6.55 5!
5
2.6.56 175308642
k + 1
2.6.57 Hint: There are k occupied boxes and n − k empty boxes. Align the balls first! .
n−k
n − k + 1
2.6.58 There are n − k empty seats. Sit the people in between those seats. .
k
2.6.59 Let Ai be the property that the i-th letter is put back into the i-th envelope. We want
card (Ac1 ∩ Ac2 ∩ · · · ∩ Ac10 ) .
Now, if we accommodate the i-th letter in its envelope, the remaining
nine letters can be put in 9! different ways in the nine
remaining envelopes, thus card (Ai ) = 9!. Similarly card Ai ∩ Aj = 8!, card Ai ∩ Aj ∩ Ak = 7!, etc. for unequal i, j, k, . . ..
10 10
Now, there are ways of choosing i, ways of choosing different pairs i, j, etc.. Since
1 2
card (A1 ∪ A2 ∪ · · · ∪ A10 ) + card (Ac1 ∩ Ac2 ∩ · · · + ∩Ac10 ) = 10!,
by the Inclusion-Exclusion Principle we gather that
10 10 10 10
10
card (Ac1 ∩ Ac2 ∩ · · · ∩ Ac10 ) = 10! − 9! + 8! − 7! + · · · − 1! + 0! .
1 2 3 9 10
2.7.1 36
3!
2.7.2 From the preceding problem subtract those sums with 1 + 2 + 7 (3! = 6 of them) and those with 1 + 1 + 8 ( = 3 of them).
2!
The required total is 36 − 9 = 27.
14
2.7.3
4
The number of (1) is the number of strictly positive solutions to x + y < 100. Let z = 100 − x − y, the discrepancy of x + y
from 100. Then we are counting the number of strictly positive solutions to x + y + z = 100. To count these, write 100 as a sum
of 100 ones:
1 + 1 + ··· + 1.
| {z }
100 ones
Observe that there are 99 plus signs. Of these, we must choose two, because the equation x + y + z = 100 has two. Thus there
99
are = 4851 such points.
2
3.2.1 We are given that P (a) = 2P (b), P (b) = 4P (c), P (c) = 2P (d). The trick is to express three of the probabilities in terms
of one of the four. We will express all probabilities in terms of outcome d. Thus
P (b) = 4P (c) = 4(2P (d)) = 8P (d) ,
and
P (a) = 2P (b) = 2(8P (d)) = 16P (d) .
Now
P (a) + P (b) + P (c) + P (d) = 1 =⇒ 16P (d) + 8P (d) + 2P (d) + P (d) = 1
=⇒ 27P (d) = 1,
1
whence P (d) = . This yields
27
16
P (a) = 16P (d) = ,
27
8
P (b) = 8P (d) = ,
27
and
2
P (c) = 2P (d) =
.
27
Observe that all probabilities are between 0 and 1 and that they add up to 1.
3.2.2 The trick is to express all probabilities in terms of a single one. We will express P (a) , P (b) , P (c) , in terms of P (d). We
have
P (b) = 3P (c) = 3(3P (d)) = 9P (d) ,
P (a) = 3P (b) = 3(9P (d)) = 27P (d) .
Now
P (a) + P (b) + P (c) + P (d) = 1 =⇒ 27P (d) + 9P (d) + 3P (d) + P (d) = 1
1
=⇒ P (d) = .
40
Whence
27
P (a) = 27P (d) = ,
40
9
P (b) = 9P (d) = ,
40
3
P (c) = 3P (d) = .
40
3.2.4 The maximum is 0.6, it occurs when B ⊆ A. Now by Theorem 121 and using the fact that P (A ∪ B) ≤ 1, we have
P (A ∩ B) = P (A) + P (B) − P (A ∪ B) ≥ 1.5 − 1 = 0.5,
whence the minimum value is 0.5.
3.2.5 Let C be the event that patient visits a chiropractor, and T be the event that patient visits a physical therapist. The data
stipulates that
P (C) = P (T ) + 0.14, P (C ∩ T ) = 0.22, P (C c ∩ T c ) = 0.12.
Now,
0.88 = 1 − P (C c ∩ T c ) = P (C ∪ T ) = P (C) + P (T ) − P (C ∩ T ) = 2P (T ) − 0.08,
whence P (T ) = 0.48.
3.2.6 0.8
3.2.7 Let R and B are the events that Rocinante wins, and that Babieca wins, respectively, in 8-horse race. As R and B are
mutually exclusive, we deduce that
P (R ∪ B) = P (A) + P (B)
2
= + (1 − P (B c ))
2 + 5
2 7
= + 1−
7 7+3
2 3
= +
7 10
41
= .
70
5
3.4.2
144
3
3.4.3
8
1
3.4.4
52
41
3.4.5
81
23
3.4.6 Use Theorem 3.2.8. The desired probability is .
32
3.4.7 We have
P (|X − Y | = 1) = P (X − Y = 1) + P (Y − X = 1)
= 2P (X − Y = 1)
= 2(P (X = 1 ∩ Y = 0) + P (X = 2 ∩ Y = 1))
= 2(P (X = 1) P (Y = 0) + P (X = 2) P (Y = 1))
= 2((.4)(.2) + (.4)(.4))
= .48,
since the sampling with replacement gives independence.
3.4.8 Suppose there are n re-reading necessary in order that there be no errors. At each re-reading, the probability that a
2 2
typo is not corrected is . Thus the probability that a particular typo is never corrected is ( )n . Hence the probability that a
3 3
2
particular typo is corrected in the n re-readings is 1 − ( )n . Thus the probability that all typos are corrected is
3
n 4
2
1− .
3
We need n 4
2
1− ≥ 0.9
3
and with a calculator we may verify that this happens for n ≥ 10.
5
3.4.9 The probability of not obtaining a six in a single trial is. The probability of not obtaining a single six in the three trials
6
5 3 125 125 91
is ( ) = . Hence the probability of obtaining at least one six in three rolls is 1 − = .
6 216 216 216
−P (B ∩ C) + P (A ∩ B ∩ C)
1 1 1 1 1 1 1
= + + − − − +
3 3 3 9 9 9 27
19
= .
27
7
3.4.11 ( )10
9
13 25 4 1
3.5.1 ; ; ;
51 102 663 221
1
3.5.2
116
473
3.5.3
16215
3.5.4 We have
1
P (A ∩ B) = P (A|B) P (B) = , =⇒ P (A ∪ B) = P (A) + P (B) − P (A ∩ B) = 1
6
whence
P (Ac ∩ B c ) = P ((A ∪ B)c ) = 1 − P (A ∪ B) = 0.
3
3.5.5
8
3
3.5.6
16
3.5.7 Observe that there are 10 ways of getting a sum of six in three dice: the 3 permutations of (1, 1, 4), the 6 permutations of
(1, 2, 3), and the 1 permutation of (2, 2, 2). Of these, only (2, 2, 2) does not require a 1. Let S be the event that the sum of the
dice is 6 and let N be the event that no die landed on a 1. We need
1
P (N ∩ S) 216 1
P (N |S) = = = .
P (S) 10 10
216
1
3.5.9
4
30
3.5.10
31
7
3.5.11
18
3.5.12 Let A be the event that Peter’s letter is received by Paul and B be the event that Paul’s letter is received by Peter. Then
we want P (A|B c ). Then
A ∩ Bc
P (A|B c ) =
P (B c )
P (B c |A) · P (A)
=
P (B |A) · P (A) + P (B c |Ac ) · P (Ac )
c
1 n−1
·
= n n
1 n−1 1
· +1·
n n n
n−1
= .
2n − 1
3.5.13 We condition on whether the interchanged card is the one selected on the second half. Let A be the event that the
selected on the second half card was an ace, and let I be the event that the card selected was the interchanged one. Then
1 3 26 43
P (A) = P (A|I) P (I) + P (A|I c ) P (I c ) = 1 · + · = .
27 51 27 459
3.5.14 Let I be the event that a customer insures more than one car. Let S be the event that a customer insures a sports car.
We are given that
P (I) = 0.7, P (S) = 0.2, P (S|I) = 0.15.
This gives
P (S ∩ I) = P (S|I) P (I) = (0.15)(0.7) = 0.105.
We want P (I c ∩ S c ). By the De Morgan Laws and Inclusion-Exclusion
P (I c ∩ S c ) = P ((I ∪ S)c )
= 1 − P (I ∪ S)
= 0.205.
3.5.15
1. We may write
D = (A ∪ B) \ (A ∩ B) = (A \ B) ∪ (B \ A).
Thus by Inclusion-Exclusion,
P (D) = P (A ∪ B) − P (A ∩ B) = P (A) + P (B) − 2P (A ∩ B) .
By independence, P (A ∩ B) = P (A) P (B) and so,
P (D) = P (A) + P (B) − 2P (A) P (B) = 0.2 + 0.3 − 2(0.2)(0.3) = 0.38.
2. First observe that
D = (A \ B) ∪ (B \ A) =⇒ A ∩ D = (A \ B) ∩ A = A \ A ∩ B,
and so
P (A ∩ D) = P (A) − P (A ∩ B) = 0.2 − (0.2)(0.3) = 0.14.
Hence,
P (A ∩ D) 0.14 7
P (A|D) = = = .
P (D) 0.38 19
3. The events C and D are disjoint, hence P (A ∩ D) = P (∅) = 0. On the other hand, P (C) P (D) = (0.06)(0.38) 6= 0, and
therefore the events are not independent.
3.6.1 Let Y, F, E denote the events of choosing the 30% heads, the 50% heads, and the 80% heads, respectively. Now,
3.6.2 Let T denote the event that Tom operates the machinery, S the event that Sally operates the machinery and H that two
out of three pieces of the output be of high quality. Then
3.6.3
➊
1 1 p+1
P (6) = P (6 ∩ I) + P (6 ∩ II) = ·p+ ·1 =
2 2 2
1 p
➋ P (6 ∩ I) = ·p=
2 2
➌
P (6 ∩ I) p
P (I|6) = = .
P (6) p+1
3.6.4
➊
1 2 1 1 1 1 1
P (Q) = · + · + · = .
3 3 3 3 3 2 2
➋
1 1 1
P (Q ∩ III) = · =
3 2 6
➌
P (III ∩ Q) 1
P (III|Q) = = .
P (Q) 3
c
➋ This is clearly .
a+c
➌ We use Bayes’ Rule
P (C ∩ G)
P (C|G) =
P (G)
P (G|C) P (C)
=
P (G)
c 1
·
= a+c 3
b 1 d 1 c 1
· + · + ·
a+b 3 c+d 3 a+c 3
c
= a+c
b d c
+ +
a+b c+d a+c
➍ Conditioning on the urn chosen,
10
3.6.8
17
91
3.6.9
371
15
3.6.10
43
2
3.6.11
5
1
3.6.12
35
1
3.6.13
3
3.6.14
1. 0.76
2. 0.91
3.6.15 Let H be the event that Hugh was infected and let C1 , C2 , C3 be the events that child i = 1, 2, 3, respectively, is a
cyclops. For the first question we want P C1c ∩ C2c . We will condition on Hugh getting infected, and thus
P (C1c ∩ C2c ) = P (C1c ∩ C2c |H) P (H) + P (C1c ∩ C2c |H c ) P (H c ) .
Since C1 and C2 are independent, this becomes
3 3 1 2 41
P (C1c ∩ C2c ) = P (C1c |H) P (C2c |H) P (H) + P (C1c |H c ) P (C2c |H c ) P (H c ) = · · +1·1· = .
4 4 3 3 48
3.6.16 Let C1 , C2 , C3 be the event David’s family has one, two, or three children, respectively. Let A be the event that David’s
1
family has only one boy. We are operating on the assumption that P (C1 ) = P (C2 ) = P (C3 ) = . Observe that
3
1 3
P (A|C1 ) = P (A|C2 ) = , P (A|C3 ) = .
2 8
This gives,
1 1
3
· 2 4
P (C1 |A) = 1 1 1 1 1 3
= .
3
· 2
+ 3
· 2
+ 3
· 8
11
For the second question let B be the event that David’s family has no girls. Then
1 1 1
P (B|C1 ) = , P (B|C2 ) = , P (B|C3 ) = .
2 4 8
This gives,
1 1
3
· 2 4
P (C1 |B) = 1 1 1 1 1 1
= .
3
· 2
+ 3
· 4
+ 3
· 8
7
Somewhat counterintuitive!
3.6.17 We have
1 4 1 12 1 18 1 16 1
P (HHT ) = · + · 3 + · 3 + · 3 = .
4 53 4 5 4 5 4 5 10
Hence
1 4
· 2
P (A|HHT ) = 4 53 = ,
P (HHT ) 25
1 12
· 3 6
P (B|HHT ) = 4 5 = ,
P (HHT ) 25
1 18
· 3 9
P (C|HHT ) = 4 5 = ,
P (HHT ) 25
1 16
· 3 8
P (D|HHT ) = 4 5 = ,
P (HHT ) 25
so it is more likely to be coin C.
1 3 3 2 1 13 8 1 29
4.1.1 ; ; ; ; 0; ; ; ; ;
10 10 100 5 100 100 25 50 100
11
4.1.2
36
6 · 5 · · · (6 − n + 1)
4.1.3 1 − . This is 1 for n ≥ 7.
6n
4.1.4 The sample space consists of all possible phone numbers in this town: 7 · 106 . A phone number will be divisible by 5 if it
ends in 0 or 5 and so there are 7 · 105 · 2 phone numbers that are divisible by 5. The probability sought is
7 · 105 · 2 2 1
= = .
7 · 106 10 5
4.1.5 For this to happen, we choose the ticket numbered 9, the one numbered 15 and the other two tickets must be chosen
from amongst the five tickets numbered 10, 11, 12, 13, 14. The probability sought is thus
5
2 10 2
20 = = .
4845 969
4
12
4.1.6 There are 4 + 6 + 2 = 12 bills. The experiment can be performed in = 66 ways. To be successful we must choose
4 6 22
either 2 tens (in = 6 ways), or 2 fives (in = 15 ways), or 2 ones (in = 1 way). The probability sought is thus
2 2 2
4 6 2
+ +
2 2 2 = 6 + 15 + 1 = 1 .
12
66 3
2
4.1.7 N 2 + 1 is divisible by 10 if it ends in 0. For that N 2 must end in 9. This happens when N ∈ {3, 7, 13, 17, 23}. Thus the
5 1
probability sought is = .
25 5
345
3
4.1.8 1 1 1 =
12 11
3
1
4.1.9
221
6 6327
4.1.10 ,
20825 20825
4.1.11 There are only 5 numbers in the set that leave remainder 1 upon division by 6, namely {1, 7, 13, 19, 25}. The probability
5 1
sought is thus = .
25 5
4
4.1.12
9
90 · 89 · 88 · 87 · 10 904 · 10
4.1.13 (a) , (b)
100 · 99 · 98 · 97 · 96 1005
212
212
4.1.14 1 = = 4096
≈ 0.00151.
24 2, 704, 156 2,704,156
12
4.1.15 Let Ak denote the event that there are exactly k married couples, 0 ≤ k ≤ 3, among the escapees. First choose the
10
couples that will escape, among the ten couples, this can be done in ways. Then select from the 10 − k couples remaining
k
the 6 − 2k couples that will have only one partner. For each of these 6 − 2k couples, there are two ways to select one partner.
Therefore 10 10 − k
· · 26−2k
P (Ak ) = k 6 − 2k
20 .
4.1.16 Each of the dice may land in 6 ways and hence the size of the sample space for this experiment is 63 = 216. Notice that
there is a one to one correspondence between vectors
and vectors
(R′ , W ′ , B ′ ), 1 ≤ R′ < W ′ < B ′ ≤ 8.
This can be seen by putting = R′ R, W ′
= W + 1, and B′ = B + 2. Thus the number of vectors (R′ , W ′ , B ′ ) with 1 ≤ R′ <
8
W ′ < B ′ ≤ 8 is = 56. The probability sought is thus
3
56 7
= .
216 27
4.1.17 We have
A + B B
➊ First observe that this experiment has a sample space of size . There are ways of choosing the females. The
C T
remaining C − T members of the committee must be male, hence the desired probability is
B A
T C−T
A + B .
C
➋ Either C − 2 or C − 1 or C males will be chosen. Corresponding to each case, we must choose either 2 or 1 or 0 women,
whence the desired probability is
B A B A B A
+ +
C−2 2 C−1 1 C 0 .
A + B
C
➌ Either 3 or 2 or 1 or 0 women will be chosen. In each case, either C − 3 or C − 2 or C − 1 or C men will be chosen. Thus
the desired probability is
A B A B A B AB
+ + +
C−3 3 C−2 2 C −1 1 C 0 .
A + B
C
➍ We must assume that Peter and Mary belong to the original set of people, otherwise the probability will be 0. Since Peter
and Mary must belong to the committee, we must choose C − 2 other people from the pool of the A + B − 2 people
remaining. The desired probability is thus
A + B − 2
C −2
A + B .
C
➎ Again, we must assume that Peter and Mary belong to the original set of people, otherwise the probability will be 1. Observe
that one of the following three situations may arise: (1) Peter is in a committee, Mary is not, (ii) Mary is in a committee,
Peter is not, (iii) Neither Peter nor Mary are in a committee. Perhaps the easiest way to count these options (there are
many ways of doing this) is to take the total number of committees and subtract those including (simultaneously) Peter
and Mary. The desired probability is thus
A + B A + B − 2
−
C C−2 .
A + B
C
A + B − 2
Aliter: The number of committees that include Peter but exclude Mary is , the number of committees that
A + B − 2 C−1
include Mary but exclude Peter is , and the number of committees that exclude both Peter and Mary is
A + B − 2 C−1
. Thus the desired probability is seen to be
C
A + B − 2 A + B − 2 A + B − 2
+ +
C−1 C−1 C
A + B
C
That this agrees with the preceding derivation is a simple algebraic exercise.
12
4.1.18 The experiment is choosing five people from amongst 12, and so the sample space has size = 792. The women will
5
outnumber the men if there are (a) 3 women and 2 men; (b) 4 women and 1 man; or (c) 5 women. The numbers of successes is
thus
57 57 57
+ + = 246.
3 2 4 1 5 0
246 41
The probability sought is thus = .
792 132
4.1.19 Let A be the event that all the camels are together, and let B be the event that all the goats are together. The answer to
the first question is
2 · 5! · 5!
P (A ∩ B) = ≈ 0.00794.
10!
The answer to the second question is
5! · 5! · 6 5! · 5! · 6 2 · 5! · 5! 10 · 5! · 5! 115, 200
P (A ∪ B) = P (A) + P (B) − P (A ∩ B) = + − = = ≈ 0.0317.
10! 10! 10! 10! 3, 628, 800
4.1.20 We use inclusion-exclusion, where C, F, S, respectively, denote the sets of Chinese, French and Spanish speakers. We
have
card (C ∪ F ∪ S) = card (C) + card (F ) + card (S)
+card (C ∩ F ∩ S)
= 30 + 50 + 75 − 15 − 30 − 12 + 7
= 105,
students speak at least one language, hence 120 − 105 = 15 students speak none of the languages. The probability sought is
15 1
= .
120 8
10!
4.1.21 The experiment consists in permuting the letters RRRW W W BBB and hence the sample space size is . In order
3!4!3!
to obtain success, we must have an arrangement of the form
where the xi may have from 0 to 3 blue balls. The number of such arrangements is the number of non-negative integral solutions
8 + 3 − 1 10 10!
to x1 + x2 + · · · + x8 = 3, namely = = . Hence the probability sought is
8−1 7 7!3!
10!
7!3! = 3!4! = 1 .
10! 7! 35
3!4!3!
Aliter: Observe that the position of the red balls is irrelevant for success. Thus we only worry about permutations of of
1 4!3! 1
RRRW W W W and only one of this is successful. The desired probability is = = .
7! 7! 35
4!3!
125 91 4 1
4.1.22 ; ; ;
216 216 9 2
262 43 13448 41339 48
4.1.23 3 ; 2 ; 1 4 2 ; 1 4 2 ; 6
52 52 52 52 52
6 6 6 6 6
7
4.1.24
18
4.1.26 The sample space consists of all vectors D1 D2 D3 where Di is a day of the week, hence the sample space size is 73 = 343.
Success consists in getting a vector with all the Di different, and there are 7 · 6 · 5 = 210 of these. The desired probability is thus
210 30
= .
343 49
N
T U
4.1.27 k
N
2
4.1.28
5
1
4.1.29
5
4.1.30 In the numbers {1, 2, . . . , 20} there are 6 which are multiples of 3, 7 which leave remainder 1 upon division by 3, and
7 that leave remainder 2 upon division by 3. The sum of three numbers will be divisible by 3 when (a) the three numbers are
divisible by 3; (b) one of the numbers is divisible by 3, one leaves remainder 1 and the third leaves remainder 2 upon division by
3; (c) all three leave remainder 1 upon division by 3; (d) all three leave remainder 2 upon division by 3. The required probability
is thus
6 677 7 7
+ + +
3 1 1 1 3 3 = 32 .
20
95
3
4.1.31 The person will have to try exactly 17 guns if either the third firing gun occurs on the seventeenth place or the firing
16
+1 121
guns occur on the last three places. Hence the probability sought is 220 = .
1140
3
4.1.32 The possible pairs with X < Y are (1, 2), (1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5), and (3, 4) for a total of 8 pairs. There
64 64
are also eight corresponding pairs with Y < X. The probability sought is = .
27 351
2
4.1.34 Notice that the sample space of this experiment has size 10 · 10 since X and Y are chosen with replacement. Observe
that if N = 3k then N 2 = 9k2 , leaves remainder 0 upon division by 3. If N = 3k + 1 then N 2 = 9k2 + 6k + 1 = 3(3k2 + 2k) + 1
leaves remainder 1 upon division by 3. Also, if N = 3k + 2 then N 2 = 9k2 + 12k + 4 = 3(3k2 + 4k + 1) + 1 leaves remainder
1 upon division by 3. Observe that there are 3 numbers—3, 6, 9—divisible by 3 in the set, 4 numbers—1, 4, 7, 10—of the form
3k + 1, and 3 numbers—2, 5, 8—of the form 3k + 2 in the set. Now, X 2 − Y 2 is divisible by 3 in the following cases: (i) both
X and Y are divisible by 3, (ii) both X and Y are of the form 3k + 1, (iii) both X and Y are of the form 3k + 2, (iv) X is of the
form 3k + 1 and Y of the form 3k + 2, (v) X is of the form 3k + 2 and Y of the form 3k + 1. Case (i) occurs 3 · 3 = 9 instances,
case (ii) occurs in 4 · 4 = 16 instances, case (iii) occurs in 3 · 3 = 9 instances, case (iv) occurs in 4 · 3 = 12 instances and case (v)
occurs in 3 · 4 = 12 instances. The favourable cases are thus 9 + 16 + 9 + 12 + 12 = 58 in number and the desired probability
58 29
is = .
100 50
155
4.1.35 3 2
20
5
20 155
4.1.36 The TA chooses 3 problems in = 1140 ways. Success means = 525 ways of choosing exactly two correct
3 2 1
525 35
answers. The probability sought is thus = .
1140 76
10
4.1.37 The experiment consists of choosing 3 people out of 10, and so the sample space size is = 120. Success occurs
64 3
36 3
when one man and two women chosen, which can be done in = 36 ways. The probability sought is = .
1 2 120 10
4.1.39 The r − 1 integers before i must be taken from the set {1, 2, . . . , i − 1} and the k − r after i must be taken from the set
i − 1 n − i
5 2
4.1.40 ;
9 9
5
4.1.41
108
1
4.1.42
2
4.1.43 The sample space has size 63 = 216. A simple count yields 25 ways of obtaining a 9 and 27 of getting a 10. Hence
25 27 1
P (S = 9) = ≈ 0.1157, and P (S = 10) = = = 0.125.
216 216 8
360
4.1.44
2401
118
4.1.45
231
4
4
4.1.46 3 =
7 35
3
1
4.1.47
3
=⇒ n = 5.
134
4.1.49 1
52
4
12
4.1.50 The experiment consists in choosing three positions to be occupied by the three cards, this can be done in ways.
3 4 3
Success is accomplished by selecting one of the players, in and three of his cards, (in ) ways, to be the three lowest
34 1 3
1 3 3
cards. The probability required is thus 12 = .
55
3
4.1.51 To have 2 distinct roots we need the discriminant A2 − 4B > 0. Since 1 ≤ A ≤ 6 and 1 ≤ B ≤ 6 this occurs for the
17 ordered pairs (A, B): (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4),
17
(6, 5), (6, 6), so the desired probability is .
36
To have a double root we need A2 − 4B = 0. This occurs when for the 2 ordered pairs (A, B): (2, 1) and (4, 4). Hence the
2 1
desired probability is = .
36 18
If x = −3 is a root, then (−3)2 − 3A + B = 0, that is 9 + B = 3A. This occurs for the 2 ordered pairs (A, B): (4, 3) and
2 1
(5, 6). Hence the desired probability is = .
36 18
If x = 3 were a root, then 32 + 3A + B = 0, which is impossible since the sum on the sinistral side is strictly positive and
hence never 0. The desired probability is thus 0.
4.1.53 106
25
4.1.54
648
448
858
4.1.55 This is plainly 3 10 = .
52 20825
13
4.1.56 The sample space is the number of permutations of 10 objects of two types: 8 of type W (for white) and 2 of type R (for
10!
red). There are = 45 such permutations. Now, to count the successful permutations, observe that we need a configuration
8!2!
of the form
X1 RX2 RX3 .
If one of the Xi = 7W then another one must be 1W and the third must be 0W , so there are 3! = 6 configurations of this type.
3!
Similarly, if one of the Xi = 8W , the other two must be 0W and again there are = 3 configurations of this type. The desired
2!
9 1
probability is hence = .
45 5
4.1.57 By subtracting A times the second equation from the first, the system becomes
(2A − B)x = (C − 3A)y; x − 2y = 3.
For infinitely many solutions, we need 2A = B; 3A = C, hence B is even and C is a multiple of 3, giving (A, B, C) =
2 1
(1, 2, 3) or (2, 4, 6). The probability of infinitely many solutions is thus
= .
216 108
If the system will have no solutions, then 2A = B and 3A 6= C. For (A, B) = (1, 2) we have 5 choices of C; for (A, B) = (2, 4)
we have 5 choices of C; and for (A, B) = (3, 6) we have 6 choices of C. Hence there are 5 + 5 + 6 = 16 successes, and the
16 2
probability sought is = .
216 27
For the system to have exactly one solution we need 2A 6= B. If A = 1, 2 or 3, then B cannot B = 2, 4 or 6, giving 5+5+5 = 15
choices of B in these cases. If A = 4, 5 or 6, then B can be any of the 6 choices, giving 6 + 6 + 6 = 18 in these cases. These
15 + 18 = 33 choices of B can be combined with any 6 choices of C, giving 33 · 6 = 198 choices. The probability in this case is
198 11
thus = .
216 12
For the system to have x = 3, y = 0 as its unique solution, we need 2A 6= B and 3A = C. If A = 1 then C = 3 and we have 5
choices for B. If A = 2 then C = 6 and again, we have 5 choices for B. Hence there are 10 successes and the probability sought
10 5
is = .
216 108
15
4.2.1
1024
4.2.2 Let A denote the event whose probability we seek. Then Ac is the event that no heads turns up. Thus
5 3 0 1 5 1
P (Ac ) = = .
5 4 4 1024
Hence
1 1023
P (A) = 1 − P (Ac ) = 1 − = .
1024 1024
Notice that if we wanted to find this probability directly, we would have to add the five terms
5 3 1 1 4 5 3 2 1 3 5 3 3 1 2
P (A) = + +
1 4 4 2 4 4 3 4 4
5 3 4 1 1 5 3 5 1 0
+ + .
4 4 4 5 4 4
15 90 270 405 243
= + + + +
1024 1024 1024 1024 1024
1023
= .
1024
1000
1
4.2.3 − 500
2 21001
2133
4.2.5
3125
5
4.2.6
16
1 1 1 1 1 2 1
4.2.7 A particular configuration with one ’2’, one ’7’, and two ’0’s has probability (
) ( ) ( ) = of occurring. Since
10 10 10 10000
4! 12 3
there are = 12 such configurations, the desired probability is thus = .
2! 10000 2500
5
4.3.1
8
1 2 8 2
4.3.2 ; ; ;
3 9 81 5
4
4.3.3
63
4.3.4 Let Xi be the random variable counting the number of times until heads appears for times i = 1, 2, 3. Observe that
1 1
P (Xi = n) = n (in fact, Xi is geometric with p = ). Hence the desired probability is
2 2
1
∞ ∞
X X 1 8 1
P (X1 = n) P (X2 = n) P (X3 = n) = = = .
8 n 1 7
n=1 n=1 1−
8
52
4.3.5
68
4.4.1 For the patient to notice for the first time that the left dispenser is empty, he must have pulled out 100 sheets from the
left, 75 from the right, and on the 101st attempt on the left he finds that there is no sheet. So we have a configuration like
...L...R... L,
| {z }
100 L′ s and 75 R′ s
where all the L’s, except for the one on the last position, can be in any order, and all the R’s can be in any order. This happens
175 1 1 1 175 1 176
with probability ( )75 ( )100 · = ( ) . The same probability can be obtained for the right dispenser and hence
75 2 2 2 75 2
175 1 176 175 1 175
the probability sought is 2 ( ) = ( ) .
75 2 75 2
5.0.2 We want P (|x − y| < 1) = P (−1 + x < y < 1 + x). This is the area shaded in figure A.1. The area of the rectangle is
1 1 15
3 · 5 = 15, of the white triangle · (2)(2) = 2, and of the white trapezoid · (1 + 4)(3) = . The desired probability is thus
2 2 2
15
15 − 2 −
2 = 11 .
15 30
0 1 2 3 4 5 6
5.0.3 Consider x and y with 0 ≤ x ≤ 2.5 and x + y = 2.5 Observe that the sample space has size 2.5. We have a successful
pair (x, y) if it happens that (x, y) ∈ [0.5; 1] × [1.5; 2] or (x, y) ∈ [1.5; 2] × [0.5; 1] The measure of all successful x is thus
1 2
0.5 + 0.5 = 1. The probability sought is thus = .
2.5 5
6.1.2 Let G be the random variable denoting the gain of the player. Then G has image {0, 1, 3, 5} and
1 1
P (G = 0) = , P (G = 1) = P (G = 3) = P (G = 5) = .
2 6
Thus
1+3+5 3
EG = 0P (G = 0) + 1P (G = 1) + 3P (G = 3) + 5P (G = 5) = = ,
6 2
meaning that the fee should be $1.50.
6.1.3 Let G be the random variable denoting Osa’s net gain. Then G has image {−1, 1, 12} and
38 13 1
P (G = −1) = , P (G = 1) = , P (G = 12) = .
52 52 52
Thus
EG = −1P (G = −1) + 1P (G = 1) + 12P (G = 13)
−38 + 13 + 12
=
52
13
= −
52
= −0.25,
and so the net gain is −$0.25.
6.1.5 −0.25
1
6.1.7 $
8
6.1.8 Lose.
39 53
6.2.1 1 + =
14 14
72 1 5
6.2.2 X is a binomial random variable with EX = np = = 12 and varX = np(1 − p) = 72 = 10. But EX2 =
6 6 6
var(X) + (EX)2 = 10 + 122 = 154.
6.2.3 The fastest way to do this is perhaps the following. Let Xi = 1 if the i-th boy is selected, Xi = 0 otherwise. Then
24
8 10 · 8 16
P (Xi = 1) = 7 = and EX = = . Similarly, let Yi = 1 if the i-th girl is selected, Yi = 0 otherwise. Then
25 25 25 5
248
8 15 · 8 24 8
P (Yi = 1) = 7 = and EY = = . Thus E(X − Y ) = EX − EY = − .
25 25 25 5 5
8
212 212
+
55
6.2.4 7 1 4 2 3
14 =
13
5
6.3.1 Let F be the random variable counting the number of flips till the first heads. Then Im (F ) = {1, 2, 3}. Let A be the event
that heads is produced within the first three flips. Then
1 1 1 7
P (A) = + + = .
2 4 8 8
Hence
1
P ((F = 1) ∩ A) 4
P (F = 1|A) = = 2 = ;
P (A) 7 7
8
1
P ((F = 2) ∩ A) 2
P (F = 2|A) = = 4 = ;
P (A) 7 7
8
1
P ((F = 3|A) ∩ A) 1
P (F = 3) = = 8 = .
P (A) 7 7
8
Thus
4 2 1 11
E(F |A) = 1 · +2· +3· = .
7 7 7 7