


























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























































































These course notes accompany Feller, An Introduction to Probability Theory and Its Applications, Wiley, 1950.
Some sources and uses of randomness, and philosophical conundrums.
We begin with some previews.
Coin flips. What are the chances of 10 heads in a row? The probability is 1 /1024, less than 0.1%. Implicit assumptions: no biases and independence. What are the chance of heads 5 out of ten times? (
5
= 252, so 252/ = 25%).
The birthday problem. What are the chances of 2 people in a crowd having the same birthday? Implicit assumptions: all 365 days are equally likely; no leap days; different birthdays are independent. Chances that no 2 people among 30 have the same birthday is about 29.3%. Back of the envelope calculation gives − log P = (1/365)(1 + 2 + · · · + 29) ≈ 450 /365; and exp(− 450 /365) = 0.291. Where are the Sunday babies? US studies show 16% fewer births on Sunday.
An event is a subset of S. For example: a bull’s eye; a comfortable day; heads; an odd number on the die; dice adding up to 7; never getting a 3 in n rolls; the first five cards form a royal flush. Logical combinations of events correspond to the operators of set theory. For example:
A′^ = not A = S − A; A ∩ B = A and B; A ∪ B = A or B.
Probability. We now focus attention on a discrete sample space. Then a probability measure is a function p : S → [0, 1] such that
S p(s) = 1. Often, out of ignorance or because of symmetry, we have p(s) = 1/|S| (all samples have equal likelihood). The probability of an event is given by
P (A) =
s∈A
p(s).
If all s have the same probability, then P (A) = |A|/|S|.
Proposition I.1 We have P (A′) = 1 − P (A).
Note that this formula is not based on intuition (although it coincides with it), but is derived from the definitions, since we have P (A) + P (A′) = P (S) = 1. (We will later treat other logical combinations of events).
Example: mail delivery. The pesky porter throws letters into the pi- geonholes of the n students; S is the set of all functions f : n → n. While the mixed-up mailman simple chooses a letter at random for each house; S is the space of all bijective functions f : n → n. These give different answers for the probability of a successful delivery. (Exercise: who does a better job for n = 3? The mailman is more likely than the porter to be a complete failure — that is, to make no correct delivery. The probability of failure for the porter is (2/3)^3 = 8/27, while for the mailman it is 1/3 = 2/3! = 8/24.
This trend continues for all n, although for both the probability of complete failure tends to 1/e.)
An infinite sample space. Suppose you flip a fair coin until it comes up heads. Then S = N ∪ {∞} is the number of flips it takes. We have p(1) = 1/2, p(2) = 1/4, and
n=1 1 /^2 n (^) = 1, so p(∞) = 0. The average number of flips it takes is E =
1 n/^2
n (^) = 2. To evaluate
this, we note that f (x) =
1 x n/ 2 n (^) = (x/2)/(1 − x/2) satisfies f ′(x) = ∑∞ 1 nx n− (^1) / 2 n (^) and hence E = f ′(1) = 2. This is the method of generating
functions.
Benford’s law. The event that a number X begins with a 1 in base 10 depends only on log(X) mod 1 ∈ [0, 1]. It occurs when log(X) ∈ [0, log 2] = [0, 0. 30103.. .]. In some settings (e.g. populations of cities, values of the Dow) this means there is a 30% chance the first digit is one (and only a 5% chance that the first digit is 9). For example, once the Dow has reached 1,000, it must double in value to change the first digit; but when it reaches 9,000, it need only increase about 10% to get back to one.
Basic counting functions.
(n)k = n(n − 1) · · · (n − k + 1) =
n! (n − k)!
where n = |A|.
Senators on a committee. The probability p that Idaho is represented on a committee of 50 senators satisfies
1 − p = q =
So there is more than a 3/4 chance. Why is it more than 3/4? If there first senator is not on the committee, then the chance that the second one is rises to 50/99. So p = 1/2 + 1/2(50/99) = 0. 752525...
(This is an example of conditional probabilities.) Note that this calculation is much simpler than the calculation of
50
, a 30 digit number. The probability that all states are represented is
p = 2^50
Poker. The number of poker hands is
5
, about 2.5 million. Of these, only 4 give a royal flush. The odds of being dealt a royal flush are worse than 600,000 to one. The probability p of a flush can be found by noting that there are
5
hands that are all spades; thus
p = 4
Note that some of these flushes may have higher values, e.g. a royal flush is included in the count above. The probability p of just a pair (not two pair, or three of a kind, or a full house) is also not too hard to compute. There are 13 possible values for the pair. The pair also determines 2 suits, which can have
2
possible values.( The remaining cards must represent different values, so there are 12 3
choices for them. Once they are put in numerical order, they give a list of 3 suits, with 4^3 possibilities. Thus the number of hands with just a pair is
N = 13
and the probability is p = N/
5
which gives about 42%. There is almost a 50% chance of having at least a pair.
Bridge. The number of bridge hands, N =
13
, is more than half a trillion. The probability of a perfect hand (all one suit) is 4/N , or about 158 billion
to one. A typical report of such an occurrence appears in the Sharon Herald (Pennsylvania), 16 August 2010. Is this plausible? (Inadequate shuffling may play a role.) Note: to win with such a hand, you still need to win the bidding and have the lead. There are 263,333 royal flushes for every perfect hand of bridge.
Flags. The number of ways to fly k flags on n poles (where the vertical order of the flags matters) is N = n(n + 1) · · · (n + k − 1). This is because there are n positions for the first flag but n + 1 for the second, because it can go above or below the first. If the flags all have the same color, there are
N k!
n + k − 1 k
n + k − 1 n − 1
arrangements. This is the same as the number of monomials of degree k in n variables. One can imagine choosing n − 1 moments for transition in a product of k elements. Until the first divider is reached, the terms in the product represent the variable x 1 ; then x 2 ; etc.
Three types of occupation statistics. There are three types of common sample spaces or models for k particles occupying n states, or k balls drop- ping into n urns, etc. In all these examples, points in the sample space have equal probability; but the sample spaces are different. Maxwell–Boltzmann statistics. The balls are numbered 1,... k and the sample space is the set of sequences (a 1 ,... , ak) with 1 ≤ ai ≤ n. Thus S is the set of maps f : k → n. With n = 365, this is used to model to birthdays occurring in class of size k. Bose–Einstein statistics. The balls are indistinguishable. Thus the sam- ple space is just the number of balls in each urn: the set of (k 1 ,... , kn) such that
ki = k. Equivalently S is the quotient of the set of maps f : k → n by the action of Sk. Fermi–Dirac statistics. No more than one ball can occupy a given urn, and the balls are indistinguishable. Thus the sample space S is just the collection of subsets A ⊂ n such that |A| = k; it satisfies |S| =
(n k
Indistinguishable particles: Bosons. How many ways can k identical particles occupy n different cells (e.g. energy levels)? This is the same as flying identical flags; the number of ways is the number of solutions to
k 1 + · · · + kn = k
with ki ≥ 0, and is given by
(n+k− 1 k
as we have seen.
When a book of length n has k misprints, these must occur in distinct positions, so misprints are sometimes modeled on fermions.
Samples: the hypergeometric distribution. Suppose there are A de- fects among N items. We sample n items. What is the probability of finding a defects? It’s given by:
pa =
n a
N − n A − a
(Imagine the N items in order; mark A at random as defective, and then sample the first n.) Note that
pa = 1. We have already seen a few instances of it: for example, the probability that a sample of 2 senators includes none from a committee of 50 is the case n = 2, N = 100, A = 50 and a = 0. The probability of 3 aces in a hand of bridge is
p 3 =
while the probability of no aces at all is
p 0 =
Single samples. The simple identity ( N − 1 A − 1
shows that p 1 = A/N. The density of defects in the total population gives the probability that any single sample is defective.
Symmetry. We note that pa remains the same if the roles of A and n are interchanged. Indeed, we can imagine choosing 2 subsets of N , with cardinalities A and n, and then asking for the probability pa that their overlap is a. This is given by the equivalent formula
pa =
a
N − a n − a, A − a
n
which is visibly symmetric in (A, n) and can be simplified to give the formula above. (Here
( (^) a b,c
= a!/(b!c!(a − b − c)!) is the number of ways of choosing disjoint sets of size b and c from a universe of size a.) Here is the calculation
showing agreement with the old formula. We can drop
A
from both sides. Then we find: ( N a
N − a n − a, A − a
n
N !(N − a)!n!(N − n)! a!(N − a)!(n − a)!(A − a)!(N − n − A + a)!N!
= n!(N − n)! (n − a)!a!(A − a)!(N − n − A + a)!
n a
N − n A − a
as desired.
Limiting case. If N and A go to infinity with A/N = p fixed, and n, a fixed, then we find
pa →
n a
pa(1 − p)n−a.
This is intuitively justified by the idea that in a large population, each of n samples independently has a chance A/N of being defective. We will later study in detail this important binomial distribution. To see this rigorously we use a variant of the previous identity: ( N − 1 A
We already know (^) ( N − a A − a
)a ( N A
and the identity above implies
( N − n A − a
)n−a ( N − a A − a
This yields the desired result.
Statistics and fish. The hypergeometric distribution is important in statistics: a typical problem there is to give a confident upper bound for A based solely on a. In Lake Champlain, 1000 fish are caught and marked red. The next day another 1000 fish are caught and it is found that 50 are red. How many fish are in the lake? Here we know n = 1000, a = 50 and A = 1000, but we don’t know N. To make a guess we look at the value of N ≥ 1950 which makes p 50 as large as possible — this is the maximum likelihood estimator. The value N = 1950 is very unlikely — it means all fish not captured are red. A very large value
1 1
p 2
q 3
p 3 q 2
q 1
0
p
Figure 1. Formulas for waiting times:
kpk = 1 +
qk.
Expected waiting time. Suppose an event occurs at the kth trial with probability pk, with
1 pk^ = 1. Then the expected waiting time to see the event is
W =
1
kpk = 1 +
1
qk,
where qk is the probability of no success through the kth trial. This equality is explained in Figure 1. The heights of the rectangles are pk and qk respectively. The total area enclosed is
kpk, but if we shift the graph one unit to the left, we lose a rectangle of area 1 and get a new area of
qk. Example: The average (not median) number of trials needed to see an event of probability p is 1/p. Indeed, the probability of no success in the first k trials is qk, where q = 1 − p. Thus W = 1 +
1 q k (^) = 1/(1 − q) = 1/p. A more intuitive explanation is the following. In a large number of N trials we expect to see about k ≈ pN events. The waiting times for each event satisfy t 1 + · · · + tk = N , so their average is N/k ≈ N/pN = 1/p. We will later see examples where the average waiting time is infinite.
Expected number of defective samples. The hypergeometric distribu- tion gives a rather complicated formula for the probability pa = P (X = a) of finding exactly a defects. But the expected value E(X) =
apa is easy to evaluate: it is n(A/N ). This is because E(X) =
∑n 1 E(Xi) where^ Xi^ = 1 if the ith sample is defective and 0 otherwise. And it is easy to see that E(Xi) = A/N.
Median versus mean. If the grades in a class are CCCA, then the median grade is a C, but the average grade is between C and A — most students
are below average.
Stirling’s formula. For smallish values of n, one can find n! by hand, in a table or by computer, but what about for large values of n? For example, what is 1,000,000!?
Theorem II.1 (Stirling’s formula) For n → ∞, we have
n! ∼
2 πn(n/e)n^ =
2 πnn+1/^2 e−n,
meaning the ratio of these two quantities tends to one.
Sketch of the proof. Let us first estimate L(n) = log(n!) =
∑n 1 log(k) by an integral. Since (x log x − x)′^ = log x, we have
L(n) ≈
∫ (^) n+
1
log x dx = (n + 1) log(n + 1) − n.
In fact rectangles of total area L(n) fit under this integral with room to spare; we can also fit half-rectangles of total area about (log n)/2. The remaining error is bounded and in fact tends to a constant; this gives
L(n) = (n + 1/2) log n − n + C + o(1),
which gives n! ∼ eC^ nn+1/^2 e−n^ for some C. The value of C will be determined in a natural way later, when we discuss the binomial distribution.
Note we have used the fact that limn→∞ log(n + 1) − log(n) = 0.
Appendix: Some calculus facts. In the above we have used some ele- mentary facts from algebra and calculus such as:
n(n + 1) 2 = 1 + 2 + · · · + n,
ex^ = 1 + x +
x^2 2!
0
xn n!
ex^ = lim n→∞
x n
log(1 + x) = x − x^2 /2 + x^3 / 3 − · · · =
1
(−1)n+1xn/n.
This last follows from the important formula
1 + x + x^2 + · · · =
1 − x
To describe the walk, which just need to choose which steps are positive. Thus the number of walks from (0, 0) to (n, x) is given by
Nn,x =
p + q p
p + q q
n (n + x)/ 2
n (n − x)/ 2
In particular, the number of random walks that return to the origin in 2n steps is given by
N 2 n, 0 =
2 n n
Coin flips. We can think of a random walks as a record of n flips of a coin, and sk as the difference between the number of heads and tails seen so far. Thus px = Nn,x/ 2 n^ is the probability of x more heads than tails, and N 2 n, 0 is the probability of seeing exactly half heads, half tails in 2n flips. We will later see that for fixed n, N 2 n,x approximates a bell curve, and N 2 n, 0 is the highest point on the curve.
Pascal’s triangle. The number of paths from (0, 0) to (n, k) is just the sum of the number of paths to (n − 1 , k − 1) and (n − 1 , k + 1). This explains Pascal’s triangle; the table of binomial coefficients is the table of the values of Nn,x, with x horizontal and n increasing down the page.
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1
We can also consider walks which begin at 0, and possibly end at 0, but which must otherwise stay on the positive part of the axis. The number of such paths Pn,x which end at x after n steps can also be computed recursively by ignoring the entries in the first column when computing the next row. Here we have only shown the columns x ≥ 0.
1 1 1 1 1 1 1 2 1 2 3 1 2 5 4 1 5 9 5 1 5 14 14 6 1
The ballot theorem. There is an elegant relationship between ordinary random walks, positive random walks, and random loops. To develop this relationship, we will first show:
Theorem III.1 The probability that a random walk from (0, 0) to (n, x), x > 0 never returns to the origin is exactly its slope, x/n.
This gives the ratio between corresponding terms in Pascal’s triangle and its positive version; for example, 14/56 = 2/8 = 1/4. (We will later see, however, that most random walks of length n have slope x/n close to zero!)
Corollary III.2 (The ballot theorem) Suppose in an election, one can- didate gets p votes and another q < p votes. Then the probability that the first leads throughout the counting of ballots is (p − q)/(p + q).
The reflection principle. Let A = (0, a) and B = (n, b) be two points with a, b > 0. Let A′^ = (0, −a) be the reflection of A through the x-axis.
The number of paths from A to B that touch the x-axis is the same as the number of paths from A′^ to B.
To see this, look at the first point P where the path from A to B hits the horizontal axis, and reflect it across the axis to obtain a path from A′^ to B.
Proof of Theorem III.1. The total number of walks to (n, x) = (p + q, p − q) is
N = Nn,x =
p + q p
p + q q
Of these, N+ pass through (1, 1) and N− pass through (1, −1). Thus
N = N+ + N− = Nn− 1 ,x− 1 + Nn− 1 ,x+1.
By Stirling’s formula, we have
N 2 n,n ∼
2 π
(2n)^2 n+1/^2 e−^2 n (nn+1/^2 e−n)^2
2 π
22 n
n
22 n √ πn
Thus the probability of a loop in 2n steps is
u 2 n = 2−^2 nN 2 n,n ∼
πn
We have u 0 = 1 > u 2 > u 4 → 0. Is this value for u 2 n plausible? If we think of sn as a random variable in [−n, n] which is mostly likely of size
n, then it is reasonable that the chance that sn is exactly zero is about 1/
n.
Loops and first returns. There is an elegant relation between loops of length 2n and paths of length 2n which never reach the origin again. Namely we have:
Theorem III.3 The number of paths which do not return to the origin by epoch 2 n is the same as the number of loops of length 2 n.
This says that the value of the middle term in a given row of Pascal’s triangle is the twice the sum of the terms in the same row of the half-triangle, excluding the first.
Proof. A path which does not return to the origin is positive or negative. If positive, then at epoch 2n it must be at position 2k, k > 0. The number of such paths, as a function of k, is given by:
P 2 n, 2 = N 2 n− 1 , 1 − N 2 n− 1 , 3 , P 2 n, 4 = N 2 n− 1 , 3 − N 2 n− 1 , 5 , P 2 n, 6 = N 2 n− 1 , 5 − N 2 n− 1 , 3 ,...
(and for k large enough, all 3 terms above are zero). Summing these terms and multiplying by two to account for the negative paths, we obtain a total of
2 N 2 n− 1 , 1 = 2
2 n − 1 n − 1
paths with no return to the origin. But
2 N 2 n− 1 , 1 =
2 n n
2 n − 1 n − 1
2 n n
= N 2 n, 0
is also the number of loops.
Event matching proofs. This last equality is also clear from the perspec- tive of paths: loops of length 2n are the same in number as walks of one step less with s 2 n− 1 = ±1. The equality of counts suggests there should be a geometric way to turn a path with no return into a loop, and vice-versa. See Feller, Exercise III.10. (the argument is due to Nelson).
Corollary III.4 The probability that the first return to the origin occurs at epoch 2 n is: f 2 n = u 2 n− 2 − u 2 n.
Proof. The set of walks with first return at epoch 2n is contained in the set of those with no return through epoch 2n − 2; with this set, we must exclude those with no return through epoch 2n.
Ballots and first returns. The ballot theorem also allows us to compute F 2 n, the number of paths which make a first return to the origin at epoch 2 n; namely, we have:
F 2 n =
2 n − 1
2 n n
To see this, note that F 2 n is number of walks which arrive at ±1 in 2n − 1 steps without first returning to zero. Thus it is twice the number which arrive at 1. By the ballot theorem, this gives
F 2 n =
2 n − 1
2 n − 1 n − 1
2 n − 1
2 n n
2 n − 1 n − 1
2 n − 1
2 n n
This gives f 2 n = 2−^2 nF 2 n =
u 2 n 2 n − 1
Recurrence behavior. The probability u 2 n of no return goes to zero like 1 /
n; thus we have shown:
Theorem III.5 With probability one, every random walk returns to the origin infinitely often.
How long do we need to wait until the random walk returns? We have u 2 = 1/2 so the median waiting time is 2 steps.