Chapter 1: Stochastic Processes: STATS 310 Statistics STATS 210 Foundations of Statistics and Probability
Chapter 1: Stochastic Processes: STATS 310 Statistics STATS 210 Foundations of Statistics and Probability
STATS 310
Statistics
STATS 210 Randomness in Pattern
Foundations of
Statistics and Probability
Tools for understanding randomness
(random variables, distributions) STATS 325
Probability
Randomness in Process
Stats 210: laid the foundations of both Statistics and Probability: the tools for
understanding randomness.
Stats 310: develops the theory for understanding randomness in pattern: tools
for estimating parameters (maximum likelihood), testing hypotheses, modelling
patterns in data (regression models).
Stats 325: develops the theory for understanding randomness in process. A
process is a sequence of events where each step follows from the last after a
random choice.
Gambler’s Ruin
You start with $30 and toss a fair coin
repeatedly. Every time you throw a Head, you
win $5. Every time you throw a Tail, you lose
$5. You will stop when you reach $100 or when
you lose everything. What is the probability that
you lose everything? Answer: 70%.
5
Winning at tennis
What is your probability of winning a game of tennis,
starting from the even score Deuce (40-40), if your
probability of winning each point is 0.3 and your
q
opponent’s is 0.7?
p VENUS p VENUS
WINS (W)
Answer: 15%. DEUCE (D)
AHEAD (A)
q VENUS VENUS
BEHIND (B) q LOSES (L)
p
Winning a lottery
You watch the lottery draw on TV and your numbers match the winning num-
bers!!! Only a one-in-a-million chance, and there were only a million players,
so surely you will win the prize?
Not quite. . . What is the probability you will win? Answer: only 63%.
Drunkard’s walk
A very drunk person staggers to left and right as he walks along. With each
step he takes, he staggers one pace to the left with probability 0.5, and one
pace to the right with probability 0.5. What is the expected number of paces
he must take before he ends up one pace to the left of his starting point?
Arrived!
Have you received a chain letter like this one? Just send $10 to the person
whose name comes at the top of the list, and add your own name to the bottom
of the list. Send the letter to as many people as you can. Within a few months,
the letter promises, you will have received $77,000 in $10 notes! Will you?
Answer: it depends upon the response rate. However, with a fairly realistic
assumption about response rate, we can calculate an expected return of $76
with a 64% chance of getting nothing!
Note: Pyramid selling schemes like this are prohibited under the Fair Trading Act,
and it is illegal to participate in them.
Spread of SARS
The figure to the right shows the spread
of the disease SARS (Severe Acute
Respiratory Syndrome) through Singapore
in 2003. With this pattern of infections,
what is the probability that the disease
eventually dies out of its own accord?
Answer: 0.997.
7
What is the expected number of activities for a tour starting from the museum?
1/3
2. Cruise 4. Flying Fox 1
1/3 6. Geyser 1
1/3 1/3
1/3 1/3
1/3
1. Museum 3. Buried Village 5. Hangi
1/3 1/3
1/3
1/3 1/3
1
7. Helicopter 8. Volcano
1 Answer: 4.2.
Example:
Random experiment: Toss a coin once.
Sample space: Ω ={head, tail}
Example:
Random experiment: Toss a coin once.
Sample space: Ω = {head, tail}.
An example of a random variable: X : Ω → R maps “head” → 1, “tail” → 0.
Thus a discrete-time process is {X(0), X(1), X(2), X(3), . . .}: a random number
associated with every time 0, 1, 2, 3, . . .
Definition: The state space, S, is the set of real values that X(t) can take.
Every X(t) takes a value in R, but S will often be a smaller set: S ⊆ R. For
example, if X(t) is the outcome of a coin tossed at time t, then the state space
is S = {0, 1}.
The state space S is the set of states that the stochastic process can be in.
10
1. Binomial distribution
Notation: X ∼ Binomial(n, p).
Description: number of successes in n independent trials, each with proba-
bility p of success.
Probability function:
n x
fX (x) = P(X = x) = p (1 − p)n−x for x = 0, 1, . . . , n.
x
Mean: E(X) = np.
Variance: Var(X) = np(1 − p) = npq, where q = 1 − p.
Sum: If X ∼ Binomial(n, p), Y ∼ Binomial(m, p), and X and Y are
independent, then
X + Y ∼ Bin(n + m, p).
2. Poisson distribution
Notation: X ∼ Poisson(λ).
Description: arises out of the Poisson process as the number of events in a
fixed time or space, when events occur at a constant average rate. Also
used in many other situations.
λx −λ
Probability function: fX (x) = P(X = x) = e for x = 0, 1, 2, . . .
x!
Mean: E(X) = λ.
Variance: Var(X) = λ.
Sum: If X ∼ Poisson(λ), Y ∼ Poisson(µ), and X and Y are independent,
then
X + Y ∼ Poisson(λ + µ).
11
3. Geometric distribution
Notation: X ∼ Geometric(p).
1−p q
Mean: E(X) = = , where q = 1 − p.
p p
1−p q
Variance: Var(X) = = , where q = 1 − p.
p2 p2
Sum: if X1, . . . , Xk are independent, and each Xi ∼ Geometric(p), then
X1 + . . . + Xk ∼ Negative Binomial(k, p).
Probability function:
k+x−1 k
fX (x) = P(X = x) = p (1 − p)x for x = 0, 1, 2, . . .
x
k(1 − p) kq
Mean: E(X) = = , where q = 1 − p.
p p
k(1 − p) kq
Variance: Var(X) = = 2 , where q = 1 − p.
p2 p
Sum: If X ∼ NegBin(k, p), Y ∼ NegBin(m, p), and X and Y are independent,
then
X + Y ∼ NegBin(k + m, p).
12
5. Hypergeometric distribution
Notation: X ∼ Hypergeometric(N, M, n).
Description: Sampling without replacement from a finite population. Given
N objects, of which M are ‘special’. Draw n objects without replacement.
X is the number of the n objects that are ‘special’.
Probability function:
M N −M
x n−x x = max(0, n + M − N )
fX (x) = P(X = x) = N
for
to x = min(n, M).
n
M
Mean: E(X) = np, where p = .
N
N − n M
Variance: Var(X) = np(1 − p) , where p = .
N −1 N
6. Multinomial distribution
Notation: X = (X1, . . . , Xk ) ∼ Multinomial(n; p1, p2, . . . , pk ).
Description: there are n independent trials, each with k possible outcomes.
Let pi = P(outcome i) for i = 1, . . . k. Then X = (X1 , . . . , Xk ), where Xi
is the number of trials with outcome i, for i = 1, . . . , k.
Probability function:
n!
fX (x) = P(X1 = x1, . . . , Xk = xk ) = px1 1 px2 2 . . . pxk k
x1 ! . . . xk !
k
X X k
for xi ∈ {0, . . . , n} ∀i with xi = n, and where pi ≥ 0 ∀i , pi = 1.
i=1 i=1
1. Uniform distribution
2. Exponential distribution
Notation: X ∼ Exponential(λ).
3. Gamma distribution
k
Mean: E(X) = .
λ
k
Variance: Var(X) = .
λ2
Sum: if X1, . . . , Xn are independent, and Xi ∼ Gamma(ki, λ), then
X1 + . . . + Xn ∼ Gamma(k1 + . . . + kn , λ).
4. Normal distribution
Mean: E(X) = µ.
Variance: Var(X) = σ 2 .
Exponential(λ)
λ=2
λ=1
Gamma(k, λ)
k = 2, λ = 1
k = 2, λ = 0.3
Normal(µ, σ 2 )
σ=2
σ=4