A short section that does one job: it says which probability distribution each of the three one-sample tests uses, and what has to be true for that choice to be legitimate. A test of a mean when the population standard deviation is known uses a normal distribution; a test of a mean when it is unknown and estimated by the sample standard deviation uses a Student t; and a test of a proportion uses a normal distribution built on the binomial. The three rows are chapter 8's three confidence intervals in the same order and for the same reasons. What the section adds is an explicit statement of the assumptions behind each: a simple random sample in every case, approximate normality of the population for the two mean tests, and for a proportion the binomial conditions together with the requirement that n times p and n times q both exceed five, so that the binomial is close enough in shape to the normal for the approximation to hold.
Subject: Statistics · 67 slides · symbolic lesson
Open the interactive version of this deck
Title
Statistics · Chapter 9 — Hypothesis Testing with One Sample
Three tests, three curves, and the conditions that make each one honest
Objectives
Sections 9.1 and 9.2 set up a test: a null hypothesis, an alternative, and the two ways a decision can go wrong. Before any decision can be made you need a curve to measure the sample against. This short section says which curve, and when you are allowed to trust it.
The arithmetic in this lesson is light: a square root, a division, a product. The skill is reading a problem and picking the right row, and that is where marks are lost. Every worked example below is a problem from the book's own exercise set, worked from the description to the curve.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467 — the section this deck covers
Warm-up
Chapter 8 built three confidence intervals, each around a different curve. A hypothesis test reuses the same three curves, for the same reasons, so recall them first.
Discussion prompt
For each of chapter 8's three confidence intervals, name the curve used for the margin of error and say what decided it: a mean with the population standard deviation known, a mean with only the sample standard deviation, and a proportion.
Keep those three lines in view. The test version of each row has the same curve. Only one thing will change: in a test you assume the null hypothesis is true, so the centre of the curve, and for a proportion its spread too, come from the null value rather than from the sample.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §8.1-8.3 — the three confidence intervals
Section
Part 1
Concept
Every hypothesis test asks one question: if the null hypothesis were true, how unusual would a sample like mine be? To answer it you need the distribution of the sample statistic under the null, a curve of all the values the statistic could take.
Take the book's Exercise 76. Newspaper prices have a standard deviation of 20 cents, and someone claims the mean price is a dollar. Twelve papers average 95 cents. If the claim is true, the sample mean of twelve papers follows this curve:
\[ \bar{X} \sim N\left(100,\ \frac{20}{\sqrt{12}}\right) = N(100,\ 5.77) \]
Figure (svg): A normal curve of sample mean newspaper prices centred at 100 cents with standard error 5.77 cents, drawn from 80 to 120. A dot on the axis marks the observed sample mean, 95 cents. The two tails beyond 95 and beyond 105 are shaded yellow.
Read the figure as a ruler. Its centre is the claimed mean, its spread is the standard error, and the pink dot is what actually happened. The yellow tails are the samples at least as far from 100 as 95 is. Whether that area is small enough to doubt the claim is Section 9.4's business.
This section answers the earlier question: which curve? Get it wrong and every number after it, the test statistic, the p-value, the decision, is measured against the wrong ruler.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466; Exercise 76, p. 494 — the newspaper prices
Concept
The section's whole content is one table, Table 9.3. Each row names the parameter the hypotheses are about, the sample statistic that estimates it, and the curve the test uses.
| type of test | parameter | point estimate | distribution used |
|---|---|---|---|
| mean, σ known | population mean μ | sample mean x̄ | normal: X̄ ~ N(μ, σ/√n) |
| mean, σ unknown, x̄ approximately normal | population mean μ | sample mean x̄ | Student's t, df = n − 1 |
| proportion | population proportion p | sample proportion p′ | normal: P′ ~ N(p, √(pq/n)) |
Look down the parameter column: only μ and p appear. The hypotheses of Section 9.1 are always about a population parameter, and the data only ever supply the statistic in the next column. The test's job is to connect the two.
Figure (svg): Three panels side by side. Left: a normal curve of sample means centred at 25 with standard error 0.48, labelled sigma known. Middle: a t curve with 19 degrees of freedom on a t-score axis from minus 4 to 4, labelled sigma estimated. Right: a normal curve of sample proportions centred at 0.42 with standard error 0.049, labelled a proportion.
Two rows use a normal, for different reasons. In the first, σ is known, so nothing about the spread is uncertain. In the third, the spread of a proportion is fixed by p itself, and the null hypothesis hands you p. Only the middle row has to estimate its spread from the sample, and that is the row with the t.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466 — Table 9.3
Notation
Each row is a sampling distribution from chapter 7, now centred on the value the null hypothesis claims. Hover over each piece of the two mean rows before moving on.
Annotate
On: \( \bar{X} \sim N\left(\mu_0,\ \frac{\sigma}{\sqrt{n}}\right) \qquad t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, \ df = n-1 \)
The book writes the first row as X-bar following a normal with mean μ and standard deviation σ over root n, without a subscript zero. In a test that μ is always the null value, and writing the zero reminds you where the centre comes from: the claim, not the data.
The second row is written as a statistic rather than a curve for X-bar, because a t curve lives on a standardised axis. You turn the sample mean into a t-score, then read areas off the t with n minus 1 degrees of freedom.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466 — Table 9.3, rows one and two
Notation
The third row looks like the first, a normal with a centre and a spread, but both numbers come from the null hypothesis's p. That is the detail that most often goes wrong.
Annotate
On: \( P' \sim N\left(p_0,\ \sqrt{\frac{p_0 q_0}{n}}\right), \qquad q_0 = 1 - p_0 \)
The book prints this on page 467 as a normal with mean p and standard deviation the square root of pq over n. Read carefully: those describe the sample proportion P-prime, not the count of successes, and the p is the null value. The count would have mean np and standard deviation the square root of npq.
Compare chapter 8's interval for a proportion, which used p-prime in the square root. An interval has no claimed value to use, so it must lean on the sample. A test has one, and uses it.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467 — Table 9.3, row three, and the Assumptions
Concept
You never need to memorise the table as three separate facts. Two questions, asked in a fixed order, land you in the right row every time.
Figure (svg): A decision tree. The top box asks: is the parameter a mean or a proportion? The proportion branch leads to a box: normal, mean p0, standard deviation root of p0 q0 over n, if np and nq exceed 5. The mean branch leads to a second question: is the population standard deviation sigma known? Yes leads to normal with sigma over root n; no leads to Student's t with n minus 1 degrees of freedom, using s.
First: is the hypothesis about a mean or a proportion? Look at the null hypothesis. A claim about an average height, time or price is a mean; a claim about a percentage or a fraction of people is a proportion.
Second, for a mean only: is the population standard deviation known? Known means it comes from outside this sample, from long experience with the process or a reliable past study. A standard deviation computed from the sample you are testing is s, and s means a t.
Notice what is not on the tree: the sample size. A large sample does not turn a t into a normal, and a small one does not turn a proportion into a t. Sample size matters to the checks, which come in Parts 2 and 3, not to the choice of row.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466; Formula Review, p. 488 — the types of hypothesis tests
Sorting
These are the book's own §9.3 exercises, shortened. Ask the two questions in order: a mean or a proportion; and for a mean, is σ known from outside the sample?
Sort into buckets
Sort each test by the distribution it uses.
Exercise 23 is the one to slow down on. A large sample tempts you towards the normal, but nothing in the description gives a population standard deviation. The book's table puts it in the t row, and at large n the t and the normal nearly agree anyway, so naming the t costs you nothing.
Exercise 21 asks which two distributions the chapter uses. Every bucket above is one of two curves, the normal and Student's t; the proportion row borrows the normal.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 exercises 21-26, p. 489; Exercise 72, p. 493
Intuition
Why should replacing σ with s change the curve at all? Because s is a random number. In some samples it comes out too small, and dividing by a too-small standard error pushes the statistic further from zero than it deserves.
Here is that effect, simulated. Four thousand samples of five were drawn from a normal population; each sample mean was standardised using its own s instead of σ:
\[ \frac{\bar{x} - \mu}{s/\sqrt{5}} \]
Figure (svg): A histogram of 4000 simulated statistics, each a sample mean of five values minus mu, divided by s over root 5, in bins half a unit wide from minus 5 to 5. Over it, an orange standard normal curve and a cyan t curve with 4 degrees of freedom. The bars follow the cyan curve: their tails sit well above the orange curve beyond plus and minus 2. 510 of the 4000 values lie beyond 2 in size.
If dividing by s were as good as dividing by σ, the bars would follow the orange normal curve, and only about 4.6 percent would land beyond 2 in size. In fact 510 of 4000 did, 12.8 percent. The bars follow the cyan curve instead, which is Student's t distribution with 4 degrees of freedom.
That is the whole reason for the t: it is the correct curve for a statistic whose denominator was estimated. Its fatter tails are the price of not knowing σ, paid honestly.
No such price is due for a proportion. Under the null hypothesis the spread of p-prime is the square root of p-naught times q-naught over n, a fixed number, so the proportion row never needs a t.
Picture it
Student's t distribution is not one curve but a family, one for each number of degrees of freedom. Here three members are drawn against the standard normal, dashed.
Figure (svg): Four curves on one axis from minus 4 to 4: the standard normal in orange, and t curves with 2, 5 and 30 degrees of freedom in purple, blue and cyan. The t with 2 degrees of freedom is lowest at the centre and highest in the tails; the t with 30 is almost on top of the normal.
All of them are symmetric about zero and bell-shaped. With 2 degrees of freedom the peak is lower and the tails are much heavier; with 30 the curve is almost on top of the normal. More data means s is a steadier estimate of σ, so less correction is needed.
\[ t_{2}: \ P(T > 2) = 0.092, \qquad t_{30}: \ P(T > 2) = 0.027 \]
\[ z: \ P(Z > 2) = 0.023 \]
Read the line of tail areas. Beyond 2, the t with 2 degrees of freedom holds four times the normal's area; the t with 30 holds only a little more. This is why using a normal where a t belongs does the most harm in small samples, exactly where the evidence is thinnest.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466 — Student's t-distribution in Table 9.3
Concept
Table 9.3 writes the t row as t with df degrees of freedom and leaves the number to Section 8.2. For a one-sample test of a mean it is always one less than the sample size.
\[ df = n - 1 \]
The reason is in how s is built. It measures spread around the sample's own mean, and the deviations from that mean always add to zero:
\[ (x_1 - \bar{x}) + (x_2 - \bar{x}) + \cdots + (x_n - \bar{x}) = 0 \]
So once you know n minus 1 of the deviations, the last one is forced. Only n minus 1 of them are free to vary, and s carries only n minus 1 pieces of information about the spread. That count is what decides how unreliable s is, and so which t curve to use.
\[ n = 20 \to t_{19}, \qquad n = 22 \to t_{21}, \qquad n = 75 \to t_{74} \]
The off-by-one is a favourite multiple-choice trap: the book's Exercise 72 offers both t with 22 and t with 21 degrees of freedom for a sample of 22. The proportion row and the known-σ row have no degrees of freedom at all, since nothing about the spread is estimated.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466; Exercise 72, p. 493 — t with df in Table 9.3
Concept
All three curves share one feature that is easy to overlook: the centre is the value the null hypothesis claims, never the sample's value. That is what makes a test different from a confidence interval.
\[ \text{interval: centred at } \bar{x} \text{ or } p', \qquad \text{test: centred at } \mu_0 \text{ or } p_0 \]
A confidence interval asks where the parameter might be, so it starts from the data. A test asks whether the data are surprising if the claim were true, so it draws the world in which the claim is true and then looks at where the data fall.
For a mean, only the centre changes between the two procedures; the spread is still sigma or s over root n. For a proportion the null value goes into the spread too, as the square root of p-naught times q-naught over n, because a proportion's spread depends on the proportion itself.
Keep this in mind whenever a problem gives you both a claimed value and a sample value. The claim builds the curve; the sample is the dot you place on it.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466 — Table 9.3
Tweak it
Here is the t density with its degrees of freedom on a slider. The standard normal's peak height is 0.399; before you move anything, predict whether a t's peak is above or below that.
Parameter explorer
Slide the degrees of freedom from 1 to 40. Read the height of the curve at zero, and the height at 3. Which way does each move as the degrees of freedom grow, and what are they heading towards?
\[ f(t) \text{ for Student's } t, \quad \text{df} = {v} \]
What to notice: the peak climbs and the tails sink together, because the total area must stay one. Area moves out of the tails and into the middle as the degrees of freedom grow.
At 1 degree of freedom, which a sample of two would give, the peak is only 0.318, and a t-score of 3 is far from rare. That is a sample so small that its s is nearly useless, and the curve says so by spreading out.
Prediction
Two of the three tests use a normal and one uses Student's t. Commit to a reason before reading on.
Predict first
What makes the middle row, a mean with sigma unknown, the only one that needs a t?
Correct: It is the only row whose spread is estimated from the sample
Why: A t accounts for the extra randomness of an estimated standard deviation. Row one has sigma given, and row three's spread comes from the null value of p, so neither estimates its spread from the data. Sample size and the shape of the data do not decide the row.
The tempting wrong answer is the one about small samples. It is true that the t matters most for small samples, but a t test of 75 loan recipients is still a t test, and a proportion test of 40 people never becomes one. Size changes how much the choice matters, never which choice is right.
The one about a mean fails too: row one is also about a mean and uses a normal. Two rows share a parameter, two share a curve; only the estimated spread singles out the t.
Trap
Testing whether 60 percent of 64 past students feel enriched, a first attempt reasons that the sample is modest and writes:
\[ t = \frac{p' - p_0}{\sqrt{p_0 q_0/n}},\ df = 63 \]
Wrong. No t belongs in the proportion row.
A t corrects for a spread estimated from the data. Under the null hypothesis the proportion's spread is computed from p-naught, so there is nothing to correct.
\[ P' \sim N\left(0.6,\ \sqrt{\frac{0.6(0.4)}{64}}\right) \]
What a small sample threatens in a proportion test is the shape of the binomial, and the check for that is n times p-naught and n times q-naught, both above five. Here they are 38.4 and 25.6, so the normal is fine.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467; Exercise 80, p. 494
Worked example
A population mean is claimed to be 13. A sample of 20 has mean 12.8 and sample standard deviation 2. The underlying population is normal. Which distribution should the test use? Then place the sample on it.
The plan is the two questions, then the curve written out in full, then the sample's position on it. The book only asks for the distribution, but placing the sample is what the distribution is for, and it checks that you have the right spread.
Mean or proportion?
Why: the claim is about an average value.
\[ H_0: \mu = 13 \]
Is σ known?
Why: the 2 is computed from these 20 values, so it is s.
\[ s = 2, \quad \sigma \text{ unknown} \]
So the t row, with n − 1 degrees of freedom
Why: n is 20.
\[ \text{Student's } t, \quad df = 20 - 1 = 19 \]
The estimated standard error
Why: s over the square root of n.
\[ \frac{s}{\sqrt{n}} = \frac{2}{\sqrt{20}} = \frac{2}{4.4721} = 0.4472 \]
The t-score
Why: how many standard errors the sample mean sits from 13.
\[ t = \frac{12.8 - 13}{0.4472} = \frac{-0.2}{0.4472} = -0.447 \]
Look at the sign before the size. A negative t means the sample mean fell below the claim; its size, under one half, says the shortfall is small next to the ordinary wobble of means of 20 values.
Figure (svg): A t curve with 19 degrees of freedom from minus 4 to 4. The area to the left of t equals minus 0.447 is shaded yellow and labelled 0.33. A pink dot marks minus 0.447 on the axis.
In context: if the population mean were 13, a sample of 20 would average 12.8 or less about a third of the time. The sample sits less than half a standard error below the claim. The assumption that matters here is the normal population: with only 20 values, the t is trustworthy because the book tells you the population is normal.
Check by rebuilding the sample mean
Why: the claim plus t standard errors must give back 12.8.
\[ 13 + (-0.447)(0.4472) = 13 - 0.2 = 12.8 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 Exercise 24, p. 489
Worked example
A population has mean 25 and standard deviation 5. A sample of 108 has mean 24. Which distribution should the test use, and where does the sample land?
This time the description hands you a population standard deviation. That single fact moves you to the first row. The sample is also large, but notice that the size plays no part in the choice.
Mean or proportion?
Why: the claim is a mean.
\[ H_0: \mu = 25 \]
Is σ known?
Why: the 5 is a property of the population, given.
\[ \sigma = 5 \text{ known} \]
So the normal row
Why: centred at the claim, spread sigma over root n.
\[ \bar{X} \sim N\left(25,\ \frac{5}{\sqrt{108}}\right) \]
The standard error
Why: the square root of 108 is 10.392.
\[ \frac{5}{\sqrt{108}} = \frac{5}{10.392} = 0.4811 \]
The z-score
Why: how far 24 is from 25 in standard errors.
\[ z = \frac{24 - 25}{0.4811} = -2.078 \]
The tail area below 24
Why: the normal table or a calculator.
\[ P(\bar{X} < 24) = P(Z < -2.078) = 0.0188 \]
Compare this with Exercise 24 on the previous slide. The gap there was 0.2 and here it is 1, but what matters is each gap measured in its own standard errors: under a half there, about two here.
Figure (svg): A normal curve of sample means centred at 25 with standard error 0.481, from 23.4 to 26.6. The left tail below 24 is shaded yellow and labelled 0.019. A pink dot marks 24.
In context: if the population mean really were 25, fewer than 2 in 100 samples of 108 would average 24 or below. A one-unit gap is small against a standard deviation of 5, but huge against a standard error of 0.48, which is what a sample of 108 buys you.
Check the standard error by squaring
Why: its square times n must give back the population variance, 25.
\[ 0.4811^{2} \times 108 = 0.23145 \times 108 = 25.0 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 Exercise 25, p. 489
Worked example
It is believed that LTCC Intermediate Algebra students get less than seven hours of sleep a night, on average. A survey of 22 of them gave a mean of 7.24 hours, standard deviation 1.93 hours, tested at the 5 percent level. The book offers two normals and two t's, t with 22 and t with 21 degrees of freedom. Which is right?
Two traps sit in one question here: the normal options, which would need a known σ, and the off-by-one in the degrees of freedom.
The hypotheses
Why: less than seven goes in the alternative.
\[ H_0: \mu \ge 7, \qquad H_a: \mu < 7 \]
Is σ known?
Why: 1.93 comes from the 22 students surveyed: it is s.
\[ s = 1.93 \text{ hours} \]
Degrees of freedom
Why: one fewer than the sample size.
\[ df = n - 1 = 22 - 1 = 21 \;\Rightarrow\; t_{21} \]
The standard error
Why: the square root of 22 is 4.690.
\[ \frac{1.93}{\sqrt{22}} = \frac{1.93}{4.690} = 0.4115 \]
The t-score
Why: the sample mean against the boundary value 7.
\[ t = \frac{7.24 - 7}{0.4115} = 0.583 \]
Notice the decision about the curve did not depend on the direction of the alternative or on alpha. Both matter for the p-value and the decision in Section 9.4; neither changes the row of the table.
Figure (svg): A t curve with 21 degrees of freedom from minus 4 to 4. The area to the left of t equals 0.583 is shaded yellow and labelled 0.717. A pink dot marks 0.583, to the right of centre.
In context: the sample of 22 students averaged more than seven hours, the opposite direction from the alternative. Under t with 21 degrees of freedom about 72 percent of the curve lies below the observed t. Whatever the decision rule turns out to be, these data give no support to the belief that these students average less than seven hours.
Check the left area against the picture
Why: the dot is right of centre, so the area to its left must exceed one half, and it does.
\[ P(T_{21} < 0.583) = 0.717 > 0.5 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 Exercise 72, p. 493
Fill the middle
A random survey of 75 student loan recipients found a mean repayment time of 17.4 years, with standard deviation 6.3 years. The test asks whether the population mean could be 15 years. Fill in the curve.
Fill in the blanks
\text74 t, \ df = 0.7275, \qquad \frac3.30___} = \frac______} = ___, \qquad t = \frac______ = ___
Why: The 6.3 is computed from the 75 recipients, so sigma is unknown and the curve is a t with 74 degrees of freedom. The square root of 75 is 8.660, so the standard error is 6.3 divided by 8.660, about 0.7275, and the sample mean sits 2.4 divided by 0.7275, about 3.30 standard errors above 15.
Figure (svg): A t curve with 74 degrees of freedom drawn in cyan and a dashed orange standard normal curve, nearly identical, from minus 4 to 4. A pink dot marks t equals 3.30 far in the right tail; both tails beyond plus and minus 3.30 are shaded.
In context: if recipients really took 15 years on average, a sample of 75 averaging 17.4 years would be very unusual; the two tails beyond 3.30 hold only about 0.0015 of the area. The hypotheses are two-sided because the question is whether the mean could be 15, not whether it is longer.
Notice how close the t and the normal are at 74 degrees of freedom. A large sample makes the choice of curve matter little, but it does not make the normal correct: σ was still never known. Large samples relieve the normality assumption, which Part 2 is about, not the need to estimate σ.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 9, p. 488 — the student-loan survey
Section
Part 2
Concept
The book's Assumptions passage opens every case with the same words: you take a simple random sample from the population. It is the one assumption shared by all three tests, and the only one no amount of data can repair.
Why does every curve need it? The sampling distributions of chapter 7 describe what happens across random samples. The standard error, sigma over root n, measures chance variation from random selection and nothing else. A sample chosen any other way can be off for reasons that formula does not count.
\[ \text{standard error } = \frac{\sigma}{\sqrt{n}} \quad \text{measures chance error only} \]
A biased sample, say volunteers who answer a sleep survey because they sleep badly, misses the mean in a fixed direction. Making it bigger shrinks the standard error but leaves the bias, so the test becomes more confident about the wrong value.
The book's Exercise 28 asks exactly this: you are running a t-test, but the data are not from a simple random sample. Can you accurately perform the test? No. The arithmetic will run, and it will print a p-value, but that p-value describes random samples, and yours was not one.
simple random sample — A sample in which every group of n members of the population has the same chance of being the one chosen. It is what entitles the test to use a sampling distribution at all.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467; Exercise 28, p. 489
Concept
The second assumption for both mean tests is about shape. The book says the population is normally distributed, or your sample size is sufficiently large, and for the t-test it adds that with a large enough sample the t works even if the population is not approximately normal.
The reason is chapter 7's central limit theorem. The test does not need the data to be normal. It needs the sample mean's distribution to be normal, and that happens in one of two ways.
\[ \text{population normal} \;\Rightarrow\; \bar{X} \text{ normal for every } n \]
\[ n \text{ large} \;\Rightarrow\; \bar{X} \text{ approximately normal, whatever the population} \]
For a small sample there is no rescue from the theorem, so the population's own shape has to carry the assumption. That is why the book's homework adds the note that you may assume the population is normal when using a t, and why a dot plot of a small sample is worth drawing before you test.
What counts as sufficiently large depends on the population. A mildly skewed population needs only a modest n; a heavily skewed one with outliers needs much more. Thirty is a common rule of thumb, not a law.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — the Assumptions for the z-test and the t-test
Picture it
Here is the second assumption at work. The population on the left is exponential with mean 10, about as skewed as data get. The other two panels are histograms of 3000 simulated sample means each.
Figure (svg): Three panels. Left: an exponential population density with mean 10, falling steeply from zero, strongly skewed right. Middle: a histogram of 3000 means of samples of 5 from it, still visibly skewed right. Right: a histogram of 3000 means of samples of 40, nearly symmetric and bell-shaped, with a normal curve, centre 10 and spread 10 over root 40, laid over it.
Means of five values are still lopsided, with a longer right tail: a normal or t curve would misjudge the tail areas a test depends on. Means of forty values have nearly forgotten where they came from, and the normal curve with centre 10 and spread 10 over root 40 lies right on them.
\[ \frac{\sigma}{\sqrt{40}} = \frac{10}{6.325} = 1.58 \]
So a test of this population's mean is safe at n equal to 40 and doubtful at n equal to 5. Notice what a large sample did not do: it did nothing about how the sample was chosen. If the forty values had come from a biased source, the right-hand panel would be just as bell-shaped, centred in the wrong place.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — a large sample relieves normality
Concept
The z-test's last assumption is that you know the population standard deviation. The book adds the honest aside: which, in reality, is rarely known. That aside is why the t row is the ordinary case and the z row is the special one.
When is σ genuinely known? When it comes from somewhere other than the sample being tested. The book's exercises show the usual sources:
The test for knownness is a question about the source. Was this number computed from the very values you are now testing? Then it is s, however carefully it was computed. Was it given as a fact about the population, independent of this sample? Then it is σ.
\[ \text{from this sample} \to s \to t, \qquad \text{from outside it} \to \sigma \to z \]
When a problem gives you both, as several of the book's do, the known σ wins. It carries more information than an s computed from a few dozen values.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467; Exercises 74-75, p. 494
Worked example
An article stated the mean time in jail for a first-time convicted burglar is 2.5 years. A study of 26 first-time burglars found a mean of 3 years with standard deviation 1.8 years. It is somehow known that the population standard deviation is 1.5, and the population is normal. The test asks whether the mean has increased.
The problem deliberately gives two standard deviations. Decide which one belongs on the curve before computing anything: that decision is the entire exercise.
The hypotheses
Why: has increased is a greater-than, so it goes in the alternative.
\[ H_0: \mu \le 2.5, \qquad H_a: \mu > 2.5 \]
Which standard deviation?
Why: 1.5 is known for the population; 1.8 is the sample's own s.
\[ \sigma = 1.5 \text{ known} \;\Rightarrow\; \text{normal} \]
Write the curve
Why: centre at the claim, spread from sigma.
\[ \bar{X} \sim N\left(2.5,\ \frac{1.5}{\sqrt{26}}\right) \]
The standard error
Why: the square root of 26 is 5.099.
\[ \frac{1.5}{5.099} = 0.2942 \]
The z-score
Why: the sample mean against 2.5.
\[ z = \frac{3 - 2.5}{0.2942} = 1.700 \]
The right tail
Why: the alternative points right.
\[ P(Z > 1.700) = 0.0446 \]
This is the shape check too: the population is stated to be normal, so even 26 values give a normal sample mean, and the curve can be trusted for any sample size.
Figure (svg): A normal curve of sample mean jail times centred at 2.5 years with standard error 0.294, from 1.5 to 3.5 years. The right tail beyond 3 years is shaded yellow and labelled 0.045. A pink dot marks 3.
In context: if first-time burglars still served 2.5 years on average, a sample of 26 averaging 3 years or more would occur in about 4.5 percent of samples. Had you used s, the standard error would be 0.353 and the z-score only 1.42, a noticeably weaker-looking result from the same data.
Check the alternative spread
Why: computing with s instead shows what the choice changes.
\[ \frac{1.8}{\sqrt{26}} = 0.3530, \quad \frac{0.5}{0.3530} = 1.42 \ne 1.70 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 8, p. 488 — the burglary study
Trap
Exercise 9's 75 loan recipients gave a sample standard deviation of 6.3 years. A first attempt reasons that 75 is large and writes:
\[ z = \frac{17.4 - 15}{6.3/\sqrt{75}} \]
\[ \text{read from } N(0, 1) \]
Wrong row. Large n is not a known σ.
The rule this book uses is about the source of the standard deviation, not the sample size. The 6.3 came from the sample, so the curve is a t.
\[ t = 3.30, \quad df = 74 \]
At 74 degrees of freedom the two curves give nearly the same areas, which is why the shortcut survives in some courses. At 15 or 20 they do not, and the shortcut habit carries over to where it does harm. Name the t whenever σ was estimated.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466; Exercise 23, p. 489
Worked example
A brand claims its deluxe tyre averages at least 50,000 miles before it needs replacing. From past studies, the standard deviation is known to be 8,000 miles. In a survey of 28 tyres the mean lifespan was 46,500 miles, with standard deviation 9,800 miles. Using alpha of 0.05, are the data highly inconsistent with the claim?
Again two standard deviations, and again the source decides. Then there is a shape question: 28 is below the usual rule of thumb, so the normal curve rests on lifetimes being roughly normal.
The hypotheses
Why: at least 50,000 is the claim, so it is the null.
\[ H_0: \mu \ge 50{,}000, \qquad H_a: \mu < 50{,}000 \]
Which standard deviation?
Why: 8,000 comes from past studies, outside this survey.
\[ \sigma = 8000 \;\Rightarrow\; \text{normal} \]
The standard error
Why: the square root of 28 is 5.2915.
\[ \frac{8000}{\sqrt{28}} = \frac{8000}{5.2915} = 1511.9 \text{ miles} \]
The z-score
Why: the shortfall in standard errors.
\[ z = \frac{46{,}500 - 50{,}000}{1511.9} = \frac{-3500}{1511.9} = -2.315 \]
The left tail
Why: the alternative points left.
\[ P(Z < -2.315) = 0.0103 \]
The tail is drawn on the left because the alternative says less than 50,000. A survey average above 50,000 could never count as evidence against a claim of at least 50,000.
Figure (svg): A normal curve of sample mean tyre lifetimes centred at 50,000 miles with standard error 1,512, from 45,000 to 55,000. The left tail below 46,500 is shaded yellow and labelled 0.010. A pink dot marks 46,500.
In context: if these tyres really averaged 50,000 miles, only about 1 survey in 100 of 28 tyres would average 46,500 or less. The comparison with alpha of 0.05 belongs to Section 9.4, but the size of that tail already says the claim is in trouble. The survey's own 9,800 never enters the calculation.
Check the assumptions, not just the arithmetic
Why: random tyres, and n = 28 under 30, so the result leans on roughly normal lifetimes; the z-score rebuilds 46,500.
\[ 50{,}000 + (-2.315)(1511.9) = 46{,}500 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 74, p. 494 — the deluxe tyre
Worked example
The mean number of sick days an employee takes per year is believed to be about ten. A personnel department surveys eight employees at random: 12, 4, 15, 3, 11, 8, 6, 8. Which curve should the test use, and does the sample support using it?
Here no standard deviation is given at all, only data, so you must compute s yourself. With only eight values, the normality assumption is doing real work, so look at the data before trusting the t.
Add the values
Why: eight of them.
\[ 12 + 4 + 15 + 3 + 11 + 8 + 6 + 8 = 67 \]
The sample mean
Why: the total over n.
\[ \bar{x} = \frac{67}{8} = 8.375 \]
Squared deviations
Why: each value minus 8.375, squared.
\[ 13.141 + 19.141 + 43.891 + 28.891 + 6.891 + 0.141 + 5.641 + 0.141 \]
Their sum
Why: the sum of squares.
\[ \sum (x - \bar{x})^{2} = 117.875 \]
The sample standard deviation
Why: divide by n minus 1, then take the root.
\[ s = \sqrt{\frac{117.875}{7}} = \sqrt{16.839} = 4.104 \]
The curve and the t-score
Why: sigma unknown, so t with 7 degrees of freedom.
\[ t = \frac{8.375 - 10}{4.104/\sqrt{8}} = \frac{-1.625}{1.451} = -1.12, \quad df = 7 \]
Figure (svg): A dot plot of eight sick-day counts on an axis from 0 to 16: one dot each at 3, 4, 6, 11, 12 and 15, and two stacked dots at 8. A cyan dashed line marks the sample mean 8.375; a yellow dashed line marks the claimed mean 10.
In context: the eight employees averaged 8.4 sick days, 1.12 estimated standard errors below the believed ten. The dot plot shows no outlier and no pile-up at one end, which is as much as eight values can say about normality. The two-sided p-value under t with 7 degrees of freedom is about 0.30, so this sample gives no reason to doubt the figure of ten.
Check the sum of squares by the shortcut
Why: the sum of the squares minus n times the mean squared must agree.
\[ 679 - 8(8.375)^{2} = 679 - 561.125 = 117.875 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 78, p. 494 — the sick-day survey
Discrimination
Each study below has a problem, and each problem attacks one assumption of the mean tests. Name the assumption. The point is to see that the three are different, and that only one of them is helped by collecting more data.
Sort into buckets
Sort each study by the assumption it puts at risk.
Only the middle bucket is fixed by a larger sample, through the central limit theorem. The random-sample problems need a different design, and the sigma problems need a t.
The completers-only trial is easy to miss. Every patient was measured carefully, but the ones who dropped out, perhaps because the drug was not helping, are missing, so the sample is not random from the population of patients who start the drug.
Counterexample
A website asks visitors to report how many hours they sleep, and 5,000 reply, averaging 6.4 hours with a standard deviation of 1.5. Someone argues that with 5,000 responses no assumption could possibly matter.
Discussion prompt
Explain why this sample of 5,000 can still give a misleading test of the population's mean sleep, and name the assumption that fails. Then say what the large sample does fix.
This is the counterexample to the idea that big data repairs everything. The standard error only measures how far a random sample's mean wanders by chance. A biased sample's mean does not wander around the truth; it sits off to one side, and a huge n just pins it there precisely.
Keep the two kinds of error apart in your head: chance error shrinks with n, bias does not shrink at all.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — a simple random sample, in every case
Step zero
From generation to generation, the mean age smokers start varies, but the standard deviation stays around 2.1 years. A survey of 40 smokers of this generation tests whether the mean starting age is at least 19. The sample mean was 18.1 with a sample standard deviation of 1.3.
Discussion prompt
Before any arithmetic: which curve does this test use, which of the two standard deviations goes into it, and why? Then write the curve with its numbers.
The step to take first is the one this exercise rewards: read every number and label it before touching a formula. The 1.3 is the tempting one, because it is the number from the data in front of you. But the problem told you the standard deviation is stable at 2.1, a fact about the population, and that is what the first row asks for.
Notice the z-score of minus 2.71 would become minus 4.38 with s. Using the wrong standard deviation here would make the evidence look far stronger than it is.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 75, p. 494 — the starting age of smokers
Error analysis
A researcher records eight house sale prices, in thousands of dollars: 180, 195, 210, 220, 240, 260, 310 and 1,450. She runs a t-test of whether the mean price is 300 thousand, and writes the line below. Find what is wrong with the reasoning, not the arithmetic.
Annotate
On: \( \bar{x} = 383.1, \ s = 433.0, \ t = \frac{383.1 - 300}{434.5/\sqrt{8}} = 0.54, \ df = 7 \)
The arithmetic is right: the mean is 383.1 and s is 433.0. The trouble is that the t-test's normality assumption fails, and with only eight values there is nothing to compensate. A single sale contributes most of the standard deviation, so the test is really about one house.
Contrast the sick-day data of Exercise 78: also eight values, but spread evenly from 3 to 15 with no outlier. Same sample size, different verdict, because the assumption is about the population's shape, and the dot plot is your only window onto it.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — the t-test's normality assumption
Section
Part 3
Concept
For a proportion, the book's Assumptions passage says you take a simple random sample and must meet the conditions for a binomial distribution. Those are Section 4.3's characteristics, now used as a checklist before the test.
\[ X \sim B(n,\ p), \qquad P' = \frac{X}{n} \]
The count of successes X is binomial when all four hold, and the test is about the sample proportion, X divided by n. Simple random sampling from a large population is what delivers the last two conditions: each person drawn is a fresh, independent trial with the same chance p.
Independence is the condition most often broken in practice. Survey whole households, whole classrooms or whole clinics, and the people inside each cluster tend to answer alike. You then have fewer independent pieces of information than responses, and the test, which counts each response as a trial, overstates its precision.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — the conditions for a binomial distribution
Concept
Section 7 and chapter 4 give the binomial count a mean and a variance. Divide the count by n and you get the sample proportion's mean and standard error, one move at a time.
\[ E(X) = np, \qquad \operatorname{Var}(X) = npq \]
Dividing a variable by n divides its mean by n and its variance by n squared:
\[ E(P') = \frac{np}{n} = p, \qquad \operatorname{Var}(P') = \frac{npq}{n^{2}} = \frac{pq}{n} \]
Take the square root of the variance for the standard deviation, and put in the null value, because the test assumes the null hypothesis is true:
\[ P' \sim N\left(p_0,\ \sqrt{\frac{p_0 q_0}{n}}\right) \]
This is the book's mean p and standard deviation the square root of pq over n. Both describe the sample proportion. The normal shape is an approximation to the binomial's bars, and how good an approximation it is depends on the condition in Part 4.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — mu = p and sigma = sqrt(pq/n)
Worked example
It is thought that 42 percent of respondents in a taste test would prefer Brand A. In a particular test of 100 people, 39 percent preferred Brand A. What distribution should be used to test the claim? Check the conditions and place the sample on the curve.
The claim is a percentage, so this is the proportion row before anything is computed. What remains is to check it may be used, and to write the curve from the null value 0.42, not from the sample's 0.39.
The parameter
Why: a percentage of respondents is a proportion.
\[ H_0: p = 0.42 \]
Binomial conditions
Why: 100 people, prefer A or not, independent if sampled at random.
\[ X \sim B(100,\ 0.42) \]
The shape check, with the null value
Why: both expected counts must exceed five.
\[ np_0 = 100(0.42) = 42, \quad nq_0 = 100(0.58) = 58 \]
The standard error
Why: from p0 and q0.
\[ \sqrt{\frac{0.42(0.58)}{100}} = \sqrt{0.002436} = 0.04936 \]
The z-score
Why: the sample proportion against 0.42.
\[ z = \frac{0.39 - 0.42}{0.04936} = -0.608 \]
The standard error used 0.42, the claim, not the sample's 0.39. The two give 0.0494 and 0.0488 here, close because the proportions are close; the next examples show cases where the difference is larger.
Figure (svg): A normal curve of sample proportions centred at 0.42 with standard error 0.049. The left tail below 0.39 is shaded yellow and labelled 0.27. A pink dot marks 0.39.
In context: if 42 percent of all tasters preferred Brand A, about 27 percent of taste tests of 100 people would show 39 percent or fewer. A three-point shortfall in a sample of 100 is ordinary chance variation, well inside the curve.
Check the condition is not borderline
Why: both counts clear five by a wide margin, and the normal curve's left edge three standard errors out is far from zero.
\[ 0.42 - 3(0.04936) = 0.272 > 0 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 Exercise 26, p. 489
Worked example
Approximately 9.5 percent of American adults suffer from depression or a depressive illness in a year. In a survey of 100 people in a certain town, seven did. The question is whether the town's proportion is lower than the national figure. Set up the test and check that the normal curve may be used.
A small null proportion is where the shape check earns its keep. With p-naught under one tenth, np is the product to watch.
The hypotheses
Why: lower goes in the alternative.
\[ H_0: p = 0.095, \qquad H_a: p < 0.095 \]
The sample proportion
Why: seven of a hundred.
\[ p' = \frac{7}{100} = 0.07 \]
The shape check, with the null value
Why: the smaller product is np.
\[ np_0 = 100(0.095) = 9.5, \quad nq_0 = 100(0.905) = 90.5 \]
The standard error
Why: from the null value.
\[ \sqrt{\frac{0.095(0.905)}{100}} = \sqrt{0.00085975} = 0.02932 \]
The z-score
Why: seven percent against 9.5 percent.
\[ z = \frac{0.07 - 0.095}{0.02932} = -0.853 \]
Picture what np of 9.5 means: under the null, a survey of 100 expects nine or ten sufferers. That is enough room for the count to vary on both sides, which is all the shape condition asks.
Figure (svg): A normal curve of sample proportions centred at 0.095 with standard error 0.029, from 0 to 0.19. The left tail below 0.07 is shaded yellow and labelled 0.20. A pink dot marks 0.07.
In context: if the town matched the national 9.5 percent, a survey of 100 would find seven or fewer sufferers about 20 percent of the time. The town's lower count is easily explained by chance, though that decision formally waits for Section 9.4.
Check what np of 9.5 means for the curve
Why: the curve's centre sits only 3.2 standard errors above zero, so the condition holds but with little room.
\[ \frac{0.095}{0.02932} = 3.24 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 10, p. 489 — the depression survey
Worked example
A statistics instructor believes that fewer than 20 percent of Evergreen Valley College students attended the opening midnight showing of the latest Marvel movie. She surveys 84 students and finds that 11 attended. Which distribution does the test use, and may it be used?
Translate the belief first: fewer than 20 percent is the alternative, so the null hypothesis sets p at 0.20, and that is the value the check and the curve both use.
The hypotheses
Why: the belief is the alternative.
\[ H_0: p = 0.20, \qquad H_a: p < 0.20 \]
The sample proportion
Why: eleven of 84.
\[ p' = \frac{11}{84} = 0.1310 \]
The shape check
Why: 84 times 0.20, and 84 times 0.80.
\[ np_0 = 84(0.20) = 16.8, \quad nq_0 = 84(0.80) = 67.2 \]
The standard error
Why: the null's pq is 0.16.
\[ \sqrt{\frac{0.20(0.80)}{84}} = \sqrt{0.0019048} = 0.04364 \]
The z-score
Why: the sample proportion in standard errors.
\[ z = \frac{0.1310 - 0.20}{0.04364} = -1.582 \]
Notice the standard error is a property of the claim and the sample size: you could write 0.0436 down before surveying anyone. Only the dot, the sample proportion, comes from the data.
Figure (svg): A normal curve of sample proportions centred at 0.20 with standard error 0.044. The left tail below 0.131 is shaded yellow and labelled 0.057. A pink dot marks 0.131.
In context: if exactly a fifth of EVC students went, about 5.7 percent of samples of 84 would show 11 or fewer. That is close to the conventional 5 percent line; Section 9.4 will show how the choice of alpha settles a case like this. Note the checks use 0.20 throughout, never 0.131.
Check against the sample-based standard error
Why: it differs, which is why the null value must be named.
\[ \sqrt{\frac{0.131(0.869)}{84}} = 0.0368 \ne 0.0436 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 69, p. 493 — the midnight showing
Worked example
An instructor claims that 60 percent of the students who take her Elementary Statistics class go through life feeling more enriched. You randomly survey 64 of her past students and find that 34 feel more enriched. Set up the distribution for a test of her claim.
The question is open about direction: you are checking whether 60 percent is right, so the alternative is not equal. That does not change the curve; it changes which tails count later.
The hypotheses
Why: is the claim correct?
\[ H_0: p = 0.60, \qquad H_a: p \ne 0.60 \]
The sample proportion
Why: 34 of 64.
\[ p' = \frac{34}{64} = 0.5313 \]
The shape check
Why: both expected counts.
\[ np_0 = 64(0.6) = 38.4, \quad nq_0 = 64(0.4) = 25.6 \]
The standard error
Why: the null's pq is 0.24.
\[ \sqrt{\frac{0.6(0.4)}{64}} = \sqrt{0.00375} = 0.06124 \]
The z-score
Why: the shortfall in standard errors.
\[ z = \frac{0.5313 - 0.6}{0.06124} = -1.123 \]
All four checks pass with room to spare: a random survey, two outcomes, independent students, and expected counts of 38.4 and 25.6. The only question left is the decision, which waits for Section 9.4.
Figure (svg): A normal curve of sample proportions centred at 0.60 with standard error 0.061. The left tail below 0.531 is shaded yellow and labelled 0.13. A pink dot marks 0.531.
In context: about 13 percent of samples of 64 past students would show 34 or fewer enriched if the true rate were 60 percent. Because the alternative is two-sided, the matching upper tail counts too, which roughly doubles that to 0.26. Fifty-three percent is lower than claimed, but not unusually so for a sample this size.
Check by counting successes instead
Why: the count's mean and spread must give the same z, since dividing by n changes nothing.
\[ \frac{34 - 38.4}{\sqrt{64(0.6)(0.4)}} = \frac{-4.4}{3.919} = -1.123 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercise 80, p. 494 — the enriched students
Sorting
Each survey below is meant to support a proportion test. Decide whether it delivers independent trials with a common p, or whether the binomial model is in doubt. Think about how the people were chosen, not how many there are.
Sort into buckets
Sort each survey by whether the binomial conditions are met.
The households and the classes share a design: sample groups, then take everyone inside them. That is often sensible for cost, but it needs methods built for clustered data, because the responses are not independent and the effective sample is smaller than the head count.
The taste test only works if each taster tastes separately. Let them confer, and the 100 answers collapse towards a handful of group opinions.
Section
Part 4
Concept
The binomial conditions make the binomial the right model. A second condition makes the normal curve a fair stand-in for it. The book says the shape of the binomial distribution needs to be similar to the shape of the normal distribution, and to ensure this:
\[ np > 5 \quad \text{and} \quad nq > 5 \]
Read the two products as expected counts: np is how many successes you expect in the sample, nq how many failures. When either is small, the bars are crowded against a wall, zero or n, and a symmetric bell cannot fit them.
Figure (svg): Two panels of binomial bars with a normal curve laid over each. Left: n equals 40, p equals 0.05, np equals 2; the bars pile against zero and fall away to the right, and the normal curve spills over to the left of zero where no count can be, the spill shaded red. Right: n equals 200, p equals 0.05, np equals 10; the bars form a nearly symmetric hump and the normal curve follows them closely.
With np equal to 2, the bars rise from zero and trail off to the right; the normal curve, symmetric about 2, puts 3.5 percent of its area on negative counts, which cannot happen. With np equal to 10, there is room on both sides of the centre and the bell fits.
Which p goes into the check? The null value. The test computes every probability as if the null were true, so the null's p decides the binomial whose shape matters.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — np and nq must both be greater than five
Picture it
Why does the book ask for both products, when most examples only seem to need one? Because a count has two walls. Here are three binomials with the same n of 30 and different p.
Figure (svg): Three panels of binomial bars, each with n equals 30. Left: p equals 0.05, np equals 1.5, bars piled against zero. Middle: p equals 0.5, np and nq both 15, a symmetric hump. Right: p equals 0.95, nq equals 1.5, bars piled against 30.
On the left, p is 0.05: np is 1.5, the bars are crushed against zero. In the middle, p is a half: both products are 15 and the bars make a symmetric hump. On the right, p is 0.95: np is a healthy 28.5, yet the bars are crushed against 30, because nq is only 1.5.
\[ p = 0.95: \quad np = 28.5 \checkmark, \quad nq = 1.5 \times \]
The right-hand panel is the mirror of the left. Checking only np would wave it through. So the rule is symmetric for a symmetric reason: np keeps you off the left wall, nq off the right one.
Which one is the danger is easy to predict: a small null proportion threatens np, a large one threatens nq. Only near a half are both comfortable at small n.
Worked example
A supplier claims that 5 percent of its parts are defective. A buyer inspects 40 randomly chosen parts and finds 5 defective, a sample proportion of 12.5 percent. The buyer wants to test whether the defect rate is higher than claimed. Can the normal curve be used?
Run the check before the test. Then, because it fails, compare the normal's answer with the exact binomial answer, to see what the failure costs.
The hypotheses
Why: higher goes in the alternative.
\[ H_0: p = 0.05, \qquad H_a: p > 0.05 \]
The shape check
Why: 40 times 0.05 is far below five.
\[ np_0 = 40(0.05) = 2, \quad nq_0 = 40(0.95) = 38 \]
What the normal would say
Why: standard error from the null value, then the z-score.
\[ \sqrt{\frac{0.05(0.95)}{40}} = 0.03446, \quad z = \frac{0.125 - 0.05}{0.03446} = 2.18 \]
The normal tail
Why: the area beyond 2.18.
\[ P(Z > 2.18) = 0.015 \]
The exact binomial tail
Why: add the binomial probabilities of 5 or more defects.
\[ P(X \ge 5) = 1 - \sum_{k=0}^{4} \binom{40}{k}(0.05)^{k}(0.95)^{40-k} = 0.048 \]
Read the bars: most of the probability sits at 0, 1, 2 and 3 defects, and the bars fall away slowly to the right. A bell centred at 2 must be symmetric, so it cannot both fit the wall at zero and the long right side.
Figure (svg): Binomial bars for n equals 40 and p equals 0.05, from 0 to 9 successes. The bars at 5 and above are shaded red; their total is 0.048. A normal curve with mean 2 and standard deviation 1.38 is drawn over them, and its area beyond 5 is shaded yellow, labelled 0.015.
In context: if the supplier's 5 percent were true, a batch of 40 with five or more defects would turn up about one time in twenty, not one in seventy as the normal claims. The normal overstates the evidence against the supplier by a factor of three, because it cannot follow the skewed bars. The remedy is the exact binomial calculation, not a different bell.
Check the exact tail term by term
Why: the five probabilities for 0 to 4 defects must sum to 1 minus 0.048.
\[ 0.1285 + 0.2706 + 0.2777 + 0.1851 + 0.0901 = 0.9520 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — the condition, with a sample of my own
Worked example
A delivery company claims that 97 percent of its parcels arrive on time. A customer tracks 60 random parcels to test the claim. Check the condition for a normal approximation.
Most students compute np, see a big number, and stop. Work both products and watch which one fails.
The null value
Why: the company's claim.
\[ H_0: p = 0.97, \quad q_0 = 1 - 0.97 = 0.03 \]
Expected successes
Why: 60 times 0.97.
\[ np_0 = 60(0.97) = 58.2 > 5 \]
Expected failures
Why: 60 times 0.03.
\[ nq_0 = 60(0.03) = 1.8 < 5 \]
Verdict
Why: one product failing is enough.
\[ \text{normal approximation not justified} \]
How large a sample would do?
Why: solve for n with the smaller probability.
\[ n(0.03) > 5 \;\Rightarrow\; n > \frac{5}{0.03} = 166.7 \]
This is the mirror image of the defect case. There the rare outcome was a success; here it is a failure, a late parcel, and the check that catches it is nq rather than np.
Figure (svg): Binomial bars for n equals 60 and p equals 0.97 from 50 to 60 successes. The tallest bars are at 58, 59 and 60, and the bars stop abruptly at 60. A normal curve with mean 58.2 and standard deviation 1.32 is drawn over them; its part beyond 60.5 is shaded red.
In context: with 60 parcels, the company expects fewer than two late ones, so the count of on-time parcels is jammed against 60 and the normal curve spills past the wall. The customer would need at least 167 parcels for the normal-based test, or should use the exact binomial with 60.
Check with n = 167
Why: both products must now clear five.
\[ 167(0.03) = 5.01 > 5, \quad 167(0.97) = 162.0 > 5 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — np and nq, with a sample of my own
Trap
For the parcel company, p-naught 0.97 and 60 parcels, a first attempt writes:
\[ np_0 = 60(0.97) = 58.2 > 5 \]
\[ \therefore \text{ use the normal} \]
Wrong. Half the condition was never checked.
The condition has two parts because a count has two walls. A large p-naught passes np easily and fails on nq.
\[ nq_0 = 60(0.03) = 1.8 < 5 \]
A safe habit: always compute both products and write both down, and compute the smaller one first. The smaller of p-naught and q-naught is the one that can fail.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467; Exercise 29, p. 489
Anomaly
For the defect test, null proportion 0.05 with 40 parts and 5 defective, a buyer checks the condition this way and concludes the normal is fine. Find what went wrong.
Annotate
On: \( np' = 40(0.125) = 5, \quad nq' = 40(0.875) = 35 \;\Rightarrow\; \text{OK?} \)
Two errors stack here. The check used the sample proportion, which happens to be bigger than the null value, and so made the condition look easier to pass. And even then, five is not greater than five, so the buyer misread the inequality.
The book's own wording supports the null value: in a test the binomial's p is the one under the null hypothesis. The same rule decides the standard error in the curve. Chapter 8's interval check used p-prime because an interval has no null value to use.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467 — the shape condition
Estimation
A null hypothesis says 4 percent of a product's users report a side effect. Estimate the smallest sample that passes the shape check before you compute anything.
Predict first
Roughly how many users must be sampled for both expected counts to exceed five?
Correct: More than about 125
Why: The smaller product is n times 0.04, and it must exceed five, so n must exceed five divided by 0.04, which is 125. The failure count, n times 0.96, is then about 120, comfortably large.
\[ n(0.04) > 5 \;\Rightarrow\; n > \frac{5}{0.04} = 125 \]
The rule of thumb in one line: the rarer the claimed event, the bigger the sample needed before a normal curve can describe it. A one-in-twenty-five event needs more than 125 trials just to expect five of them.
A quick sense check is to divide five by the smaller of p-naught and q-naught. For a claim of a half, that gives 10; for a claim of 1 percent it gives 500. That single division tells you whether a proposed study is even big enough to test the claim this way.
Edge cases
The required sample size depends on how extreme the null proportion is. Explore the boundary by working out the threshold for several claims.
Discussion prompt
For null proportions of 0.5, 0.2, 0.02 and 0.995, find the smallest whole-number sample size that makes both n times p-naught and n times q-naught greater than five. Which claims are expensive to test this way, and why?
Notice the 0.995 case is driven by q-naught, not p-naught: the rare outcome is failure, so nq is the binding product. Whenever a claim is very close to one, flip your attention to the failures.
This is why claims like 99.5 percent uptime or a 0.2 percent defect rate are usually tested with exact binomial methods, not the normal curve: the samples needed for the normal approximation run into the thousands.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 467; Exercise 29, p. 489
Fill the middle
A test of a null proportion of 0.30 uses a random sample of 50. Fill in both products and the standard error the curve will use.
Fill in the blanks
np_0 = 50(0.3) = 15, \quad nq_0 = 50(0.7) = 35, \quad \sqrt0.0648___} = ___
Why: Fifty times 0.3 is 15 expected successes and fifty times 0.7 is 35 expected failures, both above five, so the normal approximation is allowed. The standard error is the square root of 0.21 divided by 50, the square root of 0.0042, about 0.0648.
Both products clear five comfortably, so the curve for the sample proportion is a normal with centre 0.30 and spread 0.0648. A sample proportion of 0.40 would then sit about 1.54 standard errors above the claim.
\[ \frac{0.40 - 0.30}{0.0648} = 1.54 \]
Notice the standard error is a property of the null and the sample size alone. You can write it down before collecting a single response, which is how a study is planned.
Section
Part 5
Concept
Choosing the wrong distribution does not produce an obviously wrong answer. It produces a p-value that is systematically off, with nothing in the output to warn you. For the commonest mistake, a normal used where a t belongs, the error always runs the same way.
Figure (svg): A standard normal curve in orange and a t curve with 4 degrees of freedom in cyan, from minus 5 to 5. Beyond plus and minus 2.5, the t's tails are shaded cyan and the normal's tails are shaded orange on top. Labels give the two-tailed areas: 0.067 for the t and 0.012 for the normal.
The t has fatter tails than the normal, so beyond any cut-off it holds more area. A p-value is a tail area. Read the same statistic from the normal and you get a smaller p-value than the honest one, every time.
\[ P(|T_4| > 2.5) = 0.067 \quad \text{but} \quad P(|Z| > 2.5) = 0.012 \]
That error is never neutral: it makes results look more significant than they are, and it is largest for the smallest samples, where the evidence was weakest to begin with. That is why the book insists on the t whenever σ was estimated.
The other mistakes have their own directions. Using s where σ is known usually wastes information; using a normal on a skewed binomial, as in the defect example, can overstate or understate the tail depending on the side, and the tail is exactly where the test looks.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467 — the table and the assumptions together
Worked example
A sample of five measurements gives a test statistic of 2.5, computed with the sample standard deviation, for a two-sided test at the 5 percent level. Compare what the correct t curve and the wrong normal curve say.
The plan: settle the right curve, find both two-tailed areas, and compare each with 0.05. The question is whether the choice of curve changes the decision.
The right curve
Why: s was used, so a t with n minus 1 degrees of freedom.
\[ df = 5 - 1 = 4 \]
The t's two tails
Why: both tails, because the alternative is two-sided.
\[ P(|T_4| > 2.5) = 2(0.0334) = 0.067 \]
The normal's two tails
Why: what the wrong curve reports.
\[ P(|Z| > 2.5) = 2(0.0062) = 0.012 \]
Compare each with alpha
Why: 0.05, the default when none is given.
\[ 0.067 > 0.05, \qquad 0.012 < 0.05 \]
Notice how close 2.5 is to the t's cut-off: this is a borderline result under the right curve, and a comfortable rejection under the wrong one. Borderline small-sample results are exactly where the choice of curve decides the conclusion.
Figure (svg): Two panels. Left: a t curve with 4 degrees of freedom with its critical values plus and minus 2.776 marked by red dashed lines, and the statistic 2.5 marked by a pink dot inside them. Right: a standard normal with critical values plus and minus 1.96 marked by red dashed lines, and the same statistic 2.5 marked by a pink dot outside them.
In context: the same five measurements are not significant under the correct curve and look strongly significant under the wrong one. The decisions are opposite. The t's critical value with 4 degrees of freedom is 2.776, well beyond 2.5; the normal's is 1.96.
Check with the critical values
Why: a statistic is significant only if it passes the curve's own cut-off.
\[ 2.5 < t_{0.025,4} = 2.776, \qquad 2.5 > z_{0.025} = 1.96 \]
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, p. 466; Formula Review, p. 488 — alpha = 0.05 when none is given
Ranking
A test statistic of 2 is read from four different curves. Rank the one-sided tail area beyond 2, from the smallest to the largest, using what you know about the t family.
Put in order
Order these tail areas beyond 2, from smallest to largest.
Why: Fewer degrees of freedom mean fatter tails, so more area beyond 2. The normal has the thinnest tails of all, 0.023, then the t with 30 at 0.027, the t with 5 at 0.051 and the t with 2 at 0.092.
\[ 0.023 < 0.027 < 0.051 < 0.092 \]
The ranking is the whole family in one line. The normal is the limit the t's approach as the degrees of freedom grow, always from above in the tails. So whenever a t is replaced by a normal, the tail area shrinks, and so does the p-value.
Notice the gap between 30 degrees of freedom and the normal is tiny, while between 5 and the normal it is more than double. The sample size does not decide the row, but it decides how much a wrong row costs.
Comparison
Fill in the blanks to rebuild Table 9.3 together with its assumptions. Every cell is something you have used in this lesson.
Comparison matrix
| test | curve | centre | spread | shape assumption |
|---|---|---|---|---|
| mean, σ known | normal | μ₀ | sigma/sqrt(n) | normal population or large n |
| mean, σ unknown | t | μ₀ | s/√n, df = n − 1 | normal population or large n |
| proportion | normal | p₀ | √(p₀q₀/n) | np>5 and nq>5 |
Read the table by columns. The centre always comes from the null hypothesis. The spread comes from a known σ, an estimated s, or the null's p. The shape assumption is the central limit theorem's job for means and the np, nq check's job for proportions.
One assumption is missing from every row because it belongs to all of them: a simple random sample. It is the column you cannot fill in from the data.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467 — Table 9.3 and the Assumptions
Matching
Each study is from this lesson. Match it to the curve the test uses, written out with its numbers. Ask the two questions first, then compute the spread.
Match the pairs
Why: The newspapers give a population standard deviation, so the normal. The sick days and the graduation times give only sample standard deviations, so t curves with n minus 1 degrees of freedom. The depression survey is a proportion, centred on the null value with a spread computed from it.
Exercise 77 is new: an article says California state university students take 4.5 years on average to finish, and you believe it is longer. Forty-nine students give a mean of 5.1 with s of 1.2. The square root of 49 is 7, which makes its spread an easy 0.171, and its t-score 3.5.
Notice the two t's differ in degrees of freedom, 7 and 48. At 48 the curve is nearly normal; at 7 it is noticeably wider. Same row, different members of the family.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing Exercises 10, 76-78, pp. 489, 494
Real world
A news story reports that in a pilot study of 30 patients, 4 had a serious side effect, against 5 percent expected, and calls the result statistically significant with a p-value of 0.02, from a normal-based test of a proportion.
Discussion prompt
Using what this section says about the proportion test, decide whether that p-value can be trusted, and explain what you would want to know about how the 30 patients were chosen.
This is the realistic use of the section. Most of the time you will not run a test yourself; you will read one, and the questions to ask are exactly the assumptions on page 467. Was it a random sample? Does the curve fit the shape? Was the right p used?
A normal p-value on a rare outcome in a small sample is one of the commonest ways a weak result is made to look strong.
Section
Part 6
Pattern
Every problem in this lesson ran through the same short sequence. Two decisions choose the curve; the checks decide whether you have earned the right to use it.
Figure (svg): A flow diagram with five boxes in a row joined by arrows: name the parameter; if a mean, ask whether sigma is known; write the distribution with its centre and spread; check the assumptions, random sample, normal or large n, binomial conditions and np and nq above 5; then interpret.
The sample size appears only in the checks and in the degrees of freedom, never in the choice of row. And the null value appears in every centre and in the proportion's spread, because a test always computes as if the null hypothesis were true.
If no significance level is given, the book's Formula Review says to use alpha of 0.05. That number belongs to the decision in Section 9.4, not to the choice of curve.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467; Formula Review, p. 488
Check
Two standard deviations are given. Decide which belongs on the curve before you look at the options.
Ask where each number came from. One is a long-run fact about the process; the other is computed from the 12 values in hand.
Check your understanding
A machine fills cereal boxes; from years of records the fill weight has standard deviation 8 grams. A sample of 12 boxes has mean 497 grams and standard deviation 6 grams. To test whether the mean fill is 500 grams, which distribution should be used?
Answer: A
Why: The 8 grams comes from years of records, outside this sample, so sigma is known and the test uses a normal curve centred at 500 with spread 8 over root 12, about 2.31 grams. The sample's 6 grams is set aside.
In context: with σ known, the sample mean of 497 grams sits 3 divided by 2.31, about 1.30 standard errors below 500. Each wrong option is a real slip: ignoring a known σ, miscounting degrees of freedom, and putting s on a normal curve.
Notice the sample size of 12 played no part in the choice. It only matters for the shape: with 12 boxes, the normal curve rests on fill weights being roughly normal, which is plausible for a filling machine.
Check
Compute both products with the null value before choosing.
Remember the two walls: a small null proportion threatens one product, a large one the other.
Check your understanding
Four proportion tests are planned. In which one is the normal approximation justified?
Answer: A
Why: Five hundred times 0.02 is 10 and five hundred times 0.98 is 490, both above five. In the other three the smaller product is 2, 1.8 and 4, all below five.
\[ 500(0.02) = 10, \quad 500(0.98) = 490 \]
The correct one is also the one with the rarest claim, 2 percent. A rare claim is testable with a normal curve, but only with a large sample: here 500, double the minimum of 250 that five divided by 0.02 gives.
The narrow failure is worth a second look: 4 is not above 5, and the rule is a strict inequality. Treat a borderline case with suspicion and reach for the exact binomial.
Check
Think about which assumption the central limit theorem speaks to, and which it cannot.
A large n changes the distribution of the sample mean. It does not change who was in the sample.
Check your understanding
A t-test of a population mean uses 400 responses to an online poll that anyone could answer. The responses are strongly skewed. Which statement is correct?
Answer: A
Why: Four hundred values are plenty for the central limit theorem to make the sample mean nearly normal despite the skew. But an online poll anyone can answer is not a simple random sample, and its bias does not shrink as the number of responses grows.
This is the one-line summary of Part 2: a large sample relieves normality; it never relieves biased sampling. The book's parenthetical says the first half, and its insistence on a simple random sample in every case says the second.
In context: this poll's mean could be measured very precisely and still be wrong about the population, because the people who chose to answer are not a random slice of it.
Explain it to yourself
The section's table has one t among three rows. Explaining why in your own words is the best test of whether the table has turned into understanding.
Discussion prompt
In two or three sentences, explain why a test of a mean with sigma unknown uses Student's t distribution, while a test of a mean with sigma known and a test of a proportion both use a normal.
A strong answer names the estimated standard deviation as the reason, not the sample size. A very strong one adds the consequence: replacing a t with a normal shrinks every tail area, so the p-value comes out too small.
If your answer mentioned small samples as the reason for the t, look back at Exercise 9's 75 recipients. A large sample with an estimated σ is still a t.
Exit ticket
Three short studies. For each, name the curve, write it with its numbers, and run the one check that matters most.
Discussion prompt
(1) A claim that 30 percent of commuters cycle, tested with 25 random commuters. (2) A claim that a battery lasts 20 hours, tested with 16 batteries, mean 19.1, s = 2.4, lifetimes believed normal. (3) A claim that bags weigh 500 grams, with a known sigma of 4 grams and 9 bags averaging 497 grams.
If you wrote a t for the bags, look again at where the 4 grams came from: it is given as known. If you checked only one product for the commuters, compute the other: both clear five here, but the habit of checking both is what saves you on the next one.
All three studies need the same unstated assumption, that the units were sampled at random. None of the arithmetic above can check it.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467
Recap
Every hypothesis test measures the sample statistic against its distribution under the null hypothesis. Section 9.3 says which distribution, and what must be true for it to tell the truth.
| test | curve | centre and spread | assumptions |
|---|---|---|---|
| mean, σ known | normal (z-test) | μ₀, σ/√n | SRS; normal population or large n |
| mean, σ unknown | Student's t, df = n − 1 | μ₀, s/√n | SRS; normal population or large n |
| proportion | normal | p₀, √(p₀q₀/n) | SRS; binomial conditions; n·p₀ > 5 and n·q₀ > 5 |
Two questions pick the row: is it a mean or a proportion, and for a mean, was σ known from outside the sample? The sample size never picks the row. It enters through the degrees of freedom, the central limit theorem, and the np and nq check, which always uses the null value of p and always checks both products.
A large sample relieves the normality assumption and never relieves biased sampling. And using a normal where a t belongs always makes the p-value too small. Section 9.4 now uses these curves to compute p-values and make decisions; the Introductory Business Statistics text covers the same table in its own §9.3, in business settings.
OpenStax Introductory Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3, pp. 466-467 — the whole section
OpenStax Introductory Business Statistics 2e, §9.3 Probability Distribution Needed for Hypothesis Testing §9.3 Probability Distribution Needed for Hypothesis Testing — the same table in business contexts
Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.