Stochastic Processes - lesson 2
Bo Friis Nielsen
Institute of Mathematical Modelling Technical University of Denmark 2800 Kgs. Lyngby – Denmark Email: bfn@imm.dtu.dk
Outline Outline
• Basic probability theory (from last lesson)
Outline Outline
• Basic probability theory (from last lesson)
• Random variables
Outline Outline
• Basic probability theory (from last lesson)
• Random variables
Discrete random variables
Outline Outline
• Basic probability theory (from last lesson)
• Random variables
Discrete random variables Continouos random variables
Outline Outline
• Basic probability theory (from last lesson)
• Random variables
Discrete random variables Continouos random variables
• Reading recommendations
Basic formulas in probability theory Basic formulas in probability theory
Sample value/outcome ω
Event A, B
Sample space Ω Set of possible events
Complementary event A¯ = Ω A
Union A ∪ B The outcome is in at least
one of A and B
Joint event - intersection A ∩ B The outcome is in both A and B
Conditional event A|B The event A knowing that B has occurred
The empty or impossible event ∅
P{Ω} = 1 P{∅} = 0
P{Ω} = 1 P{∅} = 0
P{A}¯ = 1 − P{A}
P{Ω} = 1 P{∅} = 0
P{A}¯ = 1 − P{A}
P{A ∩ B} = P {A} + P {B} − P{A ∪ B}
P{Ω} = 1 P{∅} = 0
P{A}¯ = 1 − P{A}
P{A ∩ B} = P {A} + P {B} − P{A ∪ B}
Conditional probability
P{Ω} = 1 P{∅} = 0
P{A}¯ = 1 − P{A}
P{A ∩ B} = P {A} + P {B} − P{A ∪ B}
Conditional probability
P{A|B} = P {A ∩ B} P{B}
P{Ω} = 1 P{∅} = 0
P{A}¯ = 1 − P{A}
P{A ∩ B} = P {A} + P {B} − P{A ∪ B}
Conditional probability
P{A|B} = P {A ∩ B}
P{B} ⇔ P{A} = P{A|B}P {B}
Law of total probability
∪iBi = Ω
Law of total probability
∪iBi = Ω Bi ∩ Bj = ∅ i 6= j
Law of total probability
∪iBi = Ω Bi ∩ Bj = ∅ i 6= j
P {A} = X
i=1
P {A|Bi}P{Bi}
Law of total probability
∪iBi = Ω Bi ∩ Bj = ∅ i 6= j
P {A} = X
i=1
P {A|Bi}P{Bi} Independent events
P{A ∩ B} = P{A}P {B}
Random variables
Random variables
Random variables Random variables
• Real valued function of an outcome X(ω) → R
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function F(x) = P {X ≤ x}
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function F(x) = P {X ≤ x}
• Discrete random variables
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function F(x) = P {X ≤ x}
• Discrete random variables
Discrete countable sample space
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function F(x) = P {X ≤ x}
• Discrete random variables
Discrete countable sample space
• Continouos random variables
Random variables Random variables
• Real valued function of an outcome X(ω) → R
• Characterised by cumulative distribution function F(x) = P {X ≤ x}
• Discrete random variables
Discrete countable sample space
• Continouos random variables
Continouos uncountable sample space
Discrete random variables
Discrete random variables
Discrete random variables Discrete random variables
• Discrete state space
Discrete random variables Discrete random variables
• Discrete state space
Usually integer valued (can always be transformed to be integervalued)
Discrete random variables Discrete random variables
• Discrete state space
Usually integer valued (can always be transformed to be integervalued)
• Frequency/probability density function (pdf)
Discrete random variables Discrete random variables
• Discrete state space
Usually integer valued (can always be transformed to be integervalued)
• Frequency/probability density function (pdf) f(x) = P{X = x}
Discrete random variables Discrete random variables
• Discrete state space
Usually integer valued (can always be transformed to be integervalued)
• Frequency/probability density function (pdf) f(x) = P{X = x}
• Cumulative distribution function (CDF)
Discrete random variables Discrete random variables
• Discrete state space
Usually integer valued (can always be transformed to be integervalued)
• Frequency/probability density function (pdf) f(x) = P{X = x}
• Cumulative distribution function (CDF)
Example 1 Bernoulli distribution
Example 1 Bernoulli distribution
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
• Two possibilites
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
• Two possibilites Accept/failure Male/female Rain/not rain
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
• Two possibilites Accept/failure Male/female Rain/not rain
• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
• Two possibilites Accept/failure Male/female Rain/not rain
• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1
Example 1 Bernoulli distribution Example 1 Bernoulli distribution
• Simplest possible random experiment
• Two possibilites Accept/failure Male/female Rain/not rain
• One of the possibilities mapped to 1, X(failure) = 0, X(accept) = 1
P{accept} = P {X = 1} = f(1) = p, P{failure} = P {X = 0} = f(0) = 1 − p
Example 2 binomial distribution Example 2 binomial distribution
• Collection of independent Bernoulli experiments
Example 2 binomial distribution Example 2 binomial distribution
• Collection of independent Bernoulli experiments n identical experiments
Each with probability p for success Experiments mutually independent
Example 2 binomial distribution Example 2 binomial distribution
• Collection of independent Bernoulli experiments n identical experiments
Each with probability p for success Experiments mutually independent
• A number of practical applications
Example 2 binomial distribution Example 2 binomial distribution
• Collection of independent Bernoulli experiments n identical experiments
Each with probability p for success Experiments mutually independent
• A number of practical applications
Number of items passed in quality control Number of male locusts
Number of left turning vehicles
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
P{X = x}
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
P{X = x}
? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
P{X = x}
? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2
?
n x
sequences with x successes
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
P{X = x}
? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2
?
n x
sequences with x successes
? In conclusion
f(x) = P{X = x} =
n
px(1 − p)n−x
binomial distribution - continued binomial distribution - continued
• X The total number of successes - sequence less important
P{X = x}
? Sequence FFSSSSFSS has probability (1 − p)2p4(1 − p)p2
?
n x
sequences with x successes
? In conclusion
f(x) = P{X = x} =
n x
px(1 − p)n−x
0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18
Binomial distribution n=20 p = 0.5
’bincf.lst’
Moments - mean value
Moments - mean value
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Single descriptor of the distribution.
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Single descriptor of the distribution.
First order information
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Single descriptor of the distribution.
First order information
The natural value to use if you want to ignore randomness
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Single descriptor of the distribution.
First order information
The natural value to use if you want to ignore randomness
• Expected values
Moments - mean value Moments - mean value
• A measure for the location of the probability mass.
Single descriptor of the distribution.
First order information
The natural value to use if you want to ignore randomness
• Expected values
Theoretical average
• Mathematical definition of mean value
E(X) = P∞x=−∞ xf(x)
• Mathematical definition of mean value
E(X) = P∞x=−∞ xf(x)
• Properties
• Mathematical definition of mean value
E(X) = P∞x=−∞ xf(x)
• Properties
E(aX + b) = aE(X) + b
• Mathematical definition of mean value
E(X) = P∞x=−∞ xf(x)
• Properties
E(aX + b) = aE(X) + b
E(X + Y ) = E(X) + E(Y )
• Mathematical definition of mean value
E(X) = P∞x=−∞ xf(x)
• Properties
E(aX + b) = aE(X) + b
E(X + Y ) = E(X) + E(Y )
Example Bernoulli
? E(X) = 0 · (1 − p) + 1 · p = p
• Example binomial
E(X) = np (mean of sum of n identical distributed variables)
• Example binomial
E(X) = np (mean of sum of n identical distributed variables)
Alternatively directly from definition E(X) =
n
X
x=0
xf(x) =
n
X
x=0
x
n x
px(1 − p)n−x =
• Example binomial
E(X) = np (mean of sum of n identical distributed variables)
Alternatively directly from definition E(X) =
n
X
x=0
xf(x) =
n
X
x=0
x
n x
px(1 − p)n−x =
n
X
x=0
x n!
x!(n − x)!px(1−p)n−x =
n
X
x=1
n!
(x − 1)!(n − x)!px(1−p)n−x
• Example binomial
E(X) = np (mean of sum of n identical distributed variables)
Alternatively directly from definition E(X) =
n
X
x=0
xf(x) =
n
X
x=0
x
n x
px(1 − p)n−x =
n
X
x=0
x n!
x!(n − x)!px(1−p)n−x =
n
X
x=1
n!
(x − 1)!(n − x)!px(1−p)n−x
n
X np (n − 1)!
− − − − px−1(1−p)(n−1)−(x−1)
• Example binomial
E(X) = np (mean of sum of n identical distributed variables)
Alternatively directly from definition E(X) =
n
X
x=0
xf(x) =
n
X
x=0
x
n x
px(1 − p)n−x =
n
X
x=0
x n!
x!(n − x)!px(1−p)n−x =
n
X
x=1
n!
(x − 1)!(n − x)!px(1−p)n−x
n
X
x=1
np (n − 1)!
(x − 1)!((n − 1) − (x − 1))!px−1(1−p)(n−1)−(x−1)
Variance
Variance
Variance Variance
• Measures irregularity of distribution - variation
Variance Variance
• Measures irregularity of distribution - variation
• Second order information
• Mathematical definition
• Mathematical definition
V (X) = P∞x=−∞(x − E(X))2f(x)
• Mathematical definition
V (X) = P∞x=−∞(x − E(X))2f(x)
• Properties
• Mathematical definition
V (X) = P∞x=−∞(x − E(X))2f(x)
• Properties
V (aX + b) = a2V (X)
• Mathematical definition
V (X) = P∞x=−∞(x − E(X))2f(x)
• Properties
V (aX + b) = a2V (X)
V (X + Y ) = V (X) + V (Y ) if X and Y are independent
Example Bernoulli/Binomial
Example Bernoulli/Binomial
Example Bernoulli/Binomial Example Bernoulli/Binomial
• X ∈ be(p)
Example Bernoulli/Binomial Example Bernoulli/Binomial
• X ∈ be(p)
V (X) = P1x=0(x − E(X))2f(x) =
(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)
Example Bernoulli/Binomial Example Bernoulli/Binomial
• X ∈ be(p)
V (X) = P1x=0(x − E(X))2f(x) =
(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)
• Y ∈ B(n, p)
Example Bernoulli/Binomial Example Bernoulli/Binomial
• X ∈ be(p)
V (X) = P1x=0(x − E(X))2f(x) =
(0 − p)2(1 − p) + (1 − p)2p = p(1 − p)
• Y ∈ B(n, p)
• V (Y ) = np(1 − p)
Example 4 Poisson distribution Example 4 Poisson distribution
• Unlimited number of occurrences
Example 4 Poisson distribution Example 4 Poisson distribution
• Unlimited number of occurrences
Number of accidents during a year in a traffic crossing Number of weak points in steel plate
Number of sick days in large company Number of fish in trawl catch
Example 4 Poisson distribution Example 4 Poisson distribution
• Unlimited number of occurrences
Number of accidents during a year in a traffic crossing Number of weak points in steel plate
Number of sick days in large company Number of fish in trawl catch
• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed
Example 4 Poisson distribution Example 4 Poisson distribution
• Unlimited number of occurrences
Number of accidents during a year in a traffic crossing Number of weak points in steel plate
Number of sick days in large company Number of fish in trawl catch
• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed
Example 4 Poisson distribution Example 4 Poisson distribution
• Unlimited number of occurrences
Number of accidents during a year in a traffic crossing Number of weak points in steel plate
Number of sick days in large company Number of fish in trawl catch
• Limiting distribution for binomial distribution with n → ∞ and np = µ fixed
• f(x) = P{x occurrences} = µx!xe−µ
Reading recommendations Reading recommendations
• Generally you should read in order to grasp concepts and get an intuitive understanding of the feel. You should be able to understand formulas to a level such that you can apply them in a proper context
for Tuesday September 5: 1.1-1.5 and 1.7
for Friday September 8 and Tuesday September 12, read Chapter 2 lightly and Chapter 3 section: 3.1-3.7. You
can skip proofs if you like.