6.042/18.062J
Mathematics
for
Computer
Science
April
14,
2005
Srini
Devadas
and
Eric
Lehman
Lecture
Notes
Introduction
to
Probability
Probability
is
the
last
topic
in
this
course
and
perhaps
the
most
important.
Many
algorithms
rely
on
randomization.
Investigating
their
correctness
and
performance
re-
quires
probability
theory.
Moreover,
many
aspects
of
computer
systems,
such
as
memory
management,
branch
prediction,
packet
routing,
and
load
balancing
are
designed
around
probabilistic
assumptions
and
analyses.
Probability
also
comes
up
in
information
theory,
cryptography,
artificial
intelligence,
and
game
theory.
Beyond
these
engineering
applica-
tions,
an
understanding
of
probability
gives
insight
into
many
everyday
issues,
such
as
polling,
DNA
testing,
risk
assessment,
investing,
and
gambling.
So
probability
is
good
stuff.
1
Monty
Hall
In
the
September
9,
1990
issue
of
Parade
magazine,
the
columnist
Marilyn
vos
Savant
responded
to
this
letter:
Suppose
you’re
on
a
game
show,
and
you’re
given
the
choice
of
three
doors.
Behind
one
door
is
a
car,
behind
the
others,
goats.
You
pick
a
door,
say
number
1,
and
the
host,
who
knows
what’s
behind
the
doors,
opens
another
door,
say
number
3,
which
has
a
goat.
He
says
to
you,
”Do
you
want
to
pick
door
number
2?”
Is
it
to
your
advantage
to
switch
your
choice
of
doors?
Craig.
F.
Whitaker
Columbia,
MD
The
letter
roughly
describes
a
situation
faced
by
contestants
on
the
1970’s
game
show
Let’s
Make
a
Deal
,
hosted
by
Monty
Hall
and
Carol
Merrill.
Marilyn
replied
that
the
con-
testant
should
indeed
switch.
But
she
soon
received
a
torrent
of
letters—
many
from
mathematicians—
telling
her
that
she
was
wrong.
The
problem
generated
thousands
of
hours
of
heated
debate.
Yet
this
is
is
an
elementary
problem
with
an
elementary
solution.
Why
was
there
so
much
dispute?
Apparently,
most
people
believe
they
have
an
intuitive
grasp
of
probability.
(This
is
in
stark
contrast
to
other
branches
of
mathematics;
few
people
believe
they
have
an
intuitive
ability
to
compute
integrals
or
factor
large
integers!)
Unfortunately,
approxi-
mately
100%
of
those
people
are
wrong
.
In
fact,
everyone
who
has
studied
probability
at