BasicProbabilityTheory

advertisement
Basic probability theory
Professor Jørn Vatn
1
Event
 Probability relates to events
 Let as an example A be the event that there is an operator
error in a control room next year, and B be the event that
there is a specific component failure next year i.e.:
 A = {operator error next year}
 B = {component failure next year}
 An event may occur, or not. We do not know that in
advance prior to the experiment or a situation in the “real
life”.
2
Probability
 When events are defined, the probability that the
event will occur is of interest
 Probability is denoted by Pr(·), i.e.
 Pr(A) = Probability that A (will) occur
 The numeric value of Pr(A) may be found by:
 Studying the sample space / symmetric considerations
 Analysing collected data
 Look up the value in data hand books
 “Expert judgement”
 Laws of probability calculus/Monte Carlo simulation
3
Sample space
 The sample space defines all possible events
 As an example let A = {It is Sunday}, B = {It is Monday}, ..
, G = {It is Saturday}. The sample space is then given by
 S = {A,B,C,D,E,F,G}
 So-called Venn diagrams are useful when we want to
analyze subset of the sample space S.
4
Venn diagram
 A rectangle represents the sample space, and closed
curves such as a circle are used to represent subsets of
the sample space
A
S
5
Union
 The union of two events A and B:
 A  B denotes the occurrence of A or B or (A and B)
 Example
 A = {prime numbers  6)
 B = {odd numbers  6}
 A  B = {1,2,3,5}
S
6
A
B
Intersection
 The intersection of two events A and B:
 A  B denotes the occurrence of both A and B
 Example
 A = {prime numbers  6)
 B = {odd numbers  6}
 A  B = {3,5}
S
7
A
B
Disjoint events
 A and B are said to be disjoint if they can not occur
simultaneously, i.e. A  B = Ø = the empty set
S
A
B
8
Complementary events
 The complement of an event A is all events in the sample
space S except for A.
 The complement of an event A is denoted by AC
 Example
 A = {even numbers)
 AC = {odd numbers}
A
S
9
AC
Probability
 Probability is a set function Pr() which maps events A1,
A2,... in the sample space S, to real numbers
 The function Pr() can only take values in the interval from
0 to 1, i.e. probabilities are greater or equal than 0, and
less or equal than 1
A1
A2
S
0
P(A1) P(A2)
1
10
Kolmogorov basic axioms
1. 0  Pr(A)
2. Pr(S) = 1
3. If A1, A2,... is a sequence of disjoint events we shall then
have
Pr(A1  A2 ...) = Pr(A1) + Pr(A2) + ...
Everything is based on these axioms in probability calculus
11
Conditional probability
 In some situations the probability of A will change if we
get information about a related event, say B
 We then introduce conditional probabilities, and write:
 Pr(A|B) = the conditional probability that A will occur
given that B has occurred
 Example: Probability of pulling ace of spade is 1/52, but
if we have seen a “black” card, the conditional probability
is 1/26
12
Independent events
 A and B are said to be independent if information about
whether B has occurred does not influence the probability
that A will occur
 Pr(A|B) = Pr(A)
 Example: We are both pulling a card and tossing a dice in
a composed experiment. The probability of pulling ace of
spade (A) is independent of the event getting a six (B)
13
Basic rules for probability calculus
 Pr(A  B) = Pr(A) + Pr(B) - Pr(A  B)
 Pr(A  B) = Pr(A)  Pr(B) if A and B are independent
Pr(AC) = Pr(A does not occur) = 1 - Pr(A)
 Pr(A|B) = Pr(A  B) / Pr(B)
14
Example
 Let A = {It is Sunday}

B = {It is between 6 and 8 pm)
 A and B are independent but not disjoint
 We will find Pr(A  B) and Pr(A  B)
1 2
1

=
 Pr(A  B) = Pr(A) Pr(B) =
7 24 84
 Pr(A  B) = Pr(A)+ Pr(B) - Pr(A  B) =
 Pr(A|B) =
1
Pr (A  B)
1
 84 
2
Pr (B)
7
24
15
1 2 1
9
+
=
7 24 84 42
Example
 Assume we have two redundant shut-down valves, ESDV
and PSDV that could be used in an emergency situation
 Pr(ESDV-failure)=0.01
 Pr(PSDV-failure)=0.005
 Assuming independent failures give a total failure
probability of
 0.01  0.005 = 510-5
16
Division of the sample space
 A1,A2,…,Ar is said to be a division of the sample space if
the union of all Ai’s covers the entire sample space, i.e. A1
 A2  …  Ar = S and the Ais are pair wise disjoint, Ai 
Aj = Ø for i  j
A2
A1
A3
A4
S
17
The law of total probability
 Let A1,A2,…,Ar represent a division of the sample space S,
and let B be an arbitrary event in S, then
r
Pr (B)   Pr (B | Ai )  Pr (A i )
i1
18
Example
 A special component type is ordered from two suppliers A1 and A2
 Experience has shown that
 components from supplier A1 has a defect probability of 1%
 components from supplier A2 has a defect probability of 2%
 In average 70% of the components are provided by supplier A1
 Assume that all components are put on a common stock, and we are
not able to trace the supplier for a component in the stock
 A component is now fetched from the stock, and we will calculate the
defect probability, Pr(B)
r
Pr (B)   Pr (B | A i )  Pr (A i )  Pr (B|A1 )  Pr (A1 )  Pr (B|A 2 )  Pr (A 2 )
i1
 0.01  0.7  0.02  0.3  1.3%
19
Exercise
 Successful evacuation depends on the available
evacuation time,
 A1 = short evacuation time  Pr(A1) = 1%
 A2 = medium evacuation time  Pr(A2) = 20%
 A3 = long evacuation time  Pr(A3) = 79%
 The probability of successful evacuation (B) is given
by:
 Pr(B| A1) = 50%
 Pr(B| A2) = 75%
 Pr(B| A3) = 95%
 Find Pr(B) by the law of total probability
20
Random quantities
 A random quantity (stochastic variable), is a quantity
for which we do not know the value it will take, but
 We could state statistical properties of the quantity
or make probability statement about it
 Whereas an event may occur, or not occur (B&W), a
random quantity is related to a magnitude, it may take
different values
 We use probabilities to describe the likelihood of the
different values the random quantity can take
 Cumulative distribution function (S-curve)
 Probability density function (histogram)
21
Examples of random quantities






X = Life time of a component (continuous)
R = Repair time after a failure (continuous)
Z = Number of failures in a period of one year (discrete)
M = Number of derailments next year
N = Number of delayed trains next month
W = Maintenance cost next year
22
Cumulative distribution function (CDF)
FX(x) = Pr(X  x)
FX(x)
1
0
x
23
Exercise
 Let X be the life time of a component
2
-(0.01x)
 Use Excel to find Pr(X  150) when FX(x) = 1 - e
x
0
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
F X (x )
0.00
0.01
0.04
0.09
0.15
0.22
0.30
0.39
0.47
0.56
0.63
0.70
0.76
0.82
0.86
0.89
0.92
0.94
0.96
0.97
0.98
1.00
0.90
0.80
0.70
0.60
0.50
0.40
0.30
0.20
0.10
0.00
0
50
100
150
24
200
Probability density function (PDF)
d
f X ( x) 
FX ( x )
dx
fX(x)
x
25
PDF  probabilities
fX(x)
x
a b
b
Pr(a  X  b)   f X ( x)dx  FX (b)  FX (a )
a
26
Expectation
 The expectation of a random quantity X, may be
interpreted as the long time run average of X, if an infinite
amount of observations are available
 E(𝑋) =
∞
𝑥
−∞
⋅ 𝑓𝑋 (𝑥)𝑑𝑥
27
Variance
 The variance of a random quantity expresses the variation
of X around the expected value in the long run
 Var(𝑋) =
∞
−∞
𝑥 − 𝐸(𝑋)
2
⋅ 𝑓𝑋 (𝑥)𝑑𝑥
28
Standard deviation
 The standard deviation of a random quantity expresses a
typical “distance” from the expected value
 SD(𝑋) = + Var(𝑋)
29
Parameters describing random quantities





Percentiles, i.e. P1,P10,P50,P90,P99
Most likely value (M)
Expected (mean) value ()
Standard deviation ()
Variance (Var =  2)
fX(x)
x%
Px

M 
x
30
Expectation and variance for a sum
 Let X1, X2,…, Xn be independent random quantities
 We then have
 𝐸
 Var
 SD
𝑛
𝑖=1 𝑋𝑖
=
𝑛
𝑖=1 𝑋𝑖
𝑛
𝑖=1 𝑋𝑖
=
=
𝑛
𝐸(𝑋𝑖 )
𝑖=1
𝑛
Var(𝑋𝑖 )
𝑖=1
𝑛
𝑖=1
SD(𝑋𝑖 )
2
31
Life times
 In reliability theory we work with life times
 The life time, or time to failure, is the time it takes from a
component is installed, until it fails for the first time
 Life times are non-negative random quantities
 For life times we introduce the following concepts
 R(x) = Pr(X > x) = 1- FX(x)
 MTTF = Mean Time To Failure = E(X)
32
Statistical view of life times
T1
1
T2
2
T3
3
T4
4
T5*
5
T6
6
7
t=0
T7
End
33
Distribution classes
 Life times are often associated with various distribution
classes, e.g. in reliability analysis we often apply the
following distribution classes
 The exponential distribution
 The Weibull distribution
 The gamma distribution
 The normal distribution
34
The exponential distribution
 The exponential distribution is a very simple distribution which
could be used if no aging affects the component under
consideration
 Often external or internal shocks dominates the failure
causes if the exponential distribution is used
 For the exponential distribution we have
 fX(x) = e-x
 FX(x) = 1-e-x
 R(x) = e-x
 E(X) =1/
 Var(X) = 1/2
  is a parameter in the distribution (the failure rate)
35
Example
 We will obtain the probability that X is greater than it’s
expected value. We then have:
 Pr(X > E(X)) = R(E(X)) = e-E(X ) = e -1  0.37
 i.e., most likely it will not survive the expected life time
36
Example
 Assume the life time, X, of a component is
exponentially distributed with parameter  = 0.01
 We will find the probability that the component that has
survived 200 hours, will survive another 200 hours
Pr(X > 400 |X > 200) =
Pr(X > 400  X > 200)/Pr(X > 200) =
Pr(X > 400)/Pr(X > 200) =
R(400)/R(200) = e-400/ e-200 = e-200 = Pr(X > 200)
 Thus, an old component is stochastically as good as a
new component
37
For the Weibull distribution we have

-(

x)
e
 R(x) =
  is a shape parameter,  > 1 means aging
 MTTF =
1

1
 Var(X) = 2
( 1  1)
(
2

 1)   2 ( 1  1)

 where () is the gamma function
 The Gamma function is found in Excel by
=EXP(GAMMALN(x))
38
Reparameterization of the Weibull
 The Weibull distribution has two parameters:
  = shape or aging parameter
  = scale parameter
 The relation between  and MTTF is
 MTTF =
1

( 1  1)
 In many situations it is easier to work with 
and MTTF, rather than  and 
39
Example
 We will find the probability that a component that has
survived 200 hours, will survive another 200 hours given
that the life time is Weibull distributed with parameter  =
2 and  = 0.01
 Pr(X > 400 |X > 200) =
Pr(X > 400  X > 200)/Pr(X > 200) =
Pr(X > 400)/Pr(X > 200) =
2
2
2
R(400)/R(200) = e-(400) / e-(200)  e-(350) < Pr(X > 200)
 Thus, an old component is not as good as a new one
40
The hazard rate, z(t)
Hazard rate
 The hazard rate is the precise term for the so-called
bathtub curve, also denoted failure rate funciton:
 z(t) = f(t)/R(t)
 z(t)t  Probability of failure in a small time interval (t )
given that the unit has survived up to t.
t time, t
41
Example of hazard rates
 Exponential distribution
 z(t) =  = constant
 Weibull distribution
 z(t) = ()(t) -1  t -1 = increasing in time t for  > 1
 Preventive maintenance is often based on the idea of
”taking away” the right hand side of the hazard rate curve
42
Download