**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} • 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”.

**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

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

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

**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}

**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}

**Disjoint events** • A and B are said to be disjoint if they can not occur simultaneously, i.e. A B = Ø = the empty set

**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** A 1 2 S 0 P(A ) P(A ) 1 1 2 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

**Kolmogorov basic axioms ** • 0 Pr(A) • Pr(S) = 1 • If A1, A2,... is a sequence of disjoint events we shall then havePr(A1 A2...) = Pr(A1) + Pr(A2) + ... Everything is based on these axioms in probability calculus

**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

**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)

**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)

**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) =

**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

**Division of the sample space** • A1,A2,…,Aris 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 ij

**The law of total probability** • Let A1,A2,…,Arrepresent a division of the sample space S, and let B be an arbitrary event in S, then

**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)

**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

**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)

**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

**Cumulative distribution function (CDF)FX(x) = Pr(Xx)**

**Exercise** • Let X be the life time of a component • Use Excel to find Pr(X 150) whenFX(x) = 1 - e-(0.01x)2

**Probability density function (PDF)**

**PDF probabilities**

**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

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

**Standard deviation ** • The standard deviation of a random quantity expresses a typical “distance” from the expected value

**Parameters describing random quantities** • Percentiles, i.e. P1,P10,P50,P90,P99 • Most likely value (M) • Expected (mean) value () • Standard deviation () • Variance (Var = 2)

**Expectation and variance for a sum** • Let X1, X2,…,Xn be independent random quantities • We then have

**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)

**Statistical view of life times**

**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

**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)

**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

**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 hoursPr(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 oldcomponentisstochasticallyasgoodas a newcomponent

**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))

**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

**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)2e-(350)2 < Pr(X > 200) • Thus, an oldcomponentis not asgoodas a newone

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

**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