🎲 Probability, tests and the binomial

Four rules, one tree diagram, and the binomial. Everything on the exam fits in those.

⭐ The one idea

Probability is a number from 0 (impossible) to 1 (certain) that says how likely something is. Four rules cover almost every question; the tree diagram and the 2 × 2 table cover the rest.

🎲 The basics

🔢 Classical probability

P(E) = (ways E can happen) / (all equally likely outcomes)

P(rolling a 5) = 1/6. P(a random blood type is O+) needs data, not counting — that is empirical.

📊 Empirical (relative frequency)

P(E) ≈ (times E happened) / (trials)

62 of 250 discharged patients were readmitted → P(readmit) ≈ 62/250 = 0.248. More trials → closer to the truth (law of large numbers).

🔄 Complement

P(not E) = 1 − P(E)

If P(reaction) = 0.03, P(no reaction) = 0.97. The complement is the fastest route to “at least one” questions.

📌 Vocabulary

Experiment: the process (give the vaccine). Outcome: one result (fever). Sample space: all outcomes. Event: a set of outcomes you care about. Unusual: P ≤ 0.05.

➕ Addition rule: “A or B”

A or B: do not double-countABbothA = diabetes · B = hypertensionP(A or B) = P(A) + P(B) − P(A and B)The overlap sits inside bothcircles, so you subtract itonce.
Adding P(A) and P(B) counts the overlap twice, so subtract it once.

🔗 General rule

P(A or B) = P(A) + P(B) − P(A and B)

On a unit, 40% have diabetes, 55% have hypertension, 25% have both. P(diabetes or HTN) = 0.40 + 0.55 − 0.25 = 0.70.

✂️ Mutually exclusive (disjoint)

P(A or B) = P(A) + P(B)

Can’t both happen: blood type A or blood type O. P = 0.42 + 0.44 = 0.86. No overlap to subtract.

✖️ Multiplication rule: “A and B”

🔗 General rule

P(A and B) = P(A) · P(B | A)

P(B | A) = probability of B given A already happened. Two doses from a tray of 10 where 3 are expired, without replacement: P(both expired) = 3/10 · 2/9 = 0.067.

🎲 Independent events

P(A and B) = P(A) · P(B)

One does not change the other. Two unrelated patients each with a 10% chance of a fall: P(both fall) = 0.1 × 0.1 = 0.01.

Test for independence: is P(B | A) = P(B)?

⭐ “At least one” trick

P(at least one) = 1 − P(none). Five patients, each 10% likely to be allergic: P(none) = 0.9⁵ = 0.590, so P(at least one allergic) = 1 − 0.590 = 0.41.

🌿 Conditional probability and tree diagrams

P(B | A) = P(A and B) / P(A)
A rapid strep testprevalence 20%, sensitivity 90%,specificity 95%100 patientsbefore any testingStrep: 20prevalence 0.20Test + : 18sensitivity 0.90 — caughtTest − : 20.10 — missedNo strep: 800.80 of everyoneTest + : 40.05 — false alarmTest − : 76specificity 0.95P(strep | test +) = 18 / 22 = 0.82the positive predictive valueOf 22 positive tests only 18really have strep, because mostpeople tested do not have it.
Multiply along the branches for “and”; add the branches that fit for “or”. Then the conditional probability is (the branch you want) ÷ (all the branches with that test result).

🧪 Read the tree

Of 100 people, 22 test positive (18 true + 4 false). Only 18 of those 22 actually have strep: P(strep | positive) = 18/22 = 0.82. And P(positive | strep) = 0.90 — these are different questions. Order matters in conditional probability.

🩺 Sensitivity, specificity, predictive value

Diagnostic 2 × 2 table1,000 patients, 10% really have itDisease +Disease −Test +Test −TP 90FP 45FN 10TN 855Sensitivity90 / 100 = 90%Specificity855 / 900 = 95%PPV90 / 135 = 67%NPV855 / 865 = 99%Sensitivity and specificity readacross the true state. PPV andNPV read across the test result.
A 2 × 2 table is the tree diagram flattened. Columns = truth, rows = test result.
TermFormulaQuestion it answers
SensitivityTP / (TP + FN)Of the people who have it, what fraction test positive? (SN-OUT: high sensitivity, negative rules out)
SpecificityTN / (TN + FP)Of the people who don’t, what fraction test negative? (SP-IN: high specificity, positive rules in)
PPVTP / (TP + FP)My test is positive — how likely do I really have it? Falls when the disease is rare.
NPVTN / (TN + FN)My test is negative — how likely am I really clear?
Prevalence(TP + FN) / totalHow common is the disease in this group?

📊 Discrete probability distributions

🔢 A random variable X

A number whose value depends on chance. X = number of patients who no-show out of 4 booked. A probability distribution lists every value with its probability; the probabilities must each be 0–1 and add to 1.

x (no-shows)01234
P(x)0.410.410.150.030.00

⚖️ Mean (expected value)

μ = Σ x·P(x)

= 0(0.41) + 1(0.41) + 2(0.15) + 3(0.03) + 4(0) = 0.80 no-shows per clinic day, on average.

↔️ Standard deviation

σ = √( Σ x²·P(x) − μ² )

= √(0 + 0.41 + 0.60 + 0.27 + 0 − 0.64) = √0.64 = 0.80.

🎲 The binomial distribution

✅ Binomial checklist (BINS)

10 patients each have a 30% chance of nausea with a drug. X = number who get nausea → binomial, n = 10, p = 0.3.

Binomial: n = 10, p = 0.30.000.130.27012345678910P(X = k)
Bar height = P(X = k). The bars add to 1. Mean np = 3 is where the hump sits.

🔢 Exactly k

P(X = k) = C(n,k) pᵗ (1−p)ⁿ⁻ᵗ

P(X = 3) = C(10,3)(0.3)³(0.7)⁷ = 120 · 0.027 · 0.0824 = 0.267

📊 At least / at most

P(X ≤ 3) = 0.650 (add k = 0,1,2,3).

P(X ≥ 4) = 1 − P(X ≤ 3) = 0.350.

“More than 3” = X ≥ 4. “Fewer than 3” = X ≤ 2. Read the words carefully.

⚖️ Mean and SD

μ = np = 3    σ = √(npq) = √2.1 = 1.45

Unusual if more than 2 SD from the mean: above 3 + 2(1.45) = 5.9 → 6 or more nauseated patients would be unusual.

🧮 Desmos

1B = binomialdist(10, 0.3)
2B.pdf(3)= 0.2668
3B.cdf(3)= 0.6496 (X ≤ 3)
41 − B.cdf(3)= 0.3504 (X ≥ 4)
5B.cdf(2, 5)= P(2 ≤ X ≤ 5)
6B.mean, B.stdev= 3, 1.449

✅ Quick self-check

❓ P(patient is on anticoagulants) = 0.30, P(on insulin) = 0.20, P(both) = 0.08. P(either)?
0.30 + 0.20 − 0.08 = 0.42. Not independent, because 0.30 × 0.20 = 0.06 ≠ 0.08.
❓ A test has sensitivity 95% and specificity 90%. Prevalence is 2%. Of 1,000 people, how many false positives?
980 are disease-free; 10% of them test positive: 98 false positives (vs only 19 true positives). Low prevalence wrecks PPV: 19/117 = 16%.
❓ 12% of patients miss follow-up. In a random group of 8, P(exactly 2 miss)?
Binomial n = 8, p = 0.12: C(8,2)(0.12)²(0.88)⁶ = 28 · 0.0144 · 0.4644 = 0.187. Desmos: binomialdist(8,0.12).pdf(2).
MAT 300 · built from your own course files (the statistics study guide, the Desmos guide, the formula sheet and the final-exam study questions) with nursing examples. Not a substitute for the textbook — check any number against your own notes before an exam.