Vous êtes sur la page 1sur 28

11/28/2018

ENGINEERING UNCERTAINTY
Benjamin Heydecker
b.heydecker@ucl.ac.uk

Engineering uncertainties

• Most phenomena involve uncertainties:


Inherent in processes
Uncertainty in parameter values
Errors in measurement
• Engineering design may assume worst conditions
eg the highest conceivable flood, greatest conceivable load
The resulting conservative design could be unduly costly
• With probability and statistics engineers can have a better
understanding of these issues, and hence make better decisions

1
11/28/2018

Introduction

Basic concepts in probability (and statistical analysis):


• Probability
• Random variables
Proportions
Time until next event
Probability distribution functions:
Some standard examples (Normal distribution)

• Reference: Stroud, KA (2007) Programme 28 - Probability,


In: Engineering Mathematics (6th edition).

Mathematics of probability
Empirical definition of probability –
Let:
n – be the number of experiments
fE - be the frequency of occurrence of an event E in an experiment

The probability P(E) of event E is defined as


the limiting relative frequency of occurrence of E as n increases
fE
P ( E )  lim
n  n

Note: 0  P(E)  1

2
11/28/2018

Probability (Example)
Consider event E (either occurs or does not in a trial):
p probability that a trial results in event E occurring
n number of trials
f=0
f number of events pˆ  0
Probability (1-p)2
f= 0
Probability 1-p
NB: 2 ways for 1
Event E with f=1
probability p event to occur pˆ  0.5
in 2 trials Probability 2p(1-p)
f=1
Probability p
f=2
pˆ  1
Probability p2

Estimate p from ratio f /n (f events E in n trials)

Probability (Example)
Relative frequency (proportion) of observations:
P = 0.85 and P = 1/3
1
Estimated proportion P

0.75

0.5

0.25

0
0 25 50 75 100

Number of observations n

3
11/28/2018

Mathematics of probability
Definition of probability

• Subjective (theoretical) probability


- based on analysis, experience and judgment

• Objective (empirical) probability


- based on observations or experiments

• Each is valid in its own context

• Approaches can be combined

NASA Challenger space shuttle


Design of launch stack
Liquified H2
Field joint in SRB
booster

Solid
rocket
boosters

Shuttle

General characteristics
O rings
Length: 37.24 m Empty mass: 68,585 kg
Wingspan: 23.79 m Max. takeoff mass: 109,000 kg
Height: 17.25 m Powerplant: 3 × liquid-fuelled engines, 1.75 MN each

4
11/28/2018

Challenger space shuttle launch


28 January 1986 Launch Field joint in SRB
Ambient temperature 36F (lowest ever)

Effect of temperature on O ring distress


10 C: Boundary of testing
Launch conditions

4 3

0 16
(0 C)
32 36 O rings
(2.2 C) No launch without
O ring distress
>>> Consider all of the data <<<

Conjunction and disjunction


Consider two events: A , B :

• Disjunction: A  B Venn Diagram


A occurs or B occurs or both occur

• Conjunction: A  B AB
A and B both occur

• Negation: ¬A
A does not occur (“not A”)

5
11/28/2018

Example: Concrete strength and density


(MPa)

Example: strength of concrete

Consider a concrete casting experiment (40 samples):

Measure: Density  , Strength 

Specify the following events:

A : 2440 <  < 2460 (kg/m3) (Normal density)


B : 55 <  < 65 (MPa) (Normal strength)
C :  > 65 (MPa) (High strength)

6
11/28/2018

Concrete strength vs density

3 2
2 C
(MPa)

8 16 2
B
AB

6 0 1

 (kg/m3)

Example
Count occurrence of the specified events:

A : 2440 <  < 2460 (kg/m3) : fA = 19 P(A) = 19/40


B : 55 <  < 65 (MPa) : fB = 26 P(B) = 26/40
AB: fAB = 16 P(A  B) = 16/40

C :  > 65 (MPa) : fC = 7
BC: fBC = fB + fC = 34

Sufficient strength: P(C) = 7/40; P(B  C) = 34/40


Normal density and sufficient strength: P(A  (B  C)) = 19/40

7
11/28/2018

Mutually exclusive events


Events are mutually exclusive if they cannot occur together

Example:
B : 55 <  < 65 (MPa) (Normal strength)
C :  > 65 (MPa) (High strength)
Venn Diagram

For mutually exclusive events A , B A


AB A
P(A  B) = (fA + fB) / n
B
= P(A) + P(B)

Addition law of probability


From the Venn diagram:

For any events A , B (¬B “not B” – B does not occur)


(A  B), (A ¬B) are mutually exclusive
A = (A  B)  (A ¬B)
P(A) = P(A  B) + P(A ¬B)
Venn Diagram

A  B = (A  B)  (A ¬B)  (¬A  B)
P(A  B) = P(A  B) + P(A ¬B) + P(¬A  B)
AB
= P(A) + P(B) – P(A  B)

Avoids double counting fAB

8
11/28/2018

De Morgan’s laws
From the Venn diagram:

For any events A , B (¬B “not B” : B does not occur)


¬(A  B) = (¬ A  ¬B)

¬(A  B) = (¬ A  ¬B)

Venn Diagram
Example:
Failure F of elements A B in series:
F = F(A)  F(B) = ¬(¬F(A)  ¬F(B))
AB

Operation ¬F of elements A B in parallel:


¬ F = ¬[F(A)  F(B)] = [¬F(A)  ¬F(B)]

Random variable (RV)

Numerical variable describing outcome of an experiment


• Strength of sample of material
• Rainfall at a certain location during a day
• Number of personal injury crashes at a certain site during a
specified period

• Can be discrete or continuous


• Discrete – only take a finite set of individual values
(eg integers, or to represent classes)

• Continuous – real numbers X  , possibly restricted range


(eg any real number, X > 0 , X  [0, 1] …)

9
11/28/2018

Probability function

To specify the stochastic variation of random variables

Probability mass function (pmf) Px Cumulative distribution

for discrete random variable x P  X  x0   P


x  x0
x

Probability density function (pdf) p(x) P  X  x0    p  x  dx


x  x0
for continuous random variable x

Probability density function

b
Calculation of probability from pdf px(x) : P  a  X  b    px  x  dx
x a

0.5
y

y = px(x)

0
0
a b x

10
11/28/2018

Binomial: a standard distribution

n mutually independent trials


p probability of each succeeding
k number of successes
Discrete, bounded (0 < k < n)

nk 
Bin  k ; n, p   nCk p k 1  p  0  k  n
n! nk   p 
n
Ck  0  k  n Pk 1      Pk 0  k  n
k ! n  k  !  k 1  1 p 
nC is the number of different ways k successes can be arranged in n trials
k
Binomial probability is sum of the probability of each of these

Expectation: a typical value of X

b
Mean E(X) : Discrete E  X    x Px Weight each
x a outcome by
its probability,
b
then sum
Continuous EX    x p  x  dx (integrate)
xa

Grouped data: nk in group k with typical value xk

 n x  
K
nk
EX   k 1 k k
 Pk   1  k  K 
 n   i1 i 
K K
i 1 i  n

11
11/28/2018

Binomial distribution: properties

nk 
Bin  k ; n, p   nCk p k 1  p  0  k  n
n!
n
Ck  0  k  n
k ! n  k  !

Mean value of K :
E  K ; n, p   np

Modal value k+ of K :
Pk  Pk 1  k   n  1 p  k   Int   n  1 p 

Binomial distribution: example

Drivers in a 2-vehicle crash wearing their seatbelt (n = 2)


Proportion of all drivers who wear seatbelts: p = 0.97
If crash involvement is independent of seatbelt wearing, then

0.0582

P(K = 2) = 1 – P(K < 2)

If model agrees with data, then drivers’ seatbelt wearing is mutually independent

Otherwise, seatbelt wearing is correlated – eg according to time of day

12
11/28/2018

Conditional probability
Consider two events A and B :
The conditional probability P(A|B) is
the probability that A occurs given that B has occurred

P(A|B) = P(A  B) / P(B) Venn Diagram

P(A|B) = limn fAB / fB


AB

P(A  B) = P(A|B) P(B)


Multiplication law of probability

Conditional probability
Example:
A box contains five 10  resistors
twelve 30  resistors

Questions:
– The probability of picking a 10  resistor?
– If the first resistor picked is 10  and retained,
what is the probability that the second will be 30  ?

13
11/28/2018

Conditional probability
Example:
A box contains five 10  resistors
twelve 30  resistors
(17 total)
Question:
– The probability of picking a 10  resistor?

Answer:
Define events
A : 10  resistor is picked
B : 30  resistor is picked
Probability that a 10  resistor is picked: P(A) = 5/17

Conditional probability
Example:
A box contains five 10  resistors
twelve 30  resistors

Question:
– If the first resistor picked is 10  and is retained,
what is the probability that the second will be 30  ?

Answer:
– Number of resistors remaining = 17 – 1 = 16
– Number of 30  resistors = 12
– Hence P(B|A) = 12/16 = 3/4

14
11/28/2018

Concrete strength vs density

3 2
2 C
(MPa)

8 16 2
B

6 0 1

 (kg/m3)

Example
Consider concrete at normal density In this case, there are no
samples of normal
A : 2440 <  < 2460 (kg/m3) : fA = 19 density concrete that
have low strength
Given A, what is the conditional probability of:
Normal strength B : 55 <  < 65 (MPa)
P(B | A) = P(A  B) / P(A) P(B) = fB / n
= fAB / fA = 16 / 19  0.84 = 26 / 40 = 0.65

High strength C :  > 65 (MPa)


P(C | A) = P(A  C) / P(A) P(C) = fC / n
= fAC / fA = 3 / 19  0.16 = 7 / 40 = 0.175

15
11/28/2018

Independent events
Two events are mutually independent if the occurrence of one
does not affect the probability of the other

Example:
– When rolling a die twice, the outcome of the first roll
does not affect the outcome of the second

Analytically:
P(A | B) = P(A)
P(A  B) = P(A | B) P(B) = P(A) P(B)

So P(B | A) = P(B) (exercise!)

Conditional probability
Concrete strength and density:
Probability P(B) of normal strength
P(B) = 26/40 = 0.65

Conditional probability P(B | A)


of normal strength given normal density
P(B | A) = P(A  B) / P(A) = 16/19  0.84

Is concrete strength independent of density?


(ie Are A and B mutually independent?)

Not so: P(B | A) > P(B) - Requiring normal density A


increases probability of normal strength B

16
11/28/2018

Probability of these observations


if events A and B were mutually independent
1 0.24

We observed x=16 normal strength 0.75 0.18

Probability P(F<f)

Probability Pf
out of n=19 normal density 0.5 0.12

Suppose p = P(B) = 26/40 = 0.65 0.25 0.06

Then X ~ Bin(n, p) 0 0
0 5 10 15
Number of events f

Calculation: The proportion of normal strength concrete is 0.65


Probability of finding 16 or more normal strength out of 19 if the
true proportion were 0.65 is
P(X > 16 | n=19, p=0.65) = ∑ଵଽ௫ୀଵ଺ ‫݊|ݔ ݊݅ܤ‬, ‫ ݌‬ 0.017

Concrete strength vs density

3 2
2 C
(MPa)

8 16 2
B

6 0 1

A A+

 (kg/m3)

17
11/28/2018

Conditional probability

Concrete strength and density:


Probability P(B  C) of normal or better strength
P(B  C) = 33/40 = 0.825

Conditional probability P(B  C | A  A+)


of normal or better strength given normal (A) or greater (A+) density
P(B  C | A  A+) = [P((A  A+)  B) + P((A  A+)  C)] / P(A  A+)
= [18 + 5]/24 = 0.96

(P((A  A+)  B  C) = 0 because B and C are mutually exclusive)

Poisson distribution

n mutually independent events


Events occur singly

μ parameter (positive, constant)

Mean rate of occurrence  :


μ = t (t fixed duration)

Discrete, unbounded above (n > 0)


e  n 
Poi  n;     n  0 Pn  Pn 1  n  1
n! n
EN    Pn  Pn 1  n    n  Int   

18
11/28/2018

Poisson distribution: example

Crashes at a site: mean rate  (per year)


Site is selected for treatment if 12 or more during 3 years

ܲ ܺ ൒ ͳʹ ൌ ͳ െ ܲ ܺ ൏ ͳʹ
ଵଵ
ɉ‫ݐ‬௫
= 1 − exp െɉ ‫ ݐ‬෎
‫ݔ‬Ǩ
௫ୀ଴

If mean rate  were 4/year,


P(select)  0.54

Poisson distribution: example


Distribution of number N of crashes during 3 years
at a site where mean rate  is 4/year

Probability of few crashes


P(N < 6)  0.05
P(N < 4)  0.01

19
11/28/2018

Example application:
Arrivals of oil tankers at a refinery

Mean number N arriving each day is 


Current facilities can service up to Q tankers in a day
If N > Q arrive, Q are served and N - Q are sent on to another port
Calculate for  = 2 and Q = 3 :
• The probability one or more tankers are sent on in a day
• The value of Q so that all arriving tankers can be served on
approximately 90 per cent of all days
• The most probable number of tankers arriving in a single day
• The expected number of tankers served in a day
• The expected number of tankers send on to another port in a day

Example application:
Example application:
Arrivals of of
Arrivals oil oil
tankers at aatrefinery
tankers a refinery
Mean number N arriving each day is  .
Current facilities can service up to Q tankers in a day
If N > Q arrive, Q are served and N - Q are sent on to another port
(Mean 2/day) (Mean arrivals 2/day)

Number served is Min(N , Q) Consider how S increases with Q


Mean number S served:
Q
E  S    Min  n, Q  Pn   n Pn  Q P  N  Q 
n n 0

20
11/28/2018

Probability density function

b
Calculation of probability from pdf px(x) : P  a  X  b    px  x  dx
x a

0.5
y

y = px(x)

0
0
a b x

Expectation of a function g(x)


b
Typical value of g(x) : E  g  X    g  x  p  x  dx
xa

Examples:
b

g(x) = x2 : E  X  
2
 x 2 p  x  dx
xa

Minimum function:
Q
g(n) = Min(n, Q) : E  Min  N , Q     n pn  Q P  N  Q 
n 0

21
11/28/2018

Measures of dispersion:
Variance and others

Variance: Var(X) = E([ X - E(X)]2) Var(X) > 0

= E[X 2] – [E(X)]2 So E[X 2] > [E(X)]2

Standard deviation: SD(X) = Var(X)

Coefficient of variation: C(X) = SD(X) / E(X)


(dimensionless) C2(X) = Var(X) / [E(X)]2

Index of dispersion: I (X) = Var(X) / E(X)


(for pure number X)

Poisson distribution

n mutually independent events


Events occur singly

μ parameter (positive, constant)

Mean rate of occurrence  :


μ = t (t fixed duration)

Discrete, unbounded above (n > 0)


e  n 
Poi  n;     n  0 Pn  Pn 1  n  1
n! n
EN    Pn  Pn 1  n    n  Int   

22
11/28/2018

Binomial and Poisson distributions


nk  e   n
Bin  k ; n, p   Ck p 1  p 
n k
0  k  n Poi  n;     n  0
n!

Mean: E  K ; n, p   np E  N;   

Variance:
E  K 2 ; n, p   n  n  1 p 2  np E  N 2 ;    2  
Var  K ; n, p   np 1  p  Var  N ;      so I  1

Normal distribution
Also known as Gaussian distribution

Widely used probability distribution

1  1  x    2 
pdf   x; ,    exp     Notation: X  Nor(, )
 2  2    

Properties:
Symmetric about x =  , so E(X) = 
Var(X) = 2 so SD(X) = 

23
11/28/2018

Normal distributions

 2  1

z
μ1 μ2

Normal distributions

σ 2  σ1

σ2

σ1

z
μ

24
11/28/2018

Combinations of variables

Consider random variables X and Y ,


together with parameters a and b

E(aX + bY) = a E(X) + b E(Y)

Var(aX + bY) = a 2 Var(X) + 2ab Cov(X, Y) + b 2 Var(Y)

Covariance: Cov(X, Y) = E(XY) - E(X) E(Y)

Cov(X, Y) = 0 for mutually independent X, Y

Combinations of variables

E(aX + bY) = a E(X) + b E(Y)

Var(aX + bY) = a 2 Var(X) + 2ab Cov(X, Y) + b 2 Var(Y)

Cov(X, Y) = 0 for mutually independent X, Y (assumed here)

Examples:
a = 1, b = 1 : E(X + Y) = E(X) + E(Y) , Var(X + Y) = Var(X) + Var(Y)
a = 1, b = -1 : E(X - Y) = E(X) - E(Y) , Var(X - Y) = Var(X) + Var(Y)
a = 1, b = 1 , X ~ Y : E(X + Y) = 2E(X) , Var(X + Y) = 2Var(X)
a = 2, b = 0 : E(2X) = 2E(X), Var(2X) = 4Var(X) (Perfect correlation)

25
11/28/2018

Standard normal distribution

Normal distribution with


 = 0 and  = 1

1  z2 
pdf:   z   exp  
2  2 

X  Nor(, ) Y = aX + b
Y  Nor(a+b, a)

Z = (X - )/  Nor(0, 1)

Normal distribution – Example

Suppose, historical record shows that annual rainfall in a


certain catch basin follows N(60, 15) (inches)
What is the probability that in a future year the annual rainfall
exceeds 70 (inches)?
0.03 X  Nor(, ) => Z = (X - )/  Nor(0, 1)
a = 0”
b = 70”
x = 70 inches,  = 60 inches,  = 15 inches

z = (70–60)/15 = 2/3
0
30 40 50 60 70 80 90 100 P(X > 70 inches) = P(Z > 2/3)
  60" x  70"
 1 - (2/3)  0.25

26
11/28/2018

(z) – 0.5

Values of normal distribution

For X ~ N(m, s) :
P (    X    )  0.68  2 3
P (  2  X    2)  0.95
P (  3  X    3)  0.998

Probability Critical value


હ ൌ ܲ ܼ ൐ ‫ݖ‬஑
= 1 − Φ ‫ݖ‬஑ z
0.10 1.28
0.05 1.645
0.025 1.96
0.01 2.33
0.005 2.58

27
11/28/2018

Combinations of normal variables

For mutually independent normal random variables X and Y ,


X  Nor(x, x) Y  Nor(y, y)
Then
Z = X + Y  Nor[x + y, (x2 + y2)]

Normal distribution is closed under addition

“Central limit theorem”: For any mutually independent


Xi mean i , standard deviation i (1 < i < n),
n  n n 
 X i  Nor   i ,  2
i  Means and variances are additive (MI);
Limiting distribution of sum is normal
i 1  i 1 i 1 

28