42
1 Basic probability theory Professor Jørn Vatn

Basic probability theory

  • Upload
    morley

  • View
    46

  • Download
    1

Embed Size (px)

DESCRIPTION

Basic probability theory. Professor Jørn Vatn. 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} - PowerPoint PPT Presentation

Citation preview

Page 1: Basic probability theory

1

Basic probability theory

Professor Jørn Vatn

Page 2: Basic probability theory

2

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”.

Page 3: Basic probability theory

3

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

Page 4: Basic probability theory

4

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.

Page 5: Basic probability theory

5

Venn diagram

A rectangle represents the sample space, and closed curves such as a circle are used to represent subsets of the sample space

SA

Page 6: Basic probability theory

6

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 A B

Page 7: Basic probability theory

7

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 A B

Page 8: Basic probability theory

8

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

Page 9: Basic probability theory

9

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}

S

A CA

Page 10: Basic probability theory

10

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

S

0 1

A1 A2

P(A1) P(A2)

Page 11: Basic probability theory

11

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

Page 12: Basic probability theory

12

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

Page 13: Basic probability theory

13

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)

Page 14: Basic probability theory

14

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)

Page 15: Basic probability theory

15

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)

Pr(A B) = Pr(A) Pr(B) =

Pr(A B) = Pr(A)+ Pr(B) - Pr(A B) =

Pr(A|B) =

84

1 =

24

2

7

1

42

9 =

84

1-

24

2+

7

1

1Pr (A B) 1842Pr (B) 7

24

Page 16: Basic probability theory

16

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 = 510-5

Page 17: Basic probability theory

17

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

S

A 1

A 2 A 3

A 4

Page 18: Basic probability theory

18

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

1

Pr (B) Pr (B | A ) Pr (A )r

i ii

Page 19: Basic probability theory

19

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)

1 1 2 21

Pr (B) Pr (B | A ) Pr (A ) Pr (B|A ) Pr (A ) Pr (B|A ) Pr (A )

0.01 0.7 0.02 0.3 1.3%

r

i ii

Page 20: Basic probability theory

20

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

Page 21: Basic probability theory

21

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)

Page 22: Basic probability theory

22

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

Page 23: Basic probability theory

23

Cumulative distribution function (CDF)FX(x) = Pr(X x)

F X(x)

x0

1

Page 24: Basic probability theory

24

Exercise

Let X be the life time of a component Use Excel to find Pr(X 150) when FX(x) = 1 - e-(0.01x)

2

x F X (x )

0 0.0010 0.0120 0.0430 0.0940 0.1550 0.2260 0.3070 0.3980 0.4790 0.56

100 0.63110 0.70120 0.76130 0.82140 0.86150 0.89160 0.92170 0.94180 0.96190 0.97200 0.98

0.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0 50 100 150 200

Page 25: Basic probability theory

25

Probability density function (PDF)

fX(x)

x

)(d

d)( xF

xxf XX

Page 26: Basic probability theory

26

PDF probabilities

Pr( ) ( )d ( ) ( )b

X X X

a

a X b f x x F b F a

fX(x)

a bx

Page 27: Basic probability theory

27

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

Page 28: Basic probability theory

28

Variance

The variance of a random quantity expresses the variation of X around the expected value in the long run

Page 29: Basic probability theory

29

Standard deviation The standard deviation of a random quantity expresses a

typical “distance” from the expected value

Page 30: Basic probability theory

30

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)

xPx

x%

M m

s

Page 31: Basic probability theory

31

Expectation and variance for a sum

Let X1, X2,…, Xn be independent random quantities

We then have

Page 32: Basic probability theory

32

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)

Page 33: Basic probability theory

33

Statistical view of life times

1

2

3

4

5

6

7

T 1

T 2

T 3

T 4

T 5*

T 6

T 7

t=0 End

Page 34: Basic probability theory

34

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

Page 35: Basic probability theory

35

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)

Page 36: Basic probability theory

36

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

Page 37: Basic probability theory

37

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

Page 38: Basic probability theory

38

For the Weibull distribution we have R(x) = e-(x)

is a shape parameter, > 1 means aging

MTTF =

Var(X) =

where () is the gamma function

The Gamma function is found in Excel by =EXP(GAMMALN(x))

)1(1 1

)1()1(1 122

2

Page 39: Basic probability theory

39

Reparameterization of the Weibull

The Weibull distribution has two parameters: a = shape or aging parameter l = scale parameter

The relation between l and MTTF is MTTF =

In many situations it is easier to work with a and MTTF, rather than a and l

)1(1 1

Page 40: Basic probability theory

40

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) =R(400)/R(200) = e-(400)2/ e-(200)2 e-(350)2 < Pr(X > 200)

Thus, an old component is not as good as a new one

Page 41: Basic probability theory

41

The hazard rate, z(t)

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.

time, t

Haz

ard

rate

t

Page 42: Basic probability theory

42

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