Probability
The chance of at least one is one minus the chance of none.
Before this Lesson
A lab runs eight independent tests, and each has a 10% chance of failing. What's the chance that at least one fails? Adding gets you 80%, which sounds fine until eleven tests give you 110%. No chance can top 100%, so adding was wrong all along. The real answer is about 57%, and two rules get you there.
Counting what can happen
When every outcome is equally likely, probability is counting: the outcomes you care about, divided by all the outcomes there are. Two dice can land ways, all equally likely, as long as a 1 then a 6 and a 6 then a 1 count as different.
Six cells hold a 7, so the chance of a sum of 7 is . As the Handbook's Laws of Probability put it, every probability lies from 0, impossible, to 1, certain. And an event either happens or it doesn't, so those two chances add to 1:
The Handbook doesn't print this complement rule, but reach for it whenever the event you want covers most of the possibilities. A sum of at least 3 takes in 35 cells. Only the corner cell is left out, so the chance is .
"Or" adds, minus the overlap
A foundry inspects 100 castings. Forty are cracked, 20 are out of tolerance, and 15 are both. How many have a defect? Not 60. The 15 with both problems got counted twice, so take them out once: .
Divide by 100, and you have Property 2 in the Handbook's Laws of Probability:
The plus sign and comma aren't arithmetic. is the chance of A or B or both, and is the chance of both.
Events that can't happen together, like a sum of 2 and a sum of 7 on one roll, are mutually exclusive. With , plain adding is correct.
"And" multiplies, if the events are independent
Two events are independent when one happening doesn't change the chance of the other. If pump A starts 90% of the time, and pump B starts 80% of the time no matter what A does, both start on 80% of that 90%, a fraction of a fraction: 0.72.
That condition matters. The castings fail it: , but the actual overlap is 0.15.
Now back to the eight tests. "At least one fails" can happen in a pile of ways. "None fails" happens one way: all eight pass. So take the complement:
Each test passes with probability 0.9, so , and at least one fails with probability 0.570. Adding failed because failures overlap: a run with three failures got counted three times.
"Given" shrinks the world
A factory's two machines made these parts last month:
| Machine | Defective | Good | Total |
|---|---|---|---|
| Machine 1 | 12 | 588 | 600 |
| Machine 2 | 20 | 380 | 400 |
| Total | 32 | 968 | 1,000 |
Suppose you know a part came from Machine 2. Everything outside that row is gone, and your world has shrunk to 400 parts, 20 of them defective. That's a conditional probability, with a bar that reads "given":
Flip the question. You know a part is defective, so now your world is the Defective column:
It's the same 20 on top, over two different worlds. and are different questions, so always ask which world the "given" leaves you in.
The Handbook's Property 3, the Law of Compound or Joint Probability, says this in symbols:
The chance of both is the chance of A, times the chance of B in A's world. If A doesn't change B's chance, is just , and you're back to the multiplication rule, which the Handbook doesn't print on its own.
Bayes' theorem is that table in disguise
The exam often hides the table behind percentages. Machine 1 makes 60% of the parts, and 2% of its parts are defective. Machine 2 makes 40%, and 5% of its parts are defective. A part is defective. What's the chance it came from Machine 2? Follow each path a part can take, multiplying along the way as Property 3 says.
"Given defective" keeps only the two paths that end in Defective. Machine 2 holds 0.020 of their combined 0.032, so the chance is 0.625, the same as the table. That's all of the Handbook's Bayes' Theorem:
The s are the machines, which must cover every possibility with no overlap, and is "defective." The top is the one path you're asking about, and the bottom is every path that reaches .
Mutually exclusive isn't independent
These two terms sound like cousins but are closer to opposites, and the Handbook defines neither. Mutually exclusive events can't happen together. Independent events tell you nothing about each other. But if A and B are mutually exclusive and A happens, you know for certain that B didn't, and that's a lot to learn.
To tell them apart, check : 0 means mutually exclusive, and means independent. When the exam asks which probability statements are valid, three more checks help: every probability lies from 0 to 1, can't exceed either event, and can't fall short of either.
Exactly x out of n: the binomial
Now repeat one yes-or-no trial times, independently, with the same probability each time. The count of how many times it happens follows the binomial distribution.
Four tests each fail with probability 0.1. What's the chance that exactly two fail? Fail, fail, pass, pass has probability . But that's only one ordering.
Every row holds the same factors, shuffled, so every row has the same probability. The rows are mutually exclusive, so they add: .
That's the whole binomial: the number of orderings, times the probability of one. The Handbook's Binomial Distribution section writes it with :
, the number of combinations, counts the ways to choose which of the trials are the ones being counted, and your calculator's combinations function computes it. One catch: the Handbook calls the probability of "success," but success is only a label for whatever counts. When counts failed tests, is the chance of failing.
At most and at least
A range of counts is a sum of exact counts. Here's every possibility for the eight tests:
A quantity set by chance, like this count, is a random variable, written , and is one value it can take. The bars add to 1, and the dashed line puts each one on exactly one side, so:
That is where people slip: "at least 2" leaves out 0 and 1, not 2. "More than 2" means at least 3, and "at least one" is , one minus none again.
The Handbook's Cumulative Binomial Probabilities table adds the bars for you, listing . Here's a piece of it.
| x | n = 8, p = 0.10 | n = 10, p = 0.10 | n = 10, p = 0.20 |
|---|---|---|---|
| 0 | 0.430 | 0.349 | 0.107 |
| 1 | 0.813 | 0.736 | 0.376 |
| 2 | 0.962 | 0.930 | 0.678 |
| 3 | 0.995 | 0.987 | 0.879 |
Adapted from the FE Reference Handbook, Cumulative Binomial Probabilities
For eight tests, . The real table runs and down its rows and across its top, and prints 0.813 as 8.13E-01. It stops at , apart from 15 and 20, and has no column for 0.05. Off the table, use the formula.
The mean and spread of a binomial count
Run 100 tests that each fail 10% of the time, and you'd expect about 10 failures. That's the mean, . The Handbook's Binomial Distribution section gives the variance, and its Probability and Density Functions: Means and Variances table lists both:
If is 0 or 1, nothing is uncertain, and the variance comes out 0. The standard deviation is the square root of the variance. For those 100 tests, , , and .
Expected value is a weighted average
A crew's equipment breaks down some number of times each day:
| x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.50 | 0.30 | 0.15 | 0.05 |
Picture 100 days: about 50 with none, 30 with one, 15 with two, and 5 with three. That's 75 breakdowns, or 0.75 a day. No day ever has 0.75 breakdowns, so "expected" is a misleading word. It means the long-run average.
Dividing by 100 turns the day counts back into probabilities, so it's each value times its probability, added up. The Handbook's Expected Values section writes it with :
Stand each probability on a plank as a weight at its , and the mean is where the plank balances.
Variance is also a weighted average, of the squared distance from the mean:
When can take any value in a range, a density replaces the table, and probability is area under it, the idea behind The Normal Distribution. A thin slice plays the part of a probability, so the sum becomes the Handbook's integral:
From Integrals and Area: raise each exponent by one and divide by the new exponent to get the antiderivative . Then take .
Integrate only where the density isn't zero. For from 0 to 2: