Lecture 4-5-6 - Random Variables
Lecture 4-5-6 - Random Variables
Random Variables
S
E1
a b x
E 1 = (a < X ≤ b )
Ex: Settlement
X = random variable (uncertain value)
x = realization of variable (known value)
1
Discrete Random Variable
Probability Mass Function
03
0.3
0.2
0.1
0
1 1.5 2 2.5 3
Remediation Cost ($ Million)
2
Continuous Random Variables
Probability Density Function
fX(x)dx
1 15
1.5 2 dx 2.5
25 3
Remediation Cost ($ Million)
fX ( x) = probability density function
P( X = x) = fX (x) dx
3
fX ( x)
x 2m
FX ( x m ) = = 0. 5 ⇒ xm = 2
4
x% = 2
4
Random Variables Descriptors
Dispersion
∞
Var (X) = E[(X − μ) ] = ∫ (x − μ) f X (x)dx
2 2
VARIANCE:
−∞
σ
COEFFICIENT OF VARIATION: δ=
μ
0
2 8 6 4 0
σ = 0. 222 = 0. 471
0. 471
δ= = 0. 354
43
0 0.5 1 1.5 2
x
5
Random Variables Descriptors
nth Moment of a Random Variable
∞
( )= ∫x
n n
E(X f X ((x)dx
)
−∞
First Moment = E(X)
Second Moment = E ( X2 )
Mathematical Expectation
∞
E[g(X)] = ∫ g(x)f X (x)dx
−∞
f X (x)
( )
-6 -4 -2 0 2 4 6 8
x
6
Normal Distribution (Gaussian)
X = N( μ , σ )
N(1,1) N(3,1)
N(1,2)
-6 -4 -2 0 2 4 6 8
x
X = N(μ , σ )
1 ⎛ x− μ ⎞ 2
1 −
⎝ σ ⎠
f X (x) = e 2 −∞<x <∞
σ 2π
⎛ x − μ ⎟⎞
F X (x) = Φ⎜ evaluated from tables or spreadsheets
⎝ σ ⎠
Φ((0) = 0.5
Φ
Φ(1) = 0. 841
Φ (− s) = 1 − Φ (s) by symmetry
Φ(2) = 0. 977
Φ(3) = 0. 9987
7
Normal Distribution (Gaussian)
P(μ − σ < X ≤ μ + σ ) = Φ(1) − Φ(−1) = 0. 841 − (1 − 0. 841) = 0. 682
P(μ − 2σ < X ≤ μ + 2σ ) = Φ(2 ) − Φ(− 2) = 0. 977 − (1 − 0. 977) = 0. 954
P(μ − 3σ < X ≤ μ + 3σ ) = Φ( 3) − Φ(−3) = 0. 9987 − (1 − 0. 9987 ) = 0. 997
0.68 N(0,1)
Standard Normal Distribution
-4 -3 -2 -1 0 1 2 3 4
x
0.96 N(0,1)
Standard Normal Distribution
-4 -3 -2 -1 0 1 2 3 4
x
8
Normal Distribution (Gaussian)
X = N(μ , σ )
E ( X) = μ, Var (X ) = σ 2
1 2 1 2
Flow River 1 Flow River 2
0.5
0.25 0.25
2 3 4
Flow River 1 + Flow in River 2
9
Normal Distribution (Example)
L = Load on Column: N(200,30) kips
0.01 N(200,30)
0.005
0
100 125 150 175 200 225 250 275 300
Load (Kips)
0.02
P(L<R) = 0.99
0.015
0.01
R=?
0.005
0
100 125 150 175 200 225 250 275 300
Load (Kips)
10
Normal Distribution (Example)
What design Resistance, R, gives a 99% reliability.
P(−∞
( < L ≤ R ) = 0. 99
⎛ R − 200 ⎞ ⎛ R − 200 ⎞
Φ⎜ ⎟ − Φ(−∞) = Φ ⎜ ⎟ − 0 = 0. 99
⎝ 30 ⎠ ⎝ 30 ⎠
R − 200
0.02
= Φ −1 (0. 99) = 2. 33
30 0.015
0.01 R=?
R = 2. 33(30) + 200 = 270 kips
0.005
0
100 125 150 175 200 225 250 275 300
Load (Kips)
Lognormal Distribution
X = LN(λ,ζ)
2
1 ⎛ ln (x) −λ ⎞
−
1 2⎝ ζ ⎠
f X (x) = e 0≤x<∞
xζ 2π
f X ((x))
0 5 10
x
11
Lognormal Distribution
LN(1,0.5)
LN(2,0.5)
LN(1,1)
X = LN(λ, ζ)
0 5 10 15 20
x −
1 ⎛ ln (x) −λ ⎞
2
1 2⎝ ζ ⎠
f X (x) = e
N(1,0.5) N(2,0.5) xζ 2π
⎛ ln (x) − λ ⎞
N(1,1) F X (x) = Φ⎜ ⎟
⎝ ζ ⎠
-3 -2 -1 0 1 2 3 4 5
y = ln(x)
Lognormal Distribution
X = LN(λ,ζ)
E( X) = eλ +ζ 2 , Var
V (X) = E(X) 2 (eζ − 1)
2 2
x m = eλ
Special Characteristic of a Lognormal Distribution
12
Lognormal Distribution
Relationship to Normal Distribution
ζ2
λ = E ⎡⎣ln ( X ) ⎤⎦ = ln ( μ X ) −
2
(
ζ 2 = Var ⎡⎣ln ( X ) ⎤⎦ = ln 1 + δ2 )
Note: ζ is approximately equal to δ for δ < 0.3
0.02
0.015
0.005
0
100 125 150 175 200 225 250 275 300
13
Lognormal Distribution (Example)
L = Load on Column: LN (μ = 200 k , σ = 30k )
0.02
LN (μ = 200 k , σ = 30k )
0.015
N (μ = 200 k , σ = 30k )
0.01
0.005
0
100 125 150 175 200 225 250 275 300
0.020000
0.010000
LN(5.29,0.149)
0.005000
0.000000
100 125 150 175 200 225 250 275 300
Load (Kips)
14
Lognormal Distribution (Example)
L = Load on Column: LN (μ = 200 k , σ = 30k )
⎛ ln(260) − 5. 29 ⎞ ⎛ ln (230) − 5. 29 ⎞
P(230 < L ≤ 260) = Φ⎜ ⎟ − Φ⎜ ⎟
⎝ 0 149
0.149 ⎠ ⎝ 0 149
0.149 ⎠
0.020000 = Φ(1. 82) − Φ(0. 994) = 0.966 − 0. 839
= 0.127 (compare with 0.136 for normal )
0.015000 LN(5.29,0.149)
0.010000
0.005000
0.000000
100 125 150 175 200 225 250 275 300
Load (Kips)
0.02
P(L<R) = 0.99
0.015
0.01
R=?
0.005
0
100 125 150 175 200 225 250 275 300
Load (Kips)
15
Lognormal Distribution (Example)
What design Resistance, R, gives a 99% reliability.
P(−∞ < L ≤ R ) = 0. 99
P(
⎛ ln(R) − 5. 29 ⎞ ⎛ ln(R) − 5. 29 ⎞
Φ⎜ ⎟ − Φ(−∞) = Φ⎜ ⎟ − 0 = 0. 99
⎝ 0.149 ⎠ ⎝ 0.149 ⎠
0.02
ln ((R ) − 5.29
= Φ −1 (0.99)
(0 99) = 2.
2 33 0.015
Load (Kips)
Bernoulli Sequence
1 2 3 ... n
S S S S
F F F F
A sequence of N Trials
A
Assumptions
ti
Two possibilities in each trial
Probability of success in each trial is a constant
Occurrence between trials are statistically independent
16
Bernoulli Sequence (Examples)
Earthquakes
T i l (Years)
Trials (Y )
Success (No earthquake)
Failure (Earthquake)
Pile Driving
g
Trials (Meters)
Success (No Boulders)
Failure (Boulders)
Bernoulli Sequence
n!
P( X = x n, p) = px (1 − p) n −x x = 0,1,..., n
x!( n − x )!
E ( X) = np Var ( X ) = np(1 − p)
17
Binomial Distribution (Example)
2 P(at
2. t 1 occ. iin 20 years)) = 1 − P( X = 020, 0. 01)
P( t least
l
20!
P( X = 020, 0. 01) = (0. 01)0 (1 − 0. 01)20−0 = 0. 82
1!(20 − 0)!
Bernoulli Sequence
P(T = t p) = (1 − p )t −1 p t = 0,1,..., n
1 1− p
E(T) = = Re turn Period Var (T) =
p p2
18
Geometric Distribution (Example)
1
2. Return Period: E (T ) = = 100 years
0. 01
Assuming
A i ththe maximum
i wave height
h i ht is
i a random
d
variable that follows a normal distribution with a mean
of 20 m and a standard deviation of 3 m; H = N(20,3)
19
Bernoulli Distribution (Example)
Assuming the maximum wave height is a random
variable that follows a normal distribution with a mean
of 20 m and a standard deviation
de iation of 3 m
m; H = N(20
N(20,3)
3)
⎛ h − 20 ⎞
P(H > h design ) = 1−
1 Φ⎜ ⎟ = 0.
0 00034
⎝ 3 ⎠
Poisson Process
t
Continuous Process
Assumptions
Events can occur at random at any point in time or space
Probability of occurrence in a given interval is proportional
to interval length
Occurrence of an event in a given interval is independent
of occurrences in any other non-overlapping intervals
20
Poisson Process
(νt)x −νt
P(X = x t, ν) = e x = 0,1,...
x!
E ( X) = ν t Var ( X ) = νt
−1
1. P(5 flaws in 100 m) = P( X = 5 t = 100 m, ν = 0.1 m )
[(0.1)(100)]5 −(0 .1)(100)
P( X = 5 t = 100 m, ν = 0.1 m−1 ) = e = 0. 038
5!
Expected No of flaws in 100 m
0.15
E ( X 10, 0. 1) = (0.1)(100) = 10
0.1
0.05
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
x = Number of Occurrences
21
ν
Poisson Process
f T ( t ) = ν e− νt t≥0
FT (t ) = 1 − e −νt
1 1
E(T) = = Re turn Period Var(T) =
ν ν2
Where ν = mean rate of occurrence
1
1. Return Period: E (T ) = = 5 years
0. 2
2. P(no occ. in Return Period) = P( X = 05, 0. 2) = P( T > 5 0. 2)
P(T > 50. 2 ) = e −( 0.2) (5) = 0. 37
22
Poisson Process (Example)
Time between strong earthquakes is exponentially
distributed with a mean time of 50 years. The collapse
probability
p y for a major
j bridge
g is 25 percent
p during
ga
strong earthquake. Assume that bridge collapse events
are statistically independent between earthquakes.
S = no collapse in 10 years
∞
P(S) = ∑ P(S x events )P(x events )
x=0
∞
(νt) x − νt
P(S) = ∑ (1− p )
(1− p )( νt ) − νt −νtp
e =e e =e
x
x=0 x!
23
Multiple Random Variable
RV1 RV2
0.25
0.20
0.15
pX,Y(x,y) 0.10
0.05
0.00
90
6 70
8 50
10 Y (%)
X (hr) 12
24
Multiple Random Variables
X Y (x , y ) = P(X ≤ a ∩ Y ≤ b) =
F X,Y ∫ ∫ f X,Y
X Y (x,
(x y )dydx
−∞ −∞
x pX(x)
0.4
6 0.122
8 0.432 0.3
pX(x)
10 0.317
0.2
12 0.129
1.0 0.1
0.0
6
8
10
12
X (hr)
25
Marginal Probability Distributions
Marginal Probability Density Functions
∞
f Y (y ) = ∫ f X,Y (x, y)dx M
Marginal
i l PMF
−∞
0.5
0.4
90 0.345 0.0
1.0 50
70
90
Y (%)
0.5
Conditional PMF
pY|x(y|x = 8 hr)
0.4
y pY|x(y|x=8)
50 0 0833
0.0833 03
0.3
70 0.500
0.2
90 0.417
1.0 0.1
0.0
50
70
90
Y (%)
26
Multiple Random Variables
Covariance and Correlation
COV( X, Y)
ρ= − 1. 0 ≤ ρ ≤ 1. 0
σXσY
Statistical Independence
fX,Y (x , y) = fX ( x)fY ( y)
COV( X, Y) = 0. 0 and ρ = 0. 0
27
Bivariate Normal Distribution
⎡ 1 ⎛ y − μ Y − ρ(σ Y σ X )( x− μ X ) ⎞ ⎤ ⎡
2
1 ⎛ x −μ X ⎟⎞ ⎤
2
⎢ 1
− ⎜
2
⎟ ⎥ − ⎜
⎢ 1 e 2⎝ σX ⎠ ⎥
e ⎝ σ Y 1−ρ ⎠
2
, (x , y ) = ⎢
f X,Y ⎥⎢
2πσ Y 1 − ρ ⎥
⎥ 2πσ X
2
⎢ 2
⎣ ⎦⎣ ⎦
fX ,Y (x , y) = fY X (y x) fX (x)
Var (Y X = x) = σ 2Y (1 − ρ2 )
00
-1.50
-1
0.00
. 50 y
1.50
x -3
.
3.00
00
28
Example
Wave height (H) and period (Tp) are modeled using a
bivariate normal distribution:
μ H = 10 m , σ H = 2 m , μ T p = 15 s , σ T p = 1.
1 5 s , ρ = 0.
04
⎛ 14 − 11. 6 ⎞
P(H > 14 m ) = 1 − Φ⎜ ⎟ = 1 − Φ(1.31) = 1 − 0. 905 = 0. 095
⎝ 3. 36 ⎠
29