experiment event: a subset of the
sample space of an experiment
probability of an event (Laplaces
definition): the number of successful
outcomes of this event divided by the
number of possible outcomes
probability distribution: a function p
from the set o

21. Suppose that a Bayesian spam filter
is trained on a set of 10,000 spam
messages and 5000 messages that are
not spam. The word enhancement
appears in 1500 spam messages and
20 messages that are not spam, while
the word herbal appears in 800 spam
messag

mathematics degree from Copenhagen
University in 1866 and finally obtained
his doctorate in 1871 from that school.
After receiving his doctorate, he taught
at a polytechnic and military academy.
In 1887 he was appointed to a
professorship at the Universit

k)where i and j and k are distinct
values. d) Explain why the answer to
part (c) tells you whether you should
change doors when Monty gives you
the chance to do so. 16. Ramesh can get
to work in three different ways: by
bicycle, by car, or by bus. Because

a Hamilton circuit, (ii) whether Ores
theorem can be used to show that the
graph has a Hamilton circuit, and (iii)
whether the graph has a Hamilton
circuit. a) b) c) d) 48. Can you find a
simple graph with n vertices with n 3
that does not have a Hamilton

nonnegative for all points in a sample
space S. Let Z be the random variable
defined by Z(s) = max(X(s), Y (s) for
all elements s S. Show that E(Z)
E(X) + E(Y ). 19. Let X be the number
appearing on the first die when two
fair dice are rolled and let Y b

number of fixed points of a random
permutation.Write X = X1 + X2 + Xn,
where Xi = 1 if the permutation fixes
the ith element and Xi = 0 otherwise.]
The covariance of two random
variables X and Y on a sample space S,
denoted by Cov(X, Y ), is defined to be

in each step. Show that as the number
of steps increases, the probability that
the algorithm produces an incorrect
answer is extremely small. [Hint: For
each step, test whether certain
elements are in the correct order. Make
sure these tests are independe

performed. EXAMPLE 3 What is the
expected value of the sum of the
numbers that appear when a pair of
fair dice is rolled? Solution: Let X be
the random variable equal to the sum
of the numbers that appear when a
pair of dice is rolled. In Example 12 of
Se

prime between n and 2n 2.
Chebyshev helped develop ideas that
were later used to prove the prime
number theorem. Chebyshevs work on
the approximation of functions using
polynomials is used extensively when
computers are used to find values of
functions. C

random variable directly from its
definition, as was done in Example 2.
However, when an experiment has a
large number of outcomes, it may be
inconvenient to compute the expected
value of a random variable directly
from its definition. Instead, we can fin

returned correctly? Solution: Let X be
the random variable that equals the
number of people who receive the
correct hat from the checker. Let Xi be
the random variable with Xi = 1 if the
ith person receives the correct hat and
Xi = 0 otherwise. It follows

E, F1, F2, and F3 are events from a
sample space S and that F1, F2, and F3
are pairwise disjoint and their union is
S. Find p(F2 | E) if p(E | F1) = 2/7, p(E |
F2) = 3/8, p(E | F3) = 1/2, p(F1) = 1/6,
p(F2) = 1/2, and p(F3) = 1/3. 15. In this
exercise we

expected weights of a breeding
elephant seal is 4,200 pounds for a
male and 1,100 pounds for a female.
24. Let A be an event. Then IA, the
indicator random variable of A, equals
1 if A occurs and equals 0 otherwise.
Show that the expectation of the
indica

and vn. f ) Show that part (e) implies
that v1, v2,., vk1, vk, vn, vn1,.,
vk+1, v1 is a Hamilton circuit in G.
Conclude from this contradiction that
Ores theorem holds. 66. Show that
the worst case computational
complexity ofAlgorithm 1 for finding
Euler

directed graphs. 25. Devise an
algorithm for constructing Euler paths
in directed graphs. 26. For which
values of n do these graphs have an
Euler circuit? a) Kn b) Cn c) Wn d) Qn
27. For which values of n do the graphs
in Exercise 26 have an Euler path bu

random variables X1, X2, and X3. 34.
Prove the general case of Theorem 7.
That is, show that if X1, X2,.,Xn are
pairwise independent random
variables on a sample space S, where n
is a positive integer, then V (X1 + X2
+ Xn) = V (X1) + V (X2) + V (Xn).
[Hi

expected number of times we flip the
coin? 11. Suppose that we roll a fair die
until a 6 comes up or we have rolled it
10 times. What is the expected number
of times we roll the die? 12. Suppose
that we roll a fair die until a 6 comes
up. a) What is the p

argument to show why no such path
exists. 40. Does the graph in Exercise
33 have a Hamilton path? If so, find
such a path. If it does not, give an
argument to show why no such path
exists. 41. Does the graph in Exercise
34 have a Hamilton path? If so, fin

w2, respectively. Assuming that E1 and
E2 are independent events and that E1
| S and E2 | S are independent events,
where S is the event that an incoming
message is spam, and that we have no
prior knowledge regarding whether or
not the message is spam, sh

May 13, 2011 10:25 7.4 Expected Value
and Variance 493 28. What is the
variance of the number of times a 6
appears when a fair die is rolled 10
times? 29. Let Xn be the random
variable that equals the number of
tails minus the number of heads when
n fair

absolutely convergent. In particular,
the expectation of a random variable
on an infinite sample space is finite if it
exists. EXAMPLE 1 Expected Value of a
Die Let X be the number that comes up
when a fair die is rolled. What is the
expected value of X?

codes are named after Frank Gray, who
invented them in the 1940s at AT&T
Bell Laboratories to minimize the
effect of errors in transmitting digital
signals. Exercises In Exercises 18
determine whether the given graph
has an Euler circuit. Construct such a

disease but test negative for it.
Similarly, suppose we know the
percentage of incoming e-mail
messages that are spam. We will see
that we can determine the likelihood
that an incoming e-mail message is
spam using the occurrence of words in
the message. T

jkstra in 1959. The version we will
describe solves this problem in
undirected weighted graphs where all
the weights are positive. It is easy to
adapt it to solve shortest-path
problems in directed graphs. Before
giving a formal presentation of the
algori

and Variance 477 17. Prove Theorem
2, the extended form of Bayes
theorem. That is, suppose that E is an
event from a sample space S and that
F1, F2,.,Fn are mutually exclusive
events such that n i=1 Fi = S. Assume
that p(E) = 0 and p(Fi) = 0 for i = 1,
2,

that the value of a random variable
exceeds its mean by a large amount.
This is illustrated by Example 20.
EXAMPLE 20 Let X be the random
variable whose value is the number
appearing when a fair die is rolled. We
have E(X) = 7/2 (see Example 1) and V
(X)

was one of the most forceful
proponents of programming as a
scientific discipline. He has made
fundamental contributions to the areas
of operating systems, including
deadlock avoidance; programming
languages, including the notion of
structured programming

the probability that a random variable
takes values far removed from its
expected value. Expected Values Many
questions can be formulated in terms
of the value we expect a random
variable to take, or more precisely, the
average value of a random variable

already proved by others, often with
embarrassing consequences. However,
he was often angry when other
mathematicians did not read his
writings! Petersens death was frontpage news in Copenhagen. A
newspaper of the time described him
as the Hans Christian