Skip to content

7.P — Worked Problems: Probability & Statistics

Fourteen problems, from counting through Bayes to a full hypothesis test. Every formula used is derived in the chapter that introduces it.

Problem 1 — Counting with a restriction

A committee of 5 is chosen from 7 women and 6 men. How many committees are possible if (a) there are no restrictions, (b) exactly 3 women, (c) at least 3 women?

Solution

(a) No restrictions. Choose 5 from 13, order irrelevant:

\binom{13}{5} = \frac{13!}{5!\,8!} = \frac{13\times12\times11\times10\times9}{5\times4\times3\times2\times1}

Top: 13\times12 = 156, \times11 = 1716, \times10 = 17160, \times9 = 154440. Bottom: 120.

= \frac{154440}{120} = 1287

(b) Exactly 3 women. Then there must be exactly 2 men. Choose each group separately and multiply, by the multiplication principle:

\binom73\times\binom62 = 35\times15 = 525

\binom73 = \frac{7\times6\times5}{6} = 35 and \binom62 = \frac{6\times5}{2} = 15.

(c) At least 3 women means 3, 4 or 5 women. Compute each and add, since the cases cannot overlap:

  • 3 women, 2 men: \binom73\binom62 = 35\times15 = 525
  • 4 women, 1 man: \binom74\binom61 = 35\times6 = 210
  • 5 women, 0 men: \binom75\binom60 = 21\times1 = 21

525+210+21 = 756

Answers: 1287, 525, 756.

Check by the complement, which is the faster route and a genuine verification. "At least 3 women" is the opposite of "at most 2 women":

  • 0 women: \binom70\binom65 = 1\times6 = 6
  • 1 woman: \binom71\binom64 = 7\times15 = 105
  • 2 women: \binom72\binom63 = 21\times20 = 420

Total 531, and 1287 - 531 = 756

What to notice. Whenever "at least" or "at most" appears, count both ways and pick the shorter. Here they were the same length; with "at least 1" the complement is a single term and the direct route is five.

Problem 2 — The birthday problem

In a group of 23 people, what is the probability that two share a birthday? Ignore leap years and assume birthdays are spread evenly.

Solution

Step 1 — attack the complement. "At least two share" has far too many cases. "Nobody shares" has exactly one, so compute that and subtract.

Step 2 — build the no-match probability one person at a time.

  • Person 1 can have any birthday: \frac{365}{365}
  • Person 2 must avoid person 1's: \frac{364}{365}
  • Person 3 must avoid both: \frac{363}{365}
  • Person 23 must avoid 22 dates: \frac{343}{365}

P(\text{no match}) = \frac{365}{365}\times\frac{364}{365}\times\cdots\times\frac{343}{365} = \frac{365!}{342!\;365^{23}}

Step 3 — evaluate. Taking logarithms keeps it manageable:

\ln P = \sum_{k=1}^{22}\ln\left(1-\frac{k}{365}\right)

Since each \frac{k}{365} is small, use \ln(1-x)\approx -x:

\ln P \approx -\frac{1}{365}\sum_{k=1}^{22}k = -\frac{1}{365}\cdot\frac{22\times23}{2} = -\frac{253}{365} = -0.6932

P(\text{no match}) \approx e^{-0.6932} = 0.4999

The exact value is 0.4927.

Step 4 — subtract.

P(\text{at least one match}) = 1 - 0.4927 = 0.507

Answer: about 50.7% — slightly better than an even chance.

Why the answer feels wrong. People instinctively compare 23 against 365 and expect something tiny. But the question is not about your birthday; it is about any pair, and 23 people form \binom{23}{2} = 253 pairs. Each pair has a \frac{1}{365} chance of matching, and \frac{253}{365} = 0.693 expected matches. The count of pairs grows like n^2, not like n, and that is the whole illusion.

The practical version. For a 50% chance you need 23 people; for 99% you need 57. And this is why cryptographers worry about "birthday attacks": finding two inputs with the same hash takes only about \sqrt{N} attempts, not N.

Problem 3 — Bayes with a medical test

A disease affects 1 in 1,000 people. A test is 99% sensitive (it catches 99% of those who have it) and 95% specific (it correctly clears 95% of those who do not). You test positive. What is the probability you have the disease?

Solution

Step 1 — name the events. Let D = has the disease, + = tests positive.

P(D) = 0.001, \quad P(+|D) = 0.99, \quad P(+|D') = 1 - 0.95 = 0.05

Step 2 — the fastest route is to imagine 100,000 people, because whole numbers are harder to misread than decimals.

  • With the disease: 100 people. Of these, 99 test positive.
  • Without: 99{,}900 people. Of these, 5\% — that is 4{,}995 — test positive anyway.

Step 3 — count the positives.

\text{total positives} = 99 + 4995 = 5094

Step 4 — of those, how many actually have it?

P(D|+) = \frac{99}{5094} = 0.0194

Answer: about 1.9%. A positive result on this test still means you almost certainly do not have the disease.

Step 5 — the same thing through the formula, to see that the arithmetic matches:

P(D|+) = \frac{P(+|D)P(D)}{P(+|D)P(D)+P(+|D')P(D')} = \frac{(0.99)(0.001)}{(0.99)(0.001)+(0.05)(0.999)}

= \frac{0.00099}{0.00099+0.04995} = \frac{0.00099}{0.05094} = 0.0194 \; ✓

Why the answer is so far from 99%. The false positives outnumber the true positives fifty to one, simply because there are a thousand times more healthy people to draw them from. The base rate dominates. Improving the test's sensitivity from 99% to 100% would change the answer from 1.94% to 1.96% — almost nothing. Improving specificity from 95% to 99.5% would change it to 16.5% — a nine-fold improvement. When a condition is rare, the false-positive rate is the number that matters, and that is why screening programmes are targeted at high-risk groups rather than everyone: raising the base rate is the most powerful lever available.

Step 6 — what a second, independent test does. After the first positive your probability is 1.94%, and that becomes the new base rate. Testing again:

P(D|++) = \frac{(0.99)(0.0194)}{(0.99)(0.0194)+(0.05)(0.9806)} = \frac{0.01921}{0.01921+0.04903} = 0.281

28%. This is exactly why a positive screening result is followed by a confirmatory test rather than a diagnosis.

Problem 4 — Binomial, worked in full

A factory's parts are 3% defective. In a box of 20, find the probability of (a) no defects, (b) exactly one, (c) more than two.

Solution

Here n=20 and p = 0.03.

(a) No defects, k=0.

P(0) = \binom{20}{0}(0.03)^0(0.97)^{20} = 1\times1\times0.97^{20}

Compute 0.97^{20} using logarithms: 20\ln(0.97) = 20(-0.0304592) = -0.609184, so 0.97^{20} = e^{-0.609184} = 0.54379.

P(0) = 0.5438

(b) Exactly one, k=1.

P(1) = \binom{20}{1}(0.03)^1(0.97)^{19} = 20\times0.03\times0.56061

Here 0.97^{19} = \frac{0.54379}{0.97} = 0.56061.

= 0.6\times0.56061 = 0.33637

(c) More than two means 3 or more, so use the complement:

P(X>2) = 1 - P(0)-P(1)-P(2)

P(2) = \binom{20}{2}(0.03)^2(0.97)^{18} = 190\times0.0009\times0.57795 = 0.09883

with 0.97^{18} = \frac{0.56061}{0.97} = 0.57795 and \binom{20}{2} = \frac{20\times19}{2} = 190.

P(X>2) = 1 - 0.54379-0.33637-0.09883 = 0.02101

Answers: 0.544, 0.336, 0.021.

Check the mean. E[X] = np = 20\times0.03 = 0.6 defects per box, so most boxes should have none or one — and indeed those two cases together account for 88% of boxes ✓

A useful cross-check with Poisson. With n large and p small, the Poisson approximation with \lambda = np = 0.6 should be close:

P(0) = e^{-0.6} = 0.5488, \qquad P(1) = 0.6e^{-0.6} = 0.3293

Both within 1% of the exact binomial answers ✓ — and the Poisson version needs no factorials of 20.

Problem 5 — Expected value and a decision

A game costs £2 to play. You roll a fair die: a 6 pays £10, a 4 or 5 pays £3, anything else pays nothing. Should you play?

Solution

Step 1 — list the outcomes and their probabilities.

RollProbabilityPayoutNet profit
6\frac16£10+£8
4 or 5\frac26£3+£1
1, 2, 3\frac36£0-£2

Step 2 — compute the expected profit, each value weighted by its probability:

E = \frac16(8)+\frac26(1)+\frac36(-2) = \frac{8}{6}+\frac{2}{6}-\frac{6}{6} = \frac{4}{6} = £0.667

Answer: yes — the game returns an average profit of 67p per play.

Step 3 — but check the risk as well as the average. Compute the variance:

E[\text{profit}^2] = \frac16(64)+\frac26(1)+\frac36(4) = \frac{64+2+12}{6} = \frac{78}{6} = 13

\operatorname{Var} = 13 - (0.667)^2 = 13-0.444 = 12.56 \quad \Rightarrow \quad \sigma = £3.54

The standard deviation is more than five times the expected profit. A single play is close to a coin flip; the edge only shows up over many plays.

Step 4 — how many plays before the edge is reliable? By the central limit theorem, the average profit over n plays has standard error \frac{3.54}{\sqrt n}. For the expected profit of £0.667 to be two standard errors above zero:

0.667 > 2\times\frac{3.54}{\sqrt n} \quad \Rightarrow \quad \sqrt n > 10.6 \quad \Rightarrow \quad n > 113

After about 113 plays you would be fairly confident of being ahead; after 10 you would have no idea. That gap between a positive expectation and a reliable profit is the whole business model of a casino, run in the other direction.

Problem 6 — Poisson

A website gets an average of 3 orders per hour. Find the probability of (a) exactly 5 orders in an hour, (b) no orders in 20 minutes, (c) more than 8 in two hours.

Solution

(a) Five in an hour, with \lambda = 3:

P(5) = \frac{3^5e^{-3}}{5!} = \frac{243\times0.049787}{120} = \frac{12.0983}{120} = 0.1008

(b) None in 20 minutes. The rate must be rescaled to the interval: 20 minutes is one third of an hour, so \lambda = 1.

P(0) = \frac{1^0e^{-1}}{0!} = e^{-1} = 0.3679

Rescaling \lambda with the interval is the step people forget. The parameter is a count, not a rate, so it must match the window you are asking about.

(c) More than 8 in two hours, so \lambda = 6. Use the complement:

P(X>8) = 1 - \sum_{k=0}^{8}\frac{6^ke^{-6}}{k!}

Compute each term, with e^{-6} = 0.00247875:

k\frac{6^k}{k!}term
010.002479
160.014873
2180.044618
3360.089235
4540.133853
564.80.160623
664.80.160623
755.5430.137677
841.6570.103258

The running total is 0.847240.

P(X>8) = 1 - 0.84724 = 0.1528

Answers: 0.101, 0.368, 0.153.

Notice the tie at k=5 and k=6. Both have probability 0.1606, because \frac{6^6}{6!} = \frac{6^5\times6}{5!\times6} = \frac{6^5}{5!}. For a Poisson with an integer mean \lambda, the values \lambda-1 and \lambda are always exactly equally likely — a small pattern that makes a good check on the arithmetic.

Problem 7 — The normal distribution

Adult male height is normally distributed with mean 175 cm and standard deviation 7 cm. Find the proportion (a) taller than 185 cm, (b) between 170 and 180 cm, (c) the height exceeded by only 5%.

Solution

(a) Taller than 185. Standardise:

z = \frac{185-175}{7} = \frac{10}{7} = 1.4286

From the standard normal table, P(Z<1.43) = 0.9236, so

P(Z>1.4286) = 1 - 0.9236 = 0.0764

About 7.6%.

(b) Between 170 and 180. Standardise each end:

z_1 = \frac{170-175}{7} = -0.7143, \qquad z_2 = \frac{180-175}{7} = +0.7143

By symmetry, the area between -z and +z is 2\Phi(z)-1. With \Phi(0.7143) = 0.7625:

P = 2(0.7625)-1 = 0.5250

About 52.5% — just over half of men are within 5 cm of the average.

(c) The 95th percentile. Work backwards: find z with P(Z<z) = 0.95, which is the standard value z = 1.645. Then unstandardise:

x = \mu + z\sigma = 175 + 1.645(7) = 175 + 11.5 = 186.5 \text{ cm}

Answers: 7.6%, 52.5%, 186.5 cm.

Sanity check against the 68–95–99.7 rule. One standard deviation is 168 to 182 cm and should hold 68% — our part (b) covered a narrower range, 170 to 180, and got 52.5%, which is sensibly less ✓ Two standard deviations is 161 to 189, holding 95%, so 5% lie outside and half of those, 2.5%, are above 189 cm. Our 95th percentile at 186.5 sits just below that ✓

Problem 8 — Confidence interval

A sample of 40 batteries has a mean life of 820 hours with a sample standard deviation of 90 hours. Build a 95% confidence interval for the true mean, and say how large a sample would halve its width.

Solution

Step 1 — the standard error.

\text{SE} = \frac{s}{\sqrt n} = \frac{90}{\sqrt{40}} = \frac{90}{6.3246} = 14.230

Step 2 — the multiplier. With \sigma estimated from the data, use the t distribution with n-1 = 39 degrees of freedom. For 95% that is t^* = 2.023 — slightly more than the 1.96 you would use if \sigma were known, and the extra allows for the fact that s is itself uncertain.

Step 3 — the margin of error.

2.023\times14.230 = 28.79

Step 4 — the interval.

820\pm28.8 = (791.2,\ 848.8)

Answer: we are 95% confident the true mean life is between 791 and 849 hours.

Step 5 — halving the width. The margin is proportional to \frac{1}{\sqrt n}, so halving it needs

\frac{1}{\sqrt{n_{\text{new}}}} = \frac12\cdot\frac{1}{\sqrt{40}} \quad \Rightarrow \quad \sqrt{n_{\text{new}}} = 2\sqrt{40} \quad \Rightarrow \quad n_{\text{new}} = 4\times40 = 160

You would need 160 batteries — four times as many, for twice the precision.

What the interval does and does not say. It says the method captures the truth 95% of the time. It says nothing about individual batteries: about 95% of individual batteries lie in 820 \pm 2(90) = (640, 1000), an interval six times wider. Confusing the interval for the mean with the range of the data is the commonest misreading of a statistical result, and it turns "the average car does 50 mpg, give or take 1" into a false promise about any particular car.

Problem 9 — A hypothesis test, start to finish

A machine should fill bottles to 500 ml. A sample of 25 bottles averages 496 ml with a sample standard deviation of 8 ml. Is the machine off target, at the 5% level?

Solution

Step 1 — state the hypotheses before looking at anything else.

H_0: \mu = 500 \qquad H_1: \mu \ne 500

Two-sided, because either overfilling or underfilling would be a problem worth acting on. Deciding this after seeing the data is a way of doubling your false-positive rate without noticing.

Step 2 — choose the test. The population standard deviation is unknown and estimated from the sample, so use a t test with n-1 = 24 degrees of freedom.

Step 3 — compute the standard error.

\text{SE} = \frac{s}{\sqrt n} = \frac{8}{5} = 1.6

Step 4 — compute the test statistic.

t = \frac{\bar x - \mu_0}{\text{SE}} = \frac{496-500}{1.6} = \frac{-4}{1.6} = -2.5

Read this number. The sample mean is two and a half standard errors below the target. That is the entire content of the test — everything after it is deciding whether two and a half is a lot.

Step 5 — find the critical value. For a two-sided test at \alpha = 0.05 with 24 degrees of freedom, t^* = 2.064.

Step 6 — decide.

|{-2.5}| = 2.5 > 2.064

Reject H_0.

Step 7 — the p-value. For t = -2.5 with 24 df, the one-tailed area is 0.0098, so doubling it for the two-sided test gives

p = 0.0196

Answer: yes, there is significant evidence the machine is off target (t = -2.5, p = 0.020). It appears to be underfilling.

Step 8 — the part the test does not tell you, and which matters more. The confidence interval for the true mean is

496 \pm 2.064(1.6) = (492.7,\ 499.3)

So the shortfall is somewhere between 0.7 and 7.3 ml — that is, between 0.14% and 1.5% of the bottle. Statistically significant, but is it important? If the label allows a 2% tolerance, this machine is legal and the finding is real but harmless. If it is a pharmaceutical dose, 1.5% may be serious.

A p-value answers "is there an effect". Only the size of the effect answers "does it matter", and only a human can answer "what should we do". Reporting the interval alongside the test is what keeps those three questions apart.

Problem 10 — Chi-squared for categories

A die is rolled 120 times with these results: 15, 22, 18, 25, 17, 23. Is it fair, at the 5% level?

Solution

Step 1 — the hypotheses.

H_0: \text{all faces equally likely} \qquad H_1: \text{they are not}

Step 2 — the expected counts. If fair, each face should appear \frac{120}{6} = 20 times.

Step 3 — compute the statistic \chi^2 = \sum\frac{(O-E)^2}{E}.

FaceOEO-E(O-E)^2\frac{(O-E)^2}{E}
11520-5251.25
22220240.20
31820-240.20
425205251.25
51720-390.45
62320390.45

\chi^2 = 1.25+0.20+0.20+1.25+0.45+0.45 = 3.80

Step 4 — degrees of freedom. Six categories, but the total is fixed at 120, so once five counts are known the sixth is determined:

\text{df} = 6-1 = 5

Step 5 — the critical value. For 5 df at \alpha = 0.05, \chi^2_{\text{crit}} = 11.07.

Step 6 — decide.

3.80 < 11.07 \quad \Rightarrow \quad \textbf{do not reject } H_0

Answer: no evidence the die is unfair (\chi^2 = 3.80, df = 5, p \approx 0.58).

Why the dividing by E matters. A discrepancy of 5 out of an expected 20 is substantial; the same discrepancy of 5 out of an expected 5,000 is nothing. Dividing by E measures each gap relative to how big it should have been, which is what makes the statistic comparable across categories of different sizes.

What "do not reject" means, exactly. Not "the die is fair". It means the data are consistent with fairness. A genuinely biased die could easily produce this sample; with only 120 rolls the test has little power to detect a small bias. To catch a face that comes up 18% of the time instead of 16.7% you would need thousands of rolls.

Problem 11 — Regression by hand

Fit a least-squares line to the data below, and compute r and R^2.

x12345
y24546
Solution

Step 1 — the means.

\bar x = \frac{1+2+3+4+5}{5} = 3, \qquad \bar y = \frac{2+4+5+4+6}{5} = \frac{21}{5} = 4.2

Step 2 — build the deviation table.

xyx-\bar xy-\bar yproduct(x-\bar x)^2(y-\bar y)^2
12-2-2.24.444.84
24-1-0.20.210.04
3500.8000.64
441-0.2-0.210.04
5621.83.643.24
sums8.0108.80

Step 3 — the gradient.

b_1 = \frac{\sum(x-\bar x)(y-\bar y)}{\sum(x-\bar x)^2} = \frac{8.0}{10} = 0.8

Step 4 — the intercept.

b_0 = \bar y - b_1\bar x = 4.2 - 0.8(3) = 4.2-2.4 = 1.8

\hat y = 1.8+0.8x

Step 5 — the correlation.

r = \frac{8.0}{\sqrt{10\times8.80}} = \frac{8.0}{\sqrt{88}} = \frac{8.0}{9.3808} = 0.8528

Step 6 — R^2. For a simple straight-line fit it is just r^2:

R^2 = 0.8528^2 = 0.7273

Answers: \hat y = 1.8+0.8x, r = 0.853, R^2 = 0.727.

Step 7 — verify R^2 the long way, from the residuals, since the two definitions must agree:

xy\hat yresidualsquared
122.6-0.60.36
243.40.60.36
354.20.80.64
445.0-1.01.00
565.80.20.04

The residuals sum to zero ✓ (as they always must when the model has an intercept), and their squares total 2.40.

R^2 = 1 - \frac{2.40}{8.80} = 1-0.2727 = 0.7273 \; ✓

Reading the result. The line explains 73% of the variation in y; the remaining 27% is scatter the straight line does not account for. With only five points, be careful: r = 0.85 from five points is not strong evidence of anything, and the same correlation from five hundred points would be.

Problem 12 — Independence, tested properly

Two events have P(A) = 0.4, P(B) = 0.5 and P(A\cup B) = 0.7. Are they independent? Find P(A|B) and P(B|A).

Solution

Step 1 — find the intersection from the addition rule:

P(A\cup B) = P(A)+P(B)-P(A\cap B)

0.7 = 0.4+0.5 - P(A\cap B) \quad \Rightarrow \quad P(A\cap B) = 0.9-0.7 = 0.2

Step 2 — apply the independence test. They are independent exactly when P(A\cap B) = P(A)P(B):

P(A)P(B) = 0.4\times0.5 = 0.2

And the actual intersection is 0.2. They are independent.

Step 3 — the conditionals.

P(A|B) = \frac{P(A\cap B)}{P(B)} = \frac{0.2}{0.5} = 0.4 = P(A) \; ✓

P(B|A) = \frac{0.2}{0.4} = 0.5 = P(B) \; ✓

Answers: independent; P(A|B) = 0.4 and P(B|A) = 0.5.

What independence actually means, and what it does not. Knowing B happened leaves the chance of A exactly where it was. That is different from the events being mutually exclusive, which means they cannot both happen: there P(A\cap B) = 0, and learning B happened would tell you A definitely did not. Mutually exclusive events with non-zero probabilities are about as far from independent as it is possible to get, and swapping the two words is the most common error in the topic.

Problem 13 — The central limit theorem in action

A single fair die has mean 3.5 and standard deviation 1.708. If you roll 50 dice and take the average, what is the probability that average exceeds 3.8?

Solution

Step 1 — recall what the CLT gives you. The distribution of one die roll is flat — six equal bars, nothing like a bell. But the average of 50 rolls is approximately normal, with

\text{mean} = \mu = 3.5, \qquad \text{SE} = \frac{\sigma}{\sqrt n} = \frac{1.708}{\sqrt{50}} = \frac{1.708}{7.0711} = 0.24157

Step 2 — standardise the value of interest.

z = \frac{3.8-3.5}{0.24157} = \frac{0.3}{0.24157} = 1.2419

Step 3 — look it up.

P(Z>1.2419) = 1 - 0.8929 = 0.1071

Answer: about 10.7%.

Step 4 — see the \sqrt n at work. Repeat with different sample sizes, asking the same question each time:

nSEz for 3.8P(\bar X>3.8)
100.5400.55628.9%
500.2421.24210.7%
2000.1212.4840.65%
10000.0545.5550.000001%

What this shows. With ten dice, averaging 3.8 is unremarkable. With a thousand, it is effectively impossible. The average does not become more accurate in proportion to n — it becomes more accurate in proportion to \sqrt n, so the fourfold jump from 50 to 200 dice only doubled the precision.

Where you have seen this. It is exactly why a national poll of 1,000 people has a margin of error near 3%, and why polling 4,000 people costs four times as much to halve that to 1.5%. It is also why casinos are certain of their profit over a year while being entirely uncertain about tonight.

Problem 14 — Everything at once

A drug company claims its treatment cures 70% of patients. In a trial of 100 patients, 62 are cured. (a) Is the claim credible? (b) Build a confidence interval for the true rate. (c) If the true rate really is 70%, what was the chance of seeing 62 or fewer?

Solution

(a) The hypothesis test.

H_0: p = 0.70 \qquad H_1: p < 0.70

One-sided this time, because the question is whether the company has overstated its result. State this before seeing the data.

The sample proportion is \hat p = 0.62. Under H_0 the standard error uses the claimed proportion, not the observed one:

\text{SE} = \sqrt{\frac{p_0(1-p_0)}{n}} = \sqrt{\frac{0.7\times0.3}{100}} = \sqrt{0.0021} = 0.04583

z = \frac{0.62-0.70}{0.04583} = \frac{-0.08}{0.04583} = -1.746

For a one-sided test at 5%, the critical value is -1.645. Since -1.746 < -1.645, reject H_0. The p-value is P(Z<-1.746) = 0.0404.

(b) The confidence interval uses the observed proportion, since here we are estimating rather than testing:

\text{SE} = \sqrt{\frac{\hat p(1-\hat p)}{n}} = \sqrt{\frac{0.62\times0.38}{100}} = \sqrt{0.002356} = 0.04854

0.62 \pm 1.96(0.04854) = 0.62\pm0.0951 = (0.525,\ 0.715)

Notice the tension between the two answers. The test rejected 70%, yet the interval contains 0.715 and therefore nearly contains 0.70. There is no contradiction: the test is one-sided while the interval is two-sided, and they use slightly different standard errors. It is a warning against treating p<0.05 as a bright line. The honest summary is the data are mildly inconsistent with the 70% claim, and the true rate is somewhere between about 53% and 72%.

(c) The exact binomial probability. With n=100 and p = 0.7, we want P(X\le62). Using the normal approximation with a continuity correction — adding 0.5 because a continuous curve is standing in for whole-number counts:

\mu = np = 70, \qquad \sigma = \sqrt{np(1-p)} = \sqrt{21} = 4.583

z = \frac{62.5-70}{4.583} = -1.637 \quad \Rightarrow \quad P = 0.0508

The exact binomial value is 0.0517, so the approximation with correction is accurate to within 0.001.

Answers: (a) reject the claim at 5%, p = 0.040; (b) the true rate is between 52.5% and 71.5% with 95% confidence; (c) about 5.2%.

The thing worth taking away. Every number here is defensible, and they point in slightly different directions. A trial of 100 patients simply cannot distinguish a 62% cure rate from a 70% one with any confidence — the sample is too small for the question. The right response is not a cleverer test but more patients, and knowing which of those two you need is most of what applied statistics is for.

Next: Part 8 — Discrete Mathematics, where the counting of §1 grows into a subject of its own and proof becomes the main tool.