Probability as a Language for Uncertainty
Probability is a way to describe uncertainty with numbers from 0 to 1. A probability of 0 means an event cannot happen, 1 means it must happen, and values in between quantify how plausible the event is given what you know.
In practice, probabilities are always tied to a clearly defined process (a test result, a production line, a day’s weather) and a clearly defined event (test is positive, item is defective, it rains).
Events and Notation
An event is an outcome or set of outcomes of interest.
A: “The medical test is positive.”B: “The person truly has the disease.”D: “A manufactured part is defective.”
We write P(A) for “the probability that event A occurs.”
Complements: “Not A”
The complement of an event A is “A does not happen,” written A^c (or sometimes “not A”). Complements are useful because many real questions are naturally phrased as “at least one,” “none,” or “not.”
- Listen to the audio with the screen off.
- Earn a certificate upon completion.
- Over 5000 courses for you to explore!
Download the app
Rule (complement):
P(A^c) = 1 - P(A)Example: If a quality-control system flags a part with probability P(F)=0.08, then the probability it is not flagged is P(F^c)=1-0.08=0.92.
Combining Events: Addition Rule (Union)
Sometimes you want the probability that either of two events happens. The event “A or B” is written A ∪ B.
General addition rule:
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)The subtraction avoids double-counting outcomes where both happen (A ∩ B).
Special case (mutually exclusive events): If A and B cannot both occur, then P(A ∩ B)=0 and:
P(A ∪ B) = P(A) + P(B)Quality-control example: A part can fail for a crack (C) or a dimension error (E). Suppose P(C)=0.03, P(E)=0.04, and P(C ∩ E)=0.01 (some parts have both issues). Then:
P(C ∪ E) = 0.03 + 0.04 - 0.01 = 0.06Meaning: 6% of parts have at least one of these problems.
Conditional Probability: Updating with New Information
Conditional probability answers: “What is the probability of A given that B happened?” Written P(A | B).
Definition:
P(A | B) = P(A ∩ B) / P(B) (when P(B) > 0)Interpretation: once you know B occurred, you restrict attention to the B cases and ask what fraction of those also have A.
Medical Testing Language: Sensitivity and Specificity
- Sensitivity:
P(Test+ | Disease) - Specificity:
P(Test- | No disease)
What people often actually want is P(Disease | Test+), which is different and depends strongly on the base rate (prevalence) P(Disease).
Independence vs. Dependence
Two events A and B are independent if knowing one occurred does not change the probability of the other.
Equivalent ways to express independence:
P(A | B) = P(A)P(B | A) = P(B)P(A ∩ B) = P(A)P(B)
Common pitfall: Events can be “unrelated in story” but still dependent because of how the process works (e.g., two items from the same machine shift, or two tests on the same person).
Multiplication Rule: “And” Probabilities
The event “A and B” is A ∩ B.
General multiplication rule:
P(A ∩ B) = P(A) P(B | A)Or symmetrically: P(A ∩ B) = P(B) P(A | B).
Independent case: If A and B are independent, then P(B|A)=P(B) and:
P(A ∩ B) = P(A)P(B)Quality-control example (independent approximation): If 2% of parts are defective (D) and 5% are mislabeled (L), and you assume independence, then:
P(D ∩ L) = 0.02 × 0.05 = 0.001About 0.1% are both defective and mislabeled. If the same process causes both, independence may fail; then you need conditional probabilities from data.
Base Rates (Prevalence) and Why They Matter
A base rate is the overall probability of a condition before seeing new evidence, such as disease prevalence or the defect rate in production. Ignoring base rates leads to overconfidence in rare-event detection.
Worked Example: A Medical Test with a Low Base Rate
Suppose:
- Prevalence:
P(D)=0.01(1% have the disease) - Sensitivity:
P(T+|D)=0.90 - Specificity:
P(T-|D^c)=0.95soP(T+|D^c)=0.05
Question: If someone tests positive, what is P(D|T+)?
Tool 1: Tree Diagram (with Step-by-Step Computation)
Tree diagrams help you multiply along branches and then add across paths.
Start (100% of people) Probability of path (multiply along branch) Meaning of path count (per 10,000 people, optional scaling) ------------------------------------------------------------------------------------ Disease D (1%) ├─ Test + (90%) → 0.01 × 0.90 = 0.009 90 └─ Test - (10%) → 0.01 × 0.10 = 0.001 10 No disease D^c (99%) ├─ Test + (5%) → 0.99 × 0.05 = 0.0495 495 └─ Test - (95%) → 0.99 × 0.95 = 0.9405 9405Step 1 (compute joint probabilities): Multiply along each path (e.g., P(D ∩ T+)=P(D)P(T+|D)=0.009).
Step 2 (compute total probability of a positive test):
P(T+) = P(D ∩ T+) + P(D^c ∩ T+) = 0.009 + 0.0495 = 0.0585Step 3 (compute the desired conditional probability):
P(D | T+) = P(D ∩ T+) / P(T+) = 0.009 / 0.0585 ≈ 0.154Even with a fairly accurate test, when the disease is rare, most positive results can be false positives. The base rate (1%) is the key reason.
Tool 2: Two-Way Table (Same Information, Different View)
Two-way tables make conditional probabilities easy to read as “row/column fractions.” Using a convenient population of 10,000 people (scaling does not change probabilities):
| Test + | Test - | Total | |
|---|---|---|---|
| Disease (D) | 90 | 10 | 100 |
| No disease (D^c) | 495 | 9405 | 9900 |
| Total | 585 | 9415 | 10000 |
Now:
P(D|T+)is “among Test+, fraction with Disease” =90/585 ≈ 0.154P(T+|D)is “among Disease, fraction Test+” =90/100 = 0.90
Notice how the table prevents mixing up P(D|T+) with P(T+|D); they are different questions.
Connecting Rules to Meaning in Real Contexts
Quality Control: Multiple Inspection Stages
A factory uses a quick screen (S) and then a detailed inspection (I) only if the screen flags the part.
P(S)=0.10(10% flagged by screen)P(I+|S)=0.30(30% of flagged parts fail detailed inspection)
What proportion of all parts fail detailed inspection?
Step-by-step using multiplication:
- Fail detailed inspection means
S ∩ I+(must be flagged and then fail). P(S ∩ I+) = P(S)P(I+|S) = 0.10 × 0.30 = 0.03
So about 3% of all parts fail detailed inspection.
“Either/Or” Decisions: When Addition Needs Subtraction
A shipment is rejected if it is late (L) or damaged (G). Suppose P(L)=0.12, P(G)=0.07, and P(L ∩ G)=0.02.
Compute rejection probability:
P(L ∪ G) = 0.12 + 0.07 - 0.02 = 0.1717% of shipments are rejected for at least one reason.
Practice: Translate Between Words, Tables, and Probabilities
Practice Set A: Words → Symbols → Probability Expression
- Item A1: “The part is not defective.” Write using complement notation. Answer format:
_____ - Item A2: “The customer receives a refund given that the order arrived late.” Write as a conditional probability. Answer format:
_____ - Item A3: “The email is spam or it contains an attachment.” Write as a union. Answer format:
_____ - Item A4: “The patient has the disease and the test is negative.” Write as an intersection. Answer format:
_____
Practice Set B: Two-Way Table → Probabilities
A factory audits 200 items and records whether each is defective (D) and whether it was flagged by an automated scanner (F).
| Flagged (F) | Not flagged (F^c) | Total | |
|---|---|---|---|
| Defective (D) | 18 | 12 | 30 |
| Not defective (D^c) | 14 | 156 | 170 |
| Total | 32 | 168 | 200 |
- Item B1: Compute
P(D). - Item B2: Compute
P(F). - Item B3: Compute
P(D ∩ F). - Item B4: Compute
P(D | F)(among flagged items, how many are defective?). - Item B5: Compute
P(F | D)(among defective items, how many are flagged?).
Practice Set C: Probabilities → Tree Diagram Steps
A screening test for a rare condition has:
P(C)=0.02P(T+|C)=0.85P(T+|C^c)=0.08
- Item C1: Draw a tree with first split
CvsC^c, thenT+vsT-. - Item C2: Compute
P(C ∩ T+)andP(C^c ∩ T+)by multiplying along branches. - Item C3: Compute
P(T+)by adding the two “positive” paths. - Item C4: Compute
P(C|T+)and explain in one sentence how the base rate affects it.
Quick Reference: Which Rule Fits Which Phrase?
| Phrase in words | Symbol | Typical rule |
|---|---|---|
| “not A” | A^c | P(A^c)=1-P(A) |
| “A or B” | A ∪ B | P(A)+P(B)-P(A∩B) |
| “A and B” | A ∩ B | P(A)P(B|A) |
| “A given B” | P(A|B) | P(A∩B)/P(B) |