Probability
A test that is right 99 % of the time, applied to a batch with 1 % defective parts, gives one good part for every bad part among those it flags as defective. It is not a flaw in the test: it is Bayes.
01Three axioms and nothing more
The whole theory is built on three rules. A random experiment has a set of possible outcomes —the sample space \( S \)—, and every subset of that space, called an event, is assigned a number between 0 and 1:
They get confused all the time, and they are almost opposites. Two mutually exclusive events cannot occur together, so knowing that one occurred tells you with certainty that the other did not: that is maximum dependence. Two independent events, on the other hand, can occur together, and the probability that both occur is precisely the product of the two.
02Independence and reliability
The most direct application in engineering is to calculate whether a system works from whether its parts work. With components that fail independently:
| Configuration | Works if | Reliability |
|---|---|---|
| Series | All work | \( R = R_1 R_2 \cdots R_n \) |
| Parallel | At least one works | \( R = 1 - (1-R_1)\cdots(1-R_n) \) |
The first row is relentless: a hundred components in series, each with 99.9 % reliability, give a system with 90.5 %. That is why equipment with many parts needs each one to be much better than the whole. And the second row is the basis of redundancy: two units in parallel with 95 % each give 99.75 %.
Redundancy works as long as the failures are independent, and often they are not: two redundant power supplies fed from the same line go down together if that line is cut, and two identical boards share the same design flaw. This is called a common-cause failure, and it is the reason why critical systems require diverse redundancy: not the same thing twice, but two different solutions.
03Bayes’ theorem
The theorem lets you flip a conditional probability: to go from “how often the test comes out positive when the part is defective” to what you actually want to know, “how often the part is defective when the test came out positive.”
A quality-control test with its sensitivity and specificity, applied to a batch. You move the proportion of defective parts and watch what happens to the confidence in a positive result.
A test that is right 99 % of the time, applied to a batch with 1 % defective parts, produces as many false positives as true positives: of every two parts it flags as bad, one is fine. The test is not badly made. What happens is that the good parts are ninety-nine times more numerous, so their 1 % error contributes as many cases as the 99 % accuracy on a tiny group. The practical conclusion is that in populations where the defect is rare, every positive has to be confirmed.
04In the lab
Roll a die two hundred times recording the results, and plot the relative frequency of each face against the number of rolls. Observe how it approaches 1/6 and estimate how many rolls are needed to be within 1 %.
Calculate the reliability of a piece of equipment with twenty components in series, each with 99.5 %. Add redundancy to the weakest component and recalculate. Discuss how much it would cost to improve each one instead of duplicating one.
For an imaginary batch of ten thousand parts with 2 % defective and a test with 95 % sensitivity and 90 % specificity, build the table of the four possible cases and calculate the positive predictive value by counting parts, without using the formula.
05Common mistakes
- Confusing \( P(A\mid B) \) with \( P(B\mid A) \). It is the mistake that makes Bayes necessary.
- Taking independent for mutually exclusive. They are almost opposites.
- Multiplying probabilities of dependent events. The product holds only if they are independent.
- Ignoring the base rate. Without knowing how frequent the defect is, a positive does not mean anything.
- Assuming that redundancy always multiplies reliability. It does not, if there is a common-cause failure.
- Believing that after many heads it is “due” to come up tails. The coin has no memory.
06Self-assessment
When are two events independent?
When \( P(A\cap B) = P(A)P(B) \): knowing that one occurred does not change the probability of the other.
What is the reliability of a hundred components in series at 99.9 %?
\( 0.999^{100} = 90.5\ \% \). In series, the reliability of the whole is always worse than that of the worst part.
What is Bayes’ theorem for?
To invert a conditional: to go from the probability of the result given the state, to that of the state given the result.
Why does a 99 % test give so many false positives?
Because if the good parts are ninety-nine times more numerous, their 1 % of error contributes as many cases as the 99 % accuracy on the few defective ones.
What is a common-cause failure?
One that takes down the redundant units at the same time, such as a shared power supply or a repeated design flaw.
What reliability do two 95 % units in parallel give?
99.75 %: the system fails only if both fail, and \( 0.05^2 = 0.0025 \).
07Further reading
- Douglas C. Montgomery and George C. Runger. Applied Statistics and Probability for Engineers. 7th ed. (Spanish edition, “Probabilidad y estadística aplicadas a la ingeniería”), Wiley, 2018. All of Chapter 2: axioms, conditional probability, independence and Bayes with engineering problems.
- Sheldon Ross. Introduction to Probability and Statistics for Engineers and Scientists. 5th ed. (Spanish edition, “Introducción a la probabilidad y estadística para ingenieros”), Elsevier, 2018. A more formal treatment, with good exercises on total probability and compound events.
- Patrick D. T. O'Connor and Andre Kleyner. Practical Reliability Engineering. 5th ed., Wiley, 2012. System reliability, redundancy and common-cause failures applied to real equipment.