13
Probability
UNIVERSITY OF PRETORIA
DEPARTMENT OF INDUSTRIAL AND SYSTEMS ENGINEERING
ENGINEERING STATISTICS BES221
PROBABILITY
But to us, probability is the very guide to life.
Joseph Butler (1692-1752) English bishop and theologian
1. TERMINOLOGY AND CONCEPTS
Histograms Probabilities Distributions
Random Experiment and Stochastic Processes
Random Variables (Variates)
Discrete and Continuous variates
Sample Space, Events and Outcomes
Finite (countable) and Infinite (or very large) samples spaces
Equally likely Events
Exclusive events
Independent events
Biasness
(Dice and Barometric Pressure examples)
Probability of an Event [P(X=x) or P(A) if A={X=x}]
P(event) = P(A) = p with 0 £ p £ 1
An estimate (quantification) of the uncertainty/likelihood on a linear scale of 0 to 1
Examples (using a six sided die) :
P(X = x) = P(X = 3) = p = 1/6
P(X £ 5) or P(3 £ X £ 6)
P(X £ 2) = P(X = 0) + P(X = 1) + P(X = 2) if m.e.
P(X £ 2) = 1 – P(X ³3) (Complement)
P(X ³ x) ¹ P(X > x) if variant is discrete
P(X ³ x) = P(X > x) if variant is continuous
P(X = 2,0000000000….) = 0 if X is a continuous variant
Simple and compounded events
A = {(X=2) AND (X>4) OR (X<1)}
2. SET THEORY
Relationship to Probability theory
Elements of a Set
The empty set, f and therefore P(f) = 0
Subsets of a sample space as a probability
Unions of events (logical inclusive OR): A È B
Intersections of events (logical AND): A Ç B
Complements of an event : A' and therefore P(A') = 1 – P(A)
Venn-diagrams (John Venn 1834-1923, English logician, developer of George Boole’s symbolic logic)
George Boole (1815-1864)
3. MUTUALLY EXCLUSIVE EVENTS (m.e.)
Two events, A and B, are m.e. if they have no elements in common
In a single experiment the occurrence of A excludes the occurrence of B
A Ç B = f if m.e. (Venn-diagram)
P(A È B) = P(A) + P(B) if m.e. (Addition Rule)
P(A È B) = P(A) + P(B) – P(A Ç B) if not m.e. and similarly
P(A È B È C) = P(A) + P(B) + P(C)
– P(A Ç B) – P(B Ç C) – P(A Ç C)
+ P(A Ç B Ç C)
4. ESTIMATING PROBABILITIES
Counting (of relative limited practical usefulness)
In the case of a finite sample space consisting of N m.e., equally likely events, where the event A is defined as a subset of all the possible events, P(A) = (number of ways subset A may occur) / N
(Example of two dice with X the sum of the two outcomes)
The use of probability trees to enumerate the total number of possible (and/or “successful”) events
The basic law of combinatorial analysis
Permutations, sequence does matter
Combinations, sequence does not matter
{Example of the combination locks}
Relative frequency concept (most often used)
P(A) = (number of occurrences of a “success”) / (total number of trails)
Use of historical data, experimentation and observation
Subjective judgement (may be more reliable than perceived)
Use of knowledgeable people’s personal and subjective judgement based on experience (“gut” feeling)
Syntheses using probability laws, theorems and axiom’s (relative specialized uses, i.e. quality control and reliability theory)
Use the theorems and axioms of probability and set theory
5. CONDITIONAL PROBABILITY AND INDEPENDENCE
All probabilities are in essence conditional, at least in the sense that the sample space is given i.e. P(A | S)
A condition placed on a probability effectively reduces the sample space and thus provides additional information
The probability that event A will occur given that event B has occurred is :
P(A | B) = P(A Ç B) / P(B) if P(B) ¹ 0
(Illustrate by means of a Venn-diagram)
Therefore
P(A Ç B) = P(B) . P(A | B) if P(B) ¹ 0
= P(A) . P(B | A) if P(A) ¹ 0
If A and B are mutually independent (m.i.) events, then
P(A Ç B) = P(A) . P(B) (Multiplication Rule)
Mutual Independence (m.i) between two events, A and B, implies that the occurrence of event A does not in any way has an influence on the probability that event B will occur
Mutual independence may be very difficult to prove conclusively but the co-variance between data sets may provide some indication of the validity of such an assumption
(Compare m.e. and m.i)
6. PROBABILITY TREES
Illustrative example : A company produces computer games by copying the software from a master CD, which is error free, to commercial CD’s that may have one or more errors on them with a probability of 0,01. Furthermore, additional errors may be introduced into the final product during the copying process with a probability of 0,02. All completed CD's are subjected to a final pre-shipping inspection process that may or may not detect the existence of the errors mentioned. The probability that one or more errors will be detected, if they exist, is 0,95. Determine the probability for an error free CD reaching the customer.
7. ILLUSTRATIVE EXAMPLES
Sampling from a population (batch)
Assume :
A batch of products consists of N items, with N “very” large
A random sample, of size n, is drawn from the batch with n much smaller than N (the sampling process does not change the probabilities, sampling with or without replacement)
A specific item may be classified on inspection as only defective or non-defective (only two possible outcomes – Bernoulli trails)
The probability that an item is classified as defective is p and stays constant (from drawing one item to the next)
The probability of items to be defective is m.i. from each other
Let :
X, be the number of items in a sample of size n that are defective
n, be the sample size and for purposes of illustration let n = 4
A, be the event that item one is defective and similarly B, C and D for items two, three and four respectively
P(A) = P(B) = P(C) = P(D) = p
Then :
The probability of zero defectives in the sample is,
P(X = 0) = P(A') Ç P(B') Ç P(C') Ç P(D')
= P(A') . P(B') . P(C') . P(D') if m.i.
= (1-p)4
The probability of one, and exactly one, defective in the sample is,
P(X = 1) = [P(A) Ç P(B') Ç P(C') Ç P(D')]
È [P(A') Ç P(B) Ç P(C') Ç P(D')]
È [P(A') Ç P(B') Ç P(C) Ç P(D')]
È [P(A') Ç P(B') Ç P(C') Ç P(D)]
= 4 p (1-p)3 if m.i. and m.e.
The probability of two defectives in the sample is,
P(X = 2) = [P(A) Ç P(B) Ç P(C') Ç P(D')]
È [P(A) Ç P(B') Ç P(C) Ç P(D')]
È [P(A) Ç P(B') Ç P(C') Ç P(D)]
È [P(A') Ç P(B) Ç P(C) Ç P(D')]
È [P(A') Ç P(B) Ç P(C') Ç P(D)]
È [P(A') Ç P(B') Ç P(C) Ç P(D)]
= 6 p2 (1-p)2 if m.i. and m.e.
The probability of three defectives in the sample is,
P(X = 3) = [P(A) Ç P(B) Ç P(C) Ç P(D')]
È [P(A) Ç P(B) Ç P(C') Ç P(D)]
È [P(A) Ç P(B') Ç P(C) Ç P(D)]
È [P(A') Ç P(B) Ç P(C) Ç P(D)]
= 4 p3 (1-p) if m.i. and m.e.
The probability of four defectives in the sample is,
P(X = 4) = [P(A) Ç P(B) Ç P(C) Ç P(D)]
= p4 if m.i.
In general P(X = x) = nCx px (1-p)n-x which is the Binomial distribution for given values for n and p and x = 0,1,2,3…..n
For example :
Let : n = 8
p = 0,4
x / P(X=x)0 / 0.0168
1 / 0.0896
2 / 0.2090
3 / 0.2787
4 / 0.2322
5 / 0.1239
6 / 0.0413
7 / 0.0078
8 / 0.0007
Total / 1,0000
Reliability Engineering
Consider the following reliability network :
Which, for convenience sake, may be simplified to :
Let :
A , be the event that component A fails (similar for B, C, D,
E, and F)
I, be the event that sub-assembly I fails (similar for II and III)
P(A) = P(B) = P(C) = P(D) = P(E) = P(F) = p for example
Then :
P(Total system fails) = P( I È II È III )
= P(I) + P(II) + P(III) – P(I Ç II) – P(I Ç III) – P(II Ç III) + P(I Ç II Ç III) not m.e.
P(I) = P(A Ç B Ç C)
= P(A) . P(B) . P(C) if m.i.
= p3
P(II) = P(D Ç E)
= P(D) . P(E) if m.i.
= p2
P(III) = P(F) = p
P(Total system fails) = p3 + p2 + p – p5 – p4 – p3 + p6
Alternatively (and with some more effort):
P(Total system does NOT fail) = P(I' Ç II' Ç III')
= P(I') . P(II') . P(III') if m.i.
P(I') = P(A' Ç B Ç C) È P(A Ç B' Ç C) È P(A Ç B Ç C')
È P(A' Ç B' Ç C) È P(A' Ç B Ç C') È P(A Ç B' Ç C')
È P(A' Ç B' Ç C')
= 3(1-p) p2 + 3 (1-p)2 + (1-p)3
P(II') = P(D' Ç E) È P(D Ç E') È P(D' Ç E')
= 2 (1-p) p + (1-p)2
P(III') = (1-p)
P(Total system does not fail)
= {3(1-p) p2 + 3 (1-p)2 + (1-p)3}{2 (1-p) p + (1-p)2}{(1-p)}
Check with p = 0,1 for example
P(Total system fails) = 0,1099 = 1 – P(Total system does not fail)
= 1 – 0,8901 = 0,1099
9. MATHEMATICAL EXPECTATION
Decisions are concerned with at least two factors :
The “RISK” of success or failure (Probability !)
The “RETURN” monetary or otherwise (Value System !)
Expected value is an attempt to balance (average) these two factors but is strictly speaking only valid “over the long term” or for repeated trails. It is nevertheless useful for comparison purposes of a single instance or a “one time” decision. (Choosing between alternatives)
By definition :
E(x) = Sum, over the total sample space, of the product of the probability of each event and a measure of the consequences
E(x) = p1a1 + p2a2 + ………+ pnan
(Note : For a probability distribution E(x) is the mean !)
Example
At the beginning of the Grand Prix Motor Racing season, the Ferrari management team has to decide whether they will use the “old” or the “new” car for the first race. The new car is expected to be significant better in certain respects (performance, handling, etcetera) but it is probably not as reliable as the old one. It is very important (sponsors, image, track record, confidence) for Ferrari to win races (especially with a new car) but also to at least finish a race. After protracted deliberations between drivers, mechanics, design engineers, accountants, managers and image/marketing consultants the following tables were arrived at :
(The probabilities were obtain in a subjective way and the “values” by using the Analytical Hierarchy Process)
Use the “old” carEVENT / PROBABILITY / “VALUE”
Win the race / 0,1 / 700
Only a rostrum position / 0,2 / 500
Only finish the race / 0,6 / 200
Do not finish the race / 0,1 / -500
Use the “new” car
EVENT / PROBABILITY / “VALUE”
Win the race / 0,4 / 1500
Only a rostrum position / 0,2 / 300
Only finish the race / 0,1 / 0
Do not finish the race / 0,3 / -1500
Which car should be used if Ferrari wants to maximize their expected “value” gained from the race ?
E(old car) = (0,1)(700) + (0,2)(500) + (0,6)(200) + (0,1)(-500)
= 70 + 100 + 120 - 50
= 240
E(new car) = (0,4)(1500) + (0,2)(300) + (0,1)(0) + (0,3)(-1500)
= 600 + 60 + 0 – 450
= 210
Therefore the old car should be used (However the management’s attitude toward risk should also be taken into account)
*********************
P S Kruger/2011 Engineering Statistics BES221