Probability and statistics are easiest to learn when every formula is attached to a decision someone actually has to make: should a patient worry about a positive test, did a website change really lift sales, how many people does a survey need? This article collects 100 short, fully worked examples arranged from basic probability to the paradoxes that catch out experienced analysts.
Each example follows the same pattern: the scenario, the concept it uses, the computation step by step, and a one-line interpretation. Unless a figure is explicitly cited, the numbers are illustrative: they were chosen to make the arithmetic clear, not taken from real studies. The only real data set used here is the 1973 Berkeley admissions data in example 96. Every result was recomputed with Python (NumPy and SciPy) before publication.
Formulas and conventions follow standard references, mainly OpenStax Introductory Statistics 2e and the NIST/SEMATECH e-Handbook of Statistical Methods.
Basic probability
These examples use the classical definition of probability (favorable outcomes divided by equally likely outcomes), the complement rule, and counting.
1. Rolling a six in a board game
Scenario: A board game lets you leave the starting square only on a six. Concept: Equally likely outcomes.
Interpretation: On average, one turn in six lets you start moving.
2. Rolling a total of seven with two dice
Scenario: Many dice games pay out on a total of seven. Concept: Counting outcomes in a sample space of ordered pairs.
The pairs that sum to 7 are (1,6), (2,5), (3,4), (4,3), (5,2), (6,1):
Interpretation: Seven is the most likely total because more pairs produce it than any other sum.
3. Drawing a heart or a king
Scenario: A magician asks you to draw a card that is either a heart or a king. Concept: Addition rule for overlapping events.
Interpretation: Subtract the king of hearts once, or it is counted twice.
4. At least one six in four rolls
Scenario: A classic gambling bet: will at least one six appear in four rolls of a die? Concept: Complement rule, .
By contrast, getting at least one double six in 24 rolls of two dice has probability .
Interpretation: The first bet is slightly favorable and the second slightly unfavorable, even though both "feel" similar.
5. Guessing a four-digit PIN
Scenario: A phone locks after three wrong PIN attempts. Suppose the PIN was chosen uniformly at random. Concept: Equally likely outcomes without repetition of guesses.
Interpretation: Lockouts keep random guessing nearly hopeless; real PINs are not uniform, which is why common PINs are riskier.
6. The birthday problem in a meeting room
Scenario: What is the chance that at least two of 23 colleagues share a birthday? Assume 365 equally likely birthdays and ignore leap years. Concept: Complement rule with a product of probabilities.
With 50 people the probability rises to about 0.9704.
Interpretation: Coincidences are far more common than intuition suggests because the number of pairs grows quickly.
7. Winning a 6-of-49 lottery
Scenario: A lottery draws 6 numbers from 49, and order does not matter. Concept: Combinations.
Interpretation: One ticket has a 1 in 13,983,816 chance of matching all six numbers.
8. Redundant servers
Scenario: A website runs on two servers. Suppose each is down 1% of the time, independently. The site fails only if both are down. Concept: Multiplication rule for independent events.
Interpretation: Redundancy works only if failures are truly independent; a shared power supply would break this calculation.
9. Components in series
Scenario: A device needs three parts to work, each with an assumed reliability of 0.98, failing independently. Concept: Series reliability is a product.
Interpretation: Chaining parts erodes reliability: three good parts give a system that fails almost 6% of the time.
10. Counting license plates
Scenario: A plate format uses three letters followed by three digits. Concept: Fundamental counting principle.
Interpretation: The format supports about 17.6 million distinct plates.
11. Podium finishes in a race
Scenario: Eight runners compete; how many different gold–silver–bronze outcomes are possible? Concept: Permutations (order matters).
Interpretation: A prediction of the exact podium has a 1 in 336 chance if all orders were equally likely.
12. Coffee and tea drinkers in a survey
Scenario: Suppose 60% of employees drink coffee, 30% drink tea, and 20% drink both. Concept: Addition rule.
Interpretation: A break room stocking both drinks covers 70% of staff.
Conditional probability and Bayes' theorem
Conditional probability is the probability of once you know happened. Bayes' theorem reverses the condition:
13. A positive medical screening test
Scenario: Suppose a condition affects 1% of people, a test is 95% sensitive (detects 95% of true cases) and 90% specific (correctly clears 90% of healthy people). A person tests positive. Concept: Bayes' theorem and base rates.
Think of 10,000 people: 100 have the condition and 95 of them test positive; 9,900 do not, and 10% of them, 990, also test positive.
Interpretation: With a rare condition, most positives are false positives; a positive result means "investigate further," not "diagnosed."
14. A second positive test
Scenario: The same person takes the test again and is positive again. Assume the two results are independent given the true status (real repeat tests often are not). Concept: Sequential Bayesian updating; yesterday's posterior is today's prior.
Interpretation: Two positives raise the probability from about 9% to about 48%, which is why confirmatory testing matters.
15. A spam filter and the word "free"
Scenario: Suppose 40% of email is spam, the word "free" appears in 25% of spam and 2% of legitimate mail. Concept: Bayes' theorem for classification.
Interpretation: One word moves the spam probability from 40% to about 89%; real filters combine many such clues.
16. Workplace drug testing
Scenario: Suppose 5% of applicants use a substance, and the test is 99% sensitive and 98% specific. Concept: Positive predictive value.
Interpretation: Even an excellent test leaves about 28% of positives as false alarms at this base rate.
17. Product returns from a contingency table
Scenario: An online store sold 1,000 orders: 200 shoe orders (50 returned) and 800 other orders (40 returned). Concept: Conditional probability from counts, and why the order of conditioning matters.
Interpretation: A quarter of shoe orders come back, but more than half of all returns are shoes. These answer different questions.
18. The Monty Hall game show
Scenario: A prize is behind one of three doors. You pick one; the host, who knows where the prize is, always opens a different, empty door and offers a switch. Concept: Conditional probability with an informed host.
Your first pick is right with probability . The host never reveals the prize, so switching wins whenever your first pick was wrong:
Interpretation: Switching doubles your chances, but only because the host's choice is constrained by knowledge.
19. Which factory made the defective part?
Scenario: Factory A makes 60% of parts with a 2% defect rate; factory B makes 40% with a 5% defect rate (illustrative). Concept: Law of total probability, then Bayes.
Interpretation: Although A makes most parts, a defective part is more likely (62.5%) to come from B.
20. Rain and a late commute
Scenario: Suppose it rains on 30% of days; you are late 40% of the time when it rains and 10% when it is dry. Concept: Total probability and reverse conditioning.
Interpretation: If you were late, it probably rained, even though most days are dry.
21. Is device type independent of buying?
Scenario: Of 1,000 visitors, 400 used mobile (60 bought) and 600 used desktop (90 bought). Concept: Independence means .
Interpretation: In this sample, device type tells you nothing about whether someone buys.
22. Credit card fraud alerts
Scenario: Suppose 0.1% of transactions are fraudulent, and a detector flags 99% of fraud and 1% of legitimate transactions. Concept: Base rates in rare-event detection.
Interpretation: About nine in ten alerts are false; fraud teams need a cheap second check, not automatic blocking.
23. The prosecutor's fallacy
Scenario: Suppose a forensic trait matches by chance with probability 1 in 1,000,000, and the crime occurred in a city of 5,000,000 people. A suspect matches and there is no other evidence. Concept: Confusing with .
Expected innocent matches: . With one true culprit also matching:
Interpretation: "One in a million" does not mean "a million to one guilty"; in a large population, chance matches add up.
24. The two-child puzzle
Scenario: A family has two children and at least one is a boy. What is the chance both are boys? Assume each child is equally likely to be a boy or a girl, independently. Concept: Conditioning shrinks the sample space.
Equally likely families: BB, BG, GB, GG. Knowing "at least one boy" removes GG:
Interpretation: The exact wording of what you know changes the answer; this is a common source of disagreement.
Discrete probability distributions
A binomial experiment has a fixed number of independent trials, each with the same success probability . Its mean is and its standard deviation is .
25. Free throws in basketball
Scenario: A player makes 70% of free throws (assumed constant and independent). What is the chance of exactly 7 makes in 10 attempts? Concept: Binomial probability.
Interpretation: Even the most likely outcome happens only about a quarter of the time.
26. Finding at least one defect in a sample
Scenario: Suppose 2% of items are defective. An inspector checks 50. Concept: Binomial complement.
Interpretation: A sample of 50 misses a 2% defect problem more than a third of the time.
27. Guessing on a multiple-choice quiz
Scenario: A student guesses all 10 questions, each with 4 options. The pass mark is 6. Concept: Binomial upper tail.
Interpretation: Pure guessing passes about 2% of the time.
28. Email campaign clicks
Scenario: An email goes to 1,000 subscribers; suppose each clicks with probability 3%. Concept: Binomial mean and standard deviation.
Interpretation: Between roughly 19 and 41 clicks (two standard deviations) would be unremarkable.
29. Calls to a help desk
Scenario: Suppose a help desk receives an average of 3 calls per 10 minutes, arriving randomly. Concept: Poisson distribution, .
Interpretation: A quiet 10-minute stretch happens about 5% of the time.
30. Server errors in a day
Scenario: Suppose a service logs 2 critical errors per day on average. Is a day with 5 or more unusual? Concept: Poisson upper tail.
Interpretation: About one day in 19 would have 5 or more errors by chance alone, so a single bad day is weak evidence of a new bug.
31. Typos in a document
Scenario: Suppose each word has a 1 in 500 chance of a typo, and a document has 1,000 words. Concept: Poisson approximation to the binomial with .
Interpretation: For many rare, independent chances, the Poisson shortcut is almost exact; a typo-free document is about a 13.5% outcome.
32. Sales calls until the first sale
Scenario: Suppose each sales call succeeds with probability 0.2. Concept: Geometric distribution.
Interpretation: Plan on about five calls per sale, with plenty of variation.
33. Waiting for the third sale
Scenario: Same salesperson; what is the chance the third sale comes on exactly the 10th call? Concept: Negative binomial distribution.
Interpretation: The first nine calls must contain exactly two sales, then call 10 must succeed.
34. Acceptance sampling from a small lot
Scenario: A lot of 50 items contains 5 defectives. An inspector draws 10 without replacement. Concept: Hypergeometric distribution.
Interpretation: A lot that is 10% defective passes a zero-defect inspection of 10 items about 31% of the time.
35. Matching exactly three lottery numbers
Scenario: In the 6-of-49 lottery, what is the chance of matching exactly 3? Concept: Hypergeometric counting.
Interpretation: Roughly 1 ticket in 57 matches exactly three numbers.
36. Collecting all six stickers
Scenario: Cereal boxes contain one of 6 stickers, equally likely. How many boxes until you have all six? Concept: Coupon collector problem, .
Interpretation: The last sticker is the slow one: once you have five, you need six more boxes on average.
The normal distribution
The normal distribution has the familiar bell shape, with mean and standard deviation (NIST section 1.3.6.6.1). A z-score, , counts how many standard deviations a value lies from the mean, and the empirical rule says about 68%, 95% and 99.7% of values fall within 1, 2 and 3 standard deviations. Below, is the standard normal cumulative probability.
37. How tall is unusually tall?
Scenario: Suppose adult heights in a group are normal with mean 170 cm and standard deviation 7 cm. Where does 185 cm fall? Concept: z-score and percentile.
Interpretation: A 185 cm person is taller than about 98.4% of this group.
38. Reading a standardized score
Scenario: A test is scaled to mean 100 and standard deviation 15. Concept: Empirical rule.
Interpretation: A score of 130 is at the edge of the middle 95%, so it is uncommon but not extraordinary.
39. Bolts within tolerance
Scenario: Suppose bolt diameters are normal with mean 10.00 mm and standard deviation 0.02 mm, and the specification is 9.96 to 10.04 mm. Concept: Probability between two z-scores.
Interpretation: About 4.55% of bolts would be out of spec, too many for most production lines.
40. Process capability in manufacturing
Scenario: Suppose a shaft must be 10.00 ± 0.05 mm and the process standard deviation is 0.01 mm. Concept: Capability indices and (NIST section 6.1.6).
If the process mean drifts to 10.02 mm:
Interpretation: The process is precise enough, but an off-center mean wastes much of that margin.
41. Setting a cutoff for the top 10%
Scenario: Exam scores are assumed normal with mean 70 and standard deviation 10. What score marks the top 10%? Concept: Inverse normal (percentile to value).
Interpretation: A score of about 83 or higher places a student in the top tenth.
42. Late food deliveries
Scenario: Suppose delivery times are normal with mean 30 minutes and standard deviation 5. A guarantee promises delivery within 40 minutes. Concept: Upper-tail probability.
Interpretation: About 2.3% of orders would break the guarantee.
43. Is a coin biased after 1,000 flips?
Scenario: A fair coin is flipped 1,000 times. How likely is 530 or more heads? Concept: Normal approximation to the binomial with continuity correction.
Interpretation: 530 heads would happen about 3% of the time with a fair coin, suspicious but not proof.
44. Total time for a two-step task
Scenario: Step A takes a normally distributed time with mean 20 and SD 4 minutes; step B mean 30 and SD 3, independently. Concept: Sums of independent normals; variances add.
Interpretation: Standard deviations do not add (4 + 3 = 7 is wrong); variances do.
45. Comparing scores on two different tests
Scenario: Ana scores 650 on a test with mean 500 and SD 100; Ben scores 28 on a test with mean 21 and SD 5. Concept: Standardizing puts different scales on one ruler.
Interpretation: Ana did slightly better relative to her test-takers.
46. Airline overbooking
Scenario: A flight has 200 seats and sells 210 tickets. Suppose each passenger shows up independently with probability 0.94. Concept: Binomial tail, checked with a normal approximation.
Interpretation: Under these assumptions, about 1 flight in 5 would have more passengers than seats.
Expectation and variance
The expected value is the long-run average; variance measures spread around it.
47. Is a raffle ticket worth it?
Scenario: A charity sells 1,000 tickets at $5 each for a single $2,000 prize. Concept: Expected value of a gamble.
Interpretation: Each ticket loses $3 on average; the buyer is effectively donating.
48. Pricing an insurance policy
Scenario: Suppose a policy pays $20,000 with probability 1% per year. Concept: Expected payout as the break-even premium.
Interpretation: A premium of $250 would leave the insurer an expected $50 per policy to cover costs and risk.
49. A bet on red in American roulette
Scenario: An American wheel has 38 pockets, 18 red. A $1 bet on red pays $1. Concept: Expected value and house edge.
Interpretation: The player loses about 5.3 cents per dollar bet in the long run.
50. Extended warranty
Scenario: A two-year warranty costs $150. Suppose the chance of needing a $600 repair in that time is 10%. Concept: Comparing expected cost with price.
Interpretation: On average the warranty costs more than it saves; it buys peace of mind, not expected value.
51. Risk of a two-asset mix
Scenario: An illustrative portfolio holds 60% in asset A (SD 20%) and 40% in asset B (SD 10%), with correlation 0.3. This is a calculation exercise, not investment advice. Concept: Variance of a weighted sum.
Interpretation: The mix is less volatile than the weighted average of SDs (16%) because the assets do not move perfectly together.
52. Uncertainty in a project schedule
Scenario: Three independent tasks have duration SDs of 2, 3 and 6 days. Concept: Variances of independent variables add.
Interpretation: The total uncertainty is dominated by the most uncertain task.
53. Mixed-up coats at a party
Scenario: guests' coats are returned at random. How many guests expect to get their own coat? Concept: Linearity of expectation with indicator variables.
Each guest gets their own coat with probability , so
Interpretation: Whether there are 5 guests or 500, the expected number of correct returns is one.
54. Restaurant no-shows
Scenario: A restaurant has 80 reservations; suppose each no-shows independently with probability 0.10. Concept: Binomial expectation and spread.
Interpretation: Expect about 8 empty tables' worth of guests, give or take 3.
55. The casino's long-run take
Scenario: Players wager a total of $1,000,000 on red at American roulette. Concept: Law of large numbers applied to the house edge from example 49.
Interpretation: Individual sessions vary wildly, but across huge volumes the result settles near the expected value.
56. Waiting for a bus
Scenario: A bus comes every 10 minutes and you arrive at a random time. Concept: Continuous uniform distribution on .
Interpretation: You wait 5 minutes on average, and waits under 2 minutes or over 8 are each a 20% chance.
57. Time between customer arrivals
Scenario: Suppose customers arrive randomly, on average every 4 minutes. What is the chance of a gap longer than 10 minutes? Concept: Exponential distribution, .
Interpretation: About 8% of gaps exceed 10 minutes, and the exponential is memoryless: having waited 5 minutes does not make an arrival "due."
Descriptive statistics
Descriptive statistics summarize data: where its center is, how spread out it is, and what shape it has.
58. Mean versus median salary
Scenario: A small firm's ten annual salaries, in thousands of dollars, are 42, 45, 48, 50, 52, 55, 58, 60, 65 and 400. Concept: Sensitivity of the mean to outliers.
Interpretation: The mean suggests a typical salary of $87,500, but nine of ten employees earn $65,000 or less; the median describes them better.
59. Which shoe size to stock most
Scenario: A store's last 12 sales were sizes 8, 9, 9, 10, 9, 7, 11, 9, 8, 10, 9, 8. Concept: Mode.
Size 9 appears five times, more than any other size, so the mode is 9.
Interpretation: For stocking decisions on categories, the mode answers "what is most common" directly.
60. Day-to-day temperature variation
Scenario: Five daily highs (°C) were 18, 21, 23, 19, 24. Concept: Sample standard deviation.
Interpretation: A typical day differs from the average by about 2.5 °C. Dividing by corrects for using the sample mean.
61. Spread of delivery times
Scenario: Eleven delivery times (minutes) were 12, 14, 15, 15, 17, 18, 19, 21, 22, 25, 41. Concept: Quartiles and interquartile range (IQR).
Using the median of each half (excluding the overall median of 18):
Interpretation: The middle half of deliveries spans 7 minutes. Software may give slightly different quartiles because several quartile conventions exist.
62. Flagging an outlier
Scenario: Same delivery data. Concept: The 1.5 × IQR fence rule used in box plots.
Interpretation: The 41-minute delivery is flagged for review; an outlier is a question, not automatically an error.
63. Comparing variability on different scales
Scenario: Machine A fills 500 g bags with SD 5 g; machine B fills 50 g bags with SD 1 g. Concept: Coefficient of variation, .
Interpretation: B has the smaller SD but is relatively twice as variable.
64. Weighted course grade
Scenario: Homework counts 20% (score 90), the midterm 30% (75) and the final 50% (82). Concept: Weighted mean.
Interpretation: The final exam's weight pulls the grade toward 82.
65. Average growth rate
Scenario: An investment gains 50% one year and loses 50% the next. Concept: Geometric mean for growth rates.
Interpretation: The arithmetic average return is 0%, yet the money shrank by 25%; compounding needs the geometric mean.
66. Average speed on a round trip
Scenario: You drive to a town at 60 km/h and return the same distance at 40 km/h. Concept: Harmonic mean for rates over equal distances.
Interpretation: The answer is not 50, because you spend more time at the slower speed.
67. Smoothing daily sales
Scenario: Daily sales were 120, 135, 128, 150, 160, 145. Concept: Three-day moving average.
Interpretation: The smoothed series shows a steady upward trend that day-to-day noise partly hides.
68. A guarantee that works for any distribution
Scenario: Wait times have mean 10 minutes and SD 2, but the shape is unknown. Concept: Chebyshev's inequality, at least of values lie within SDs.
Interpretation: Without assuming normality you still get a guaranteed (if conservative) bound.
Sampling and confidence intervals
The standard error of the mean, , measures how much sample means vary from sample to sample. A 95% confidence interval comes from a procedure that captures the true value in about 95% of repeated samples; any single interval either contains it or does not (NIST section 1.3.5.2).
69. Standard error of light bulb lifetimes
Scenario: A sample of 100 bulbs has SD 120 hours. Concept: Standard error.
Interpretation: Individual bulbs vary by about 120 hours, but the sample average is uncertain by only about 12.
70. Confidence interval for average screen time
Scenario: A sample of 25 people reports a mean of 4.2 hours of daily screen time with SD 0.8. Concept: t-interval, .
Interpretation: The data are consistent with a population average between about 3.9 and 4.5 hours.
71. Margin of error in an election poll
Scenario: A random sample of 1,000 voters shows 52% support for a candidate. Concept: Confidence interval for a proportion.
Interpretation: The interval includes values below 50%, so the poll alone cannot say the candidate leads.
72. How many people to survey
Scenario: A pollster wants a ±3 percentage point margin at 95% confidence. Concept: Sample size for a proportion, using the worst case .
Interpretation: Roughly a thousand respondents buys a ±3 point margin for a simple random sample; always round up.
73. Sample size for a mean
Scenario: Suppose blood pressure readings have SD 15 mmHg and a study wants the mean within ±2 mmHg at 95% confidence. Concept: .
Interpretation: About 217 participants are needed, before allowing for dropouts.
74. The cost of halving the margin of error
Scenario: The pollster from example 72 now wants ±1.5 points. Concept: Margin of error shrinks with .
Interpretation: Twice the precision needs four times the sample, which is why precision gets expensive.
75. Surveying a large share of a small population
Scenario: A company surveys 400 of its 2,000 employees. Concept: Finite population correction (FPC).
Interpretation: Standard errors shrink by about 10.5% because a fifth of the whole population was sampled.
76. Stratified sampling by department
Scenario: A firm has 600 engineers, 300 salespeople and 100 support staff, and wants a sample of 200. Concept: Proportional allocation.
Interpretation: Each group appears in the sample in its true proportion, so a small group cannot be missed by chance.
77. Averages are steadier than individuals
Scenario: Suppose individual delivery times have mean 30 and SD 6 minutes. A courier's daily average over 36 deliveries is reported. Concept: Central limit theorem.
Interpretation: A 32-minute single delivery is ordinary, but a 32-minute daily average is rare.
78. Estimating a fish population
Scenario: Ecologists tag 100 fish and release them. Later they catch 80, of which 16 are tagged. Concept: Capture–recapture (Lincoln–Petersen estimator).
A bias-reduced version (Chapman's estimator), , gives about 480.
Interpretation: The lake holds roughly 500 fish, assuming tagged fish mix evenly and are not easier or harder to catch.
Hypothesis testing and A/B tests
A hypothesis test asks how surprising the data would be if a default claim (the null hypothesis, ) were true. The p-value measures that surprise; as the American Statistical Association's 2016 statement stresses, it is not the probability that the hypothesis is true and does not measure the size of an effect (Wasserstein & Lazar, 2016).
79. Are cereal boxes underfilled?
Scenario: Boxes should hold 500 g. Suppose the filling SD is known to be 10 g, and 40 boxes average 497 g. Concept: One-sample z-test.
Interpretation: At the 5% level the shortfall is not statistically significant; it is not proof that filling is fine either.
80. Testing a battery-life claim
Scenario: A maker claims 20 hours of battery life. Sixteen tested units average 19.2 hours with SD 1.6. Concept: One-sample t-test, one-sided.
Interpretation: If the claim were true, an average this low would happen only about 3% of the time.
81. An A/B test on a sign-up button
Scenario: Version A converts 200 of 4,000 visitors (5.00%); version B converts 250 of 4,000 (6.25%). Concept: Two-proportion z-test.
Interpretation: The lift is unlikely to be pure chance, assuming the test was planned in advance and not stopped early when it looked good.
82. Is the die fair?
Scenario: A die rolled 60 times shows faces 1–6 with counts 8, 9, 12, 11, 6, 14. Concept: Chi-square goodness-of-fit test, each expected count 10.
Interpretation: These counts are entirely typical for a fair die; uneven-looking counts are normal in small samples.
83. Remote-work preference by department
Scenario: In a survey, 60 of 100 engineers and 35 of 100 salespeople prefer remote work. Concept: Chi-square test of independence.
Expected counts under independence are 47.5 (remote) and 52.5 (office) in each department:
Interpretation: Preference is strongly associated with department in this sample.
84. Comparing two teaching methods
Scenario: Method A: 30 students, mean 78, SD 10. Method B: 30 students, mean 72, SD 12. Concept: Welch two-sample t-test (NIST section 1.3.5.3).
With Welch–Satterthwaite , the two-sided .
Interpretation: The difference is statistically significant at 5%, but only a randomized design would justify calling it an effect of the method.
85. Did training speed up typing?
Scenario: Eight employees' typing speed changed by +5, +3, +6, −1, +4, +2, +7, +3 words per minute after training. Concept: Paired t-test on the differences.
Interpretation: Pairing removes person-to-person variation, which makes a small study informative.
86. Running twenty tests at once
Scenario: An analyst tests 20 metrics, each at , when nothing has really changed. Concept: Family-wise error rate and the Bonferroni correction.
Interpretation: Test enough things and something will look "significant"; adjust the threshold or pre-register the main metric.
87. How long to run an A/B test
Scenario: The baseline conversion rate is 5%, and the team wants to detect a lift to 6% with 5% significance (two-sided) and 80% power. Concept: Sample size for two proportions.
Interpretation: About 8,158 visitors per variant are needed; small lifts on small baselines need large samples.
88. The power of the cereal-box test
Scenario: Return to example 79. If the true mean really is 497 g, how often would that test detect it? Concept: Statistical power.
With the standardized shift and a two-sided cutoff of 1.96:
Interpretation: The test misses a real 3 g shortfall more than half the time, so "not significant" in example 79 was weak reassurance.
Correlation and regression
The next four examples share one small, illustrative data set: monthly advertising spend (in $1,000s) of 1, 2, 3, 4, 5 and sales (in $10,000s) of 3, 5, 4, 7, 8. Its building blocks are , , , and .
89. Correlation between advertising and sales
Scenario: Does sales move with advertising? Concept: Pearson correlation coefficient.
Interpretation: A strong positive linear association; it does not by itself show that advertising causes sales.
90. Fitting a regression line
Scenario: Same data; predict sales at a spend of 6. Concept: Least-squares line, , .
Interpretation: Each extra $1,000 is associated with $12,000 more sales, but is outside the data, so this is a cautious extrapolation.
91. How much does the line explain?
Scenario: Same data. Concept: Coefficient of determination.
Interpretation: About 84% of the month-to-month variation in sales is accounted for by the linear relationship with spend.
92. Residuals and typical prediction error
Scenario: Same data. Concept: Residuals and the standard error of the estimate.
Predicted values are 3.0, 4.2, 5.4, 6.6, 7.8, so the residuals are 0, 0.8, −1.4, 0.4, 0.2:
Interpretation: Predictions are typically off by about 1 unit ($10,000); month 3 is the worst fit.
93. Interpreting a slope in house prices
Scenario: Suppose a regression of price on floor area gives a slope of $150 per square foot. Two otherwise similar houses differ by 200 square feet. Concept: Slope as a rate of change.
Interpretation: The model predicts a $30,000 price difference, holding the model's other inputs fixed; it is a prediction, not an appraisal.
94. Ice cream and swimming accidents
Scenario: Suppose ice cream sales () and swimming accidents () correlate at 0.6, while each correlates with temperature () at 0.8 and 0.75. Concept: Partial correlation controls for a confounder.
Interpretation: In this constructed example, the whole association is explained by hot weather. Correlation is not causation.
95. Regression to the mean in performance reviews
Scenario: Suppose scores on two quarterly reviews correlate at , and an employee scored 2 SDs above average last quarter. Concept: Regression to the mean, .
Interpretation: The best prediction is still above average but closer to the mean, with no change in ability required; praise or criticism given in between can easily be mistaken for the cause.
Paradoxes and pitfalls
96. Berkeley admissions and Simpson's paradox
Scenario: In 1973, graduate admissions at the University of California, Berkeley appeared to favor men. The data below are the six largest departments, as published with Bickel, Hammel and O'Connell (1975) and distributed as R's UCBAdmissions data set. Concept: Simpson's paradox, where a trend in every group reverses or disappears when groups are combined.
Combined over the six departments:
By department:
| Department | Men applied | Men admitted | Women applied | Women admitted |
|---|---|---|---|---|
| A | 825 | 62.1% | 108 | 82.4% |
| B | 560 | 63.0% | 25 | 68.0% |
| C | 325 | 36.9% | 593 | 34.1% |
| D | 417 | 33.1% | 375 | 34.9% |
| E | 191 | 27.7% | 393 | 23.9% |
| F | 373 | 5.9% | 341 | 7.0% |
Women had the higher admission rate in four of the six departments. Most women applied to departments C–F, which admitted few applicants of either sex, while most men applied to A and B, which admitted most applicants.
Interpretation: The aggregate gap reflects where people applied, which matches the original authors' conclusion that the data did not show department-level bias against women. Always ask whether a lurking grouping variable explains a combined trend.
97. The gambler's fallacy
Scenario: A fair coin has landed heads five times in a row. What is the chance the next flip is heads? Concept: Independence.
Interpretation: A streak is unlikely in advance, but once five heads have happened, the coin has no memory.
98. Benford's law for leading digits
Scenario: An analyst checks whether the first digits of thousands of invoice amounts look natural. Concept: Benford's law, , which applies to many data sets spanning several orders of magnitude.
Interpretation: Under Benford's law, about 30% of amounts would start with 1 and under 5% with 9. A large deviation is a reason to look closer, not proof of fraud, since many legitimate data sets do not follow the law.
99. The class-size paradox
Scenario: A school has two classes, one with 10 students and one with 90. Concept: The inspection paradox: averages depend on who is asked.
Interpretation: The school can truthfully report 50 while the typical student sits in a class of 90. The same effect can make buses or gyms feel more crowded than their reported averages.
100. Small hospitals and extreme days
Scenario: One hospital has about 15 births a day, another about 45. Which records more days on which over 60% of babies are boys? Assume each birth is a boy with probability 0.5. Concept: Small samples vary more (the binomial spread shrinks with ).
"Over 60%" means at least 10 of 15, or at least 28 of 45:
Interpretation: The small hospital sees such days more than twice as often. Extreme rates, good or bad, cluster in small groups, so rank small schools, towns or stores with care.
Common mistakes
These are the errors that show up again and again when the examples above are applied to real data:
- Ignoring the base rate. Examples 13, 16 and 22 show that an accurate test for a rare event still produces mostly false alarms. Always ask how common the thing is before interpreting a positive.
- Reversing a conditional probability. and answer different questions (examples 17 and 23).
- Assuming independence that is not there. Redundant systems (example 8) and repeated tests (example 14) only behave as calculated if their failures are unrelated.
- Adding standard deviations. Variances of independent quantities add; standard deviations do not (examples 44 and 52).
- Using the mean for skewed data. For incomes, house prices and wait times, report the median as well (example 58).
- Misreading a confidence interval. The 95% describes how often the method succeeds over repeated samples, not the probability that one computed interval is correct (NIST section 1.3.5.2).
- Treating p < 0.05 as a verdict. A p-value is not the probability that the null hypothesis is true, and it says nothing about effect size (Wasserstein & Lazar, 2016). "Not significant" can simply mean low power (example 88).
- Testing many things and reporting the winner. Multiple comparisons inflate false positives quickly (example 86). Decide the main metric and sample size before an A/B test starts (example 87).
- Equating correlation with causation. A lurking variable can create or erase an association (examples 94 and 96).
- Expecting streaks to correct themselves. Independent events have no memory (examples 57 and 97).
- Over-reading small samples. The most extreme results usually come from the smallest groups (example 100).
Next steps
To keep practicing, pair these examples with the other guides in this series:
- Math formulas every student should know, a reference for the formulas used above.
- Math tricks to solve problems faster, for quicker mental arithmetic on percentages and fractions.
- Algebra problems with solutions for beginners, if rearranging formulas such as the sample-size equations felt shaky.
- Linear algebra concepts for machine learning, the natural next step after regression.
You can also browse more mathematics writing in the Mathematics category.
References
- Illowsky, B., & Dean, S. (2023). Introductory Statistics 2e. OpenStax. https://openstax.org/details/books/introductory-statistics-2e. Sections used: 4.3 Binomial Distribution, 6.1 The Standard Normal Distribution, 7.1 The Central Limit Theorem for Sample Means.
- NIST/SEMATECH. e-Handbook of Statistical Methods (last updated 2022). National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/ (doi:10.18434/M32189). Sections used: 1.3.5.2 Confidence Limits for the Mean, 1.3.5.3 Two-Sample t-Test for Equal Means, 1.3.6.6.1 Normal Distribution, 6.1.6 What is Process Capability?.
- Bickel, P. J., Hammel, E. A., & O'Connell, J. W. (1975). Sex bias in graduate admissions: Data from Berkeley. Science, 187(4175), 398–404. https://doi.org/10.1126/science.187.4175.398.
- R Core Team. UCBAdmissions: Student Admissions at UC Berkeley (R datasets package documentation). https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/UCBAdmissions.html.
- Wasserstein, R. L., & Lazar, N. A. (2016). The ASA's statement on p-values: Context, process, and purpose. The American Statistician, 70(2), 129–133. https://doi.org/10.1080/00031305.2016.1154108.