Chapter 8 asked which values of a parameter the data supports. Chapter 9 starts from a specific claim about the parameter and asks whether the data are consistent with it, and the whole apparatus rests on stating two contradictory hypotheses correctly before any arithmetic begins. The null hypothesis is a statement of no difference, often the status quo, and always contains a symbol with an equal in it. The alternative hypothesis contradicts it, never contains an equal sign, and is usually what the researcher is trying to show. Because the two are contradictory, evidence in the form of sample data can support one over the other, and the decision is always either to reject the null hypothesis or to decline to reject it. It is never to accept the null, because failing to find evidence against a claim is not evidence for it.
Subject: Statistics · 68 slides · symbolic lesson
Open the interactive version of this deck
Title
Statistics · Chapter 9 — Hypothesis Testing with One Sample
Two contradictory claims, set up before any arithmetic, and the only two decisions a test can make
Objectives
Chapter 8 estimated an unknown parameter with an interval. Chapter 9 starts from a claim about that parameter, such as an average of 35 miles per gallon, and asks whether a sample is consistent with it. Every test in the chapter begins with the same step: two hypotheses written correctly.
There is almost no arithmetic in this section, and that is exactly why it is easy to rush. A test with its hypotheses the wrong way round produces a confident, correct calculation of the wrong thing, and nothing later in the procedure warns you.
So the habits built here, reading the direction word, writing the alternative first and checking that the pair splits every possible value, are the ones every later section leans on.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — the section this deck covers
Warm-up
Chapter 8 gave you confidence intervals: a range of values for a parameter that the sample makes plausible. Use one to judge a claim.
Discussion prompt
A sample of 50 eighth graders has mean height 65.1 inches and standard deviation 2.8 inches. The 95 percent confidence interval for the mean height is about 64.30 to 65.90 inches. Someone claims the mean height of all eighth graders is 66 inches. Is the claim believable, and how sure can you be?
Figure (svg): A number line from 63.5 to 66.5 inches. A blue bar marks the 95 percent confidence interval from 64.30 to 65.90 with the sample mean 65.1 as a dot inside it. A dashed yellow line at 66, labelled claim, sits just to the right of the bar's end.
That last point is the gap this chapter fills. Inside or outside the interval is a yes-or-no picture; a hypothesis test asks the sharper question of how surprising this sample would be if the claim were true. Before that question can be asked, the claim has to be written down precisely, which is this section.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §8.2, pp. 416-420 — the confidence interval for a mean
Section
Part 1
Concept
The chapter opens with three claims. A car dealer advertises that its new small truck gets 35 miles per gallon on average. A tutoring service claims its method helps 90 percent of its students get an A or a B. A company says its women managers earn an average of 60,000 dollars a year.
Each claim names a population parameter and a value for it. Two are means and one is a proportion:
\[ \mu = 35 \text{ mpg}, \qquad p = 0.90, \qquad \mu = 60{,}000 \text{ dollars} \]
A confidence interval would estimate each parameter without caring what anyone claimed. A hypothesis test does something different: it takes the claim seriously, collects a sample, and decides whether the sample gives sufficient evidence to reject it.
hypothesis test — A procedure that sets up two contradictory statements about a population parameter, collects sample data, and decides whether the data give sufficient evidence to reject the first statement, the null hypothesis.
The three claims also show what the test needs from you before any data arrive: which parameter, mean or proportion; which value, 35 or 0.90 or 60,000; and which direction the person testing cares about. The rest of this lesson is about getting those three right.
Notice the word sufficient. A test never asks whether the claim is true; nobody can see the whole population. It asks whether the sample is strong enough evidence against the claim. That shift in wording runs through the whole chapter.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, p. 461 — the truck, the tutoring service and the managers' pay
Concept
The book lays a hypothesis test out as five steps. You will meet all five in this chapter, but the first decides whether the other four mean anything.
Figure (svg): A flow diagram of five boxes joined by arrows. Box 1: set up two contradictory hypotheses. Box 2: collect sample data. Box 3: choose the distribution. Box 4: calculate. Box 5: decide and conclude. Box 1 is outlined in yellow and labelled this section.
Steps 3 and 4 are mechanical once you know the material of Chapters 6 to 8. Step 5 is a sentence about the population, in context. Step 1 is the only one that needs no arithmetic and the one most often done carelessly, because it looks like reading rather than mathematics.
Here is why it matters so much: the calculation in step 4 assumes the null hypothesis is true and works out what the sample should look like. If the wrong statement sits in the null, the calculation assumes the wrong thing.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, pp. 461-462 — the five steps
Concept
A test begins with two hypotheses containing opposing viewpoints. They get names and symbols, and you will write them hundreds of times this term.
null hypothesis, H0 — A statement of no difference: the variables are not related, nothing has changed, the parameter has its stated value. It can often be considered the status quo.
alternative hypothesis, Ha — A claim about the population that contradicts H0. It is what you conclude when you reject H0, and it is usually what the researcher is trying to show.
An everyday example helps. A smoke alarm assumes there is no fire, the null, and sounds only when the smoke it samples would be surprising without one. Silence does not prove the house is safe; it means the alarm has not detected enough evidence of fire.
Read the subscript on the null as a zero, nought: H-nought, the hypothesis of zero difference. The alternative's subscript is a lower-case a. Some books write H1 for the alternative; it means the same thing.
\[ H_0: \text{ no difference} \qquad H_a: \text{ a difference} \]
The two are not on an equal footing. The null is assumed while the test runs, the way a default setting is assumed until someone changes it. The alternative has to earn its place: only evidence in the sample can move you to it.
That asymmetry is deliberate, and it is the reason the decisions at the end of the test have the strange-sounding names they do.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the definitions of H0 and Ha
Notation
A hypothesis in symbols has three parts, and each one is a decision you make from the wording. Hover over each piece of the book's Example 9.2.
Annotate
On: \( H_0: \mu = 2.0 \qquad H_a: \mu \ne 2.0 \)
Say a hypothesis aloud in words before you trust it: the mean GPA of all American college students equals 2.0, against: it does not equal 2.0. If the spoken version is not the claim in the problem, one of the three parts is wrong.
Notice the number is the same in both. A pair such as mu equals 2.0 against mu greater than 2.5 does not contradict itself, because a mean of 2.2 satisfies neither statement.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Example 9.2
Picture it
The best picture of a hypothesis test is a criminal trial. The defendant is presumed innocent; that is the null. The prosecution must bring evidence strong enough to overturn the presumption; that is the sample.
Figure (svg): A diagram in two rows. Top row, the courtroom: presumed innocent, then evidence, then two verdicts, guilty or not guilty; a third verdict, innocent, is crossed out in red. Bottom row, the test: assume the null, then sample data, then two decisions, reject the null or do not reject the null; a third, accept the null, is crossed out in red.
The match between the two rows is close. Presumed innocent is the null; the evidence is the sample; guilty is reject the null; not guilty is do not reject. Even the standard of proof has a counterpart: beyond reasonable doubt becomes a small chance of being fooled by a fluke sample, the subject of Section 9.2.
Look at the verdicts. A jury can say guilty, or not guilty. It never says innocent, because a weak case for the prosecution does not prove the defendant did nothing; it only means guilt was not shown beyond reasonable doubt.
A hypothesis test has the same two verdicts and the same missing third one. You either reject the null hypothesis, or you do not reject it. You never accept it, because data that fail to contradict a claim are not data that prove it.
The analogy also explains which statement is which. The defendant does not have to prove innocence; the burden is on the side making the accusation. In a test the burden is on the alternative, which is why it is the claim that has to be shown, and the null is what stands until then.
Intuition
It can feel backwards that the thing a researcher believes goes in the alternative, the hypothesis that is not assumed. Think about what each placement would let a researcher get away with.
Suppose a drug company put its claim, the drug lowers blood pressure, in the null. The test would assume the drug works, and only strong evidence of failure could dislodge that. A small, sloppy trial would almost never produce such evidence, so the company would almost always keep its claim. Weak data would favour whoever wrote the null.
\[ \text{claim in } H_0 \;\Rightarrow\; \text{weak data keep the claim} \]
\[ \text{claim in } H_a \;\Rightarrow\; \text{only strong data establish the claim} \]
Putting the claim in the alternative reverses that. The drug is assumed to make no difference, and only data that would be surprising under no difference can establish the claim. A small, sloppy trial establishes nothing, which is exactly what it deserves.
So the placement is a matter of fairness. Whoever wants to change what people believe carries the burden of producing evidence, and the null protects the status quo until they do. That is why the book describes the alternative as usually what the researcher is trying to prove.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — this is usually what the researcher is trying to prove
Worked example
The chapter's opening photograph is a Dalmatian, with a breeder's claim that every Dalmatian has 35 spots. A skeptical buyer wants to test whether the average number of spots differs from 35. Write the hypotheses.
The plan is the same for every problem in this section: find the parameter, find the value, read the direction, then write the pair and check it. Only the last two moves involve symbols.
Name the parameter
Why: the claim is about how many spots Dalmatians have, a count averaged over all Dalmatians, so it is a population mean.
\[ \mu = \text{mean number of spots on all Dalmatians} \]
Read off the value under test
Why: the breeder's number.
\[ 35 \text{ spots} \]
Read the direction
Why: differs from allows too many or too few, so neither side is singled out.
\[ \text{differs} \;\Rightarrow\; \ne \]
Write the alternative
Why: the buyer's suspicion, with the strict relation.
\[ H_a: \mu \ne 35 \]
Write the null as its contradiction
Why: the breeder's claim, with the equality.
\[ H_0: \mu = 35 \]
One subtlety. The breeder said every Dalmatian has 35 spots, a claim about each dog. A test of a mean checks only the average. A population averaging 35 could contain dogs with 20 and dogs with 50, so even a sample that fits the null would not support the word every.
Check the pair splits every possible mean
Why: any mean is either exactly 35 or not 35, never both and never neither.
\[ \mu = 35 \;\text{ or }\; \mu \ne 35 \quad \text{(exactly one holds)} \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, p. 461 — Figure 9.1, the Dalmatian breeder's claim
Sorting
Before symbols, practise hearing which statement is the default and which one somebody is trying to show. The default, where nothing has changed and nothing is different, is the null.
Sort into buckets
Sort each statement by the hypothesis it would be in a test.
One more test helps with borderline statements: try to write each with an equals sign. The fertiliser statement becomes mean yield with fertiliser equals mean yield without; the defective-chip statement becomes p equals 0.02. Lowers, more than and has changed cannot be written that way at all.
Listen for the verbs. Makes no difference, is still and lands half the time describe the world staying as it was. Lowers, more than and has changed describe a departure from it. The departure is what needs evidence, so it goes in the alternative.
The coin is the example to remember. A fair coin is the default assumption, and you would need data to claim it is biased. The null is not the boring hypothesis because it is unimportant; it is the one assumed until data say otherwise.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the definitions of H0 and Ha
Prediction
The book insists the null and alternative are contradictory: exactly one of them is true. Commit to the reason before you read on.
Predict first
Why must the null and alternative hypotheses contradict each other?
Correct: So that evidence against one is evidence for the other
Why: If exactly one of the two is true, then data that make the null implausible make the alternative the only option left. With a gap or an overlap, rejecting the null would not tell you anything about the alternative.
Picture what goes wrong without it. Suppose the null said the mean is 2.0 and the alternative said the mean is above 2.5. Data showing the mean is not 2.0 would leave you stranded, because a mean of 2.2 fits neither. Rejecting one statement only lands you on the other when nothing lies between them.
So contradicting is not a matter of style. It is what lets a test that only ever argues against the null end with a conclusion about the alternative.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — since the null and alternative hypotheses are contradictory
Worked example
A car dealer advertises that its new small truck averages 35 miles per gallon. A consumer group suspects the true average is lower and plans to test the advertisement. Write the hypotheses the consumer group would test.
The person running the test decides the direction, because the alternative is what they are trying to show. Here that is the consumer group, and it suspects the trucks fall short.
Name the parameter
Why: fuel economy averaged over all trucks of this model.
\[ \mu = \text{mean mpg of all the new trucks} \]
Read off the value under test
Why: the advertised figure.
\[ 35 \text{ mpg} \]
Read the direction
Why: the group suspects lower, which points one way.
\[ \text{lower} \;\Rightarrow\; < \]
Write the alternative
Why: the group's suspicion, strict.
\[ H_a: \mu < 35 \]
Write the null as the exact complement
Why: everything not below 35: 35 itself and everything above.
\[ H_0: \mu \ge 35 \]
Read the null in words: the trucks average at least 35 miles per gallon, which is the dealer's claim, generously read. A truck averaging 38 would not bother the consumer group, so it belongs with the dealer.
Check against the symbol rule and the split
Why: the equality sits in the null, and every mean is either below 35 or at least 35.
\[ \mu < 35 \;\text{ or }\; \mu \ge 35 \quad \text{(exactly one holds)} \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, p. 461 — the car dealer's claim
Section
Part 2
Concept
The book compresses the whole of Part 2 into one table and one sentence. The table pairs each relation that may appear in the null with the one that must face it in the alternative.
| in H0 | in Ha | the alternative says |
|---|---|---|
| equal (=) | not equal (≠) | different, in either direction |
| greater than or equal to (≥) | less than (<) | smaller |
| less than or equal to (≤) | greater than (>) | larger |
The book's sentence is the rule to memorise: H0 always has a symbol with an equal in it, and Ha never has a symbol with an equal in it.
\[ H_0 : \; = \;\text{ or }\; \ge \;\text{ or }\; \le \qquad H_a : \; \ne \;\text{ or }\; < \;\text{ or }\; > \]
Each row of the table is a contradictory pair: at least is exactly not less than, and at most is exactly not greater than. So once you have chosen the alternative's symbol, the null's is forced. You only ever make one choice, and you make it from the wording.
The book adds that the choice of symbol depends on the wording of the test. Part 3 is about reading that wording.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Table 9.1 and the note beneath it
Picture it
Each row of Table 9.1 splits the number line into two pieces, one for each hypothesis. Here are the three rows, with c standing for the value under test.
Figure (svg): Three stacked number lines, each with a boundary value c. Top: the null is the single point c, filled; the alternative is everything else, two orange rays with a hole at c. Middle: the null is c and everything above it; the alternative is everything below, with a hole at c. Bottom: the null is c and everything below; the alternative is everything above, with a hole at c.
Find the filled dot in each row. It always sits on the null's band, because the boundary value c itself is part of the null. The alternative's band always has a hole at c: it gets arbitrarily close but never includes it. That hole is the rule that the alternative never has an equal sign.
Now check the coverage. In every row, every point on the line is covered by exactly one band: no gaps, no overlaps. That is what contradictory means, drawn. When you write a pair, imagine this picture and ask whether some value belongs to neither band, or to both.
The names on the left are worth learning too. A not-equal alternative is two-sided, because evidence in either direction counts against the null. The other two are one-sided, and the side is the side the alternative points to.
Intuition
The rule can look arbitrary, as if the authors had flipped a coin. It is not. It comes from what step 4 of the test has to do.
Step 4 assumes the null is true and asks how surprising the sample would be. To work out how surprising, you need one definite distribution, and a definite distribution needs one definite value of the parameter.
\[ H_0: \mu = 2.0 \;\Rightarrow\; \text{compute as if } \mu = 2.0 \]
\[ H_a: \mu \ne 2.0 \;\Rightarrow\; \text{which value? } 1.9,\; 2.3,\; 2.0001,\; \dots \]
An equality hands you that value. A strict inequality cannot: the alternative mu not equal to 2.0 contains infinitely many means and no single one to compute with. So the hypothesis that is assumed must be the one with the equal sign.
For a one-sided null such as mu at least 5, the value used is the boundary, 5. Part 5 shows with real numbers why the boundary is the right choice: it is the value in the null that is hardest to reject, so beating it beats every other value in the null as well.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — H0 always has a symbol with an equal in it
Worked example
Test whether more than 30 percent of the registered voters in Santa Clara County voted in the primary election. State the null and alternative hypotheses.
Name the parameter
Why: voted or did not is a yes-or-no for each voter, so the parameter is a proportion.
\[ p = \text{proportion of registered voters who voted} \]
Write 30 percent as a decimal
Why: a proportion lives between 0 and 1.
\[ 30\% = 0.30 \]
Read the direction
Why: more than points one way, upward.
\[ \text{more than} \;\Rightarrow\; > \]
Write the alternative
Why: the claim to be tested, strict.
\[ H_a: p > 0.30 \]
Write the null as its complement
Why: no more than 30 percent: 0.30 itself and everything below.
\[ H_0: p \le 0.30 \]
Figure (svg): A number line for the proportion p from 0 to 0.6, with 0.30 marked. A thick cyan band labelled H0, p at most 0.30, runs from 0 up to 0.30 and ends in a filled dot. A thick orange band below it labelled Ha, p greater than 0.30, starts at 0.30 with an open circle and runs to the right.
In words: the null says no more than 30 percent of registered voters voted; the alternative says more than 30 percent did. The book's own wording uses exactly these phrases, and no more than is the everyday form of at most.
Check, and correct a misprint
Why: the book prints the alternative as p greater than 30, which no proportion can be; with the null's 0.30 beside it, the intended value is 0.30, and the pair then splits every proportion exactly.
\[ p \le 0.30 \;\text{ or }\; p > 0.30 \quad \text{(exactly one holds)} \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Example 9.1
Worked example
A magazine article stated that 6.6 percent of U.S. students take advanced placement exams and 4.4 percent pass. Test if the percentage of U.S. students who take advanced placement exams is more than 6.6 percent. State the null and alternative hypotheses.
The article gives two numbers. Only one of them is the subject of the test, so the first job is to read which.
Find which number is under test
Why: the question asks about taking the exams, not passing them.
\[ 6.6\% \text{ take the exams} \quad (\text{the } 4.4\% \text{ is not used}) \]
Name the parameter
Why: takes an AP exam or not is a yes-or-no per student.
\[ p = \text{proportion of U.S. students who take AP exams} \]
Convert the percentage
Why: move the decimal point two places; 6.6 percent is not 0.66.
\[ 6.6\% = 0.066 \]
Write the alternative
Why: more than, strict.
\[ H_a: p > 0.066 \]
Write the null
Why: the complement: at most 0.066.
\[ H_0: p \le 0.066 \]
The second number in the article, 4.4 percent passing, would need a test of its own with its own pair of hypotheses. One test asks one question about one parameter; when a problem quotes several figures, find the one the question is actually about.
The decimal conversion is where this example is usually lost. Six point six percent is six point six hundredths, 0.066. Writing 0.66 claims two thirds of all students take AP exams, a different and absurd hypothesis, and every later calculation would test that instead.
Check the conversion and the split
Why: multiply back by 100 to recover the percentage, and confirm every proportion is either at most 0.066 or above it.
\[ 0.066 \times 100 = 6.6\% \quad \checkmark \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Example 9.4
Fill the middle
On a state driver's test, about 40 percent pass on the first try. We want to test if more than 40 percent pass on the first try. Fill in the relation in each hypothesis.
Decide the alternative first from the words more than; then the null's symbol is forced by Table 9.1. Type the relation as you would on a keyboard: an equals sign, or a symbol such as > or <=.
Fill in the blanks
H_0: p \le 0.40 \qquad H_a: p > 0.40
Why: More than 40 percent is a strict, upward claim, so the alternative is p greater than 0.40. The null is everything else: p at most 0.40, with the equal sign. Passing or failing is a yes-or-no per person, so the parameter is a proportion.
This is the same shape as Example 9.1 and Example 9.4: a more-than claim about a proportion. Three examples, one pattern, and the only thing that changed was the number. That is the point of the symbol rule: the decision is made by the wording, not by the subject matter.
You will see this driver's test again in Part 5, with sample data, to watch the two possible decisions happen.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Try It 9.4
Trap
For Try It 9.4, a first attempt reasons that the opposite of at most is at least, and writes:
\[ H_0: p \le 0.40 \]
\[ H_a: p \ge 0.40 \]
Wrong. The value 0.40 is now in both hypotheses.
Both hypotheses would be true for a pass rate of exactly 40 percent, so the pair does not contradict.
The opposite of at most 0.40 is more than 0.40, strictly. A pass rate of exactly 40 percent satisfies at most, so it cannot also satisfy the alternative.
\[ H_0: p \le 0.40 \]
\[ H_a: p > 0.40 \]
The symbol rule catches it instantly: an alternative may never contain an equal sign, and greater than or equal to does. Fix the alternative and the overlap disappears.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Ha never has a symbol with an equal in it
Counterexample
Both pairs below look reasonable at a glance, and both are wrong. Each fails at exactly one value, which is why they slip through.
Figure (svg): Two number lines for p from 0.1 to 0.5. Top: the null p less than 0.30 and the alternative p greater than 0.30, both with open circles at 0.30, and a red dashed ring round 0.30 labelled belongs to neither. Bottom: the null p at most 0.30 and the alternative p at least 0.30, both with filled dots at 0.30, and a red ring labelled belongs to both.
Discussion prompt
Name the value each broken pair mishandles, say what goes wrong there, and repair each pair for a test of whether more than 30 percent voted.
Notice that the troublesome value is always the boundary, the number from the problem. That is no accident: away from the boundary every pair with sensible directions is fine. So checking a pair takes one question, asked about one number: which hypothesis does the boundary value belong to? The answer must be the null, and only the null.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Table 9.1
Discrimination
Use the symbol rule alone, with no context. A statement with an equal in it can only be a null; a strict relation can only be an alternative. Some statements are neither, for a reason that has nothing to do with the symbol.
Sort into buckets
Sort each statement by the hypothesis it could be.
The last two statements have perfectly legal symbols and are still not hypotheses. A hypothesis is a claim about an unknown population parameter, mu or p. The sample mean and sample proportion are calculated from data; you know them exactly. Part 4 returns to this, because it is one of the commonest errors on homework.
Notice too that one statement can belong to several tests. A null of mu at most 45 pairs with an alternative of mu greater than 45, and mu less than 45 pairs with mu at least 45: the rule says which side each can be on, not which test it came from.
Concept
The book adds a note that matters as soon as you read anything outside it. Many researchers, including one of the book's authors, write a plain equals sign in the null even when the alternative is one-sided.
\[ \text{book's table: } H_0: \mu \ge 5, \quad H_a: \mu < 5 \]
\[ \text{common practice: } H_0: \mu = 5, \quad H_a: \mu < 5 \]
The book calls this acceptable because the test only ever decides whether to reject the null or not, and both versions lead to the same calculation. As the earlier intuition slide showed, a one-sided null is computed at its boundary value anyway, so the arithmetic for mu at least 5 is the arithmetic for mu equals 5.
The cost of the shortcut is that the pair no longer splits the number line: a mean of 6 satisfies neither mu equals 5 nor mu less than 5. That is harmless for the decision, but it hides the logic, which is why this deck, like the book's table, writes the full complement.
So when you read a paper or another textbook that writes an equals sign in a one-sided null, do not mark it wrong. Read it as at most or at least, pointed away from the alternative.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the note on researchers who use = in H0
Error analysis
Four students wrote hypotheses for the claim that more than 30 percent of registered voters voted. Only one attempt is correct. Hover over each note to see what the other three did.
Annotate
On: \( \begin{aligned} &(1)\; H_0: p > 0.30,\; H_a: p \le 0.30 \\ &(2)\; H_0: \hat{p} \le 0.30,\; H_a: \hat{p} > 0.30 \\ &(3)\; H_0: p \le 30,\; H_a: p > 30 \\ &(4)\; H_0: p \le 0.30,\; H_a: p > 0.30 \end{aligned} \)
Attempts 2 and 3 are the dangerous ones, because their symbols pass the equal-sign check. Each needs a different question: is this a parameter, and is the number on the right scale? Asking all three questions every time takes a few seconds and catches all three errors.
Attempt 1 deserves a second look too. It is not just untidy; it reverses the burden of proof, so the voters' claim would be assumed and the skeptic would have to disprove it.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Example 9.1
Section
Part 3
Concept
The wording of a problem describes the alternative directly: more than, less than, different from. The null is described only indirectly, as whatever the alternative is not. So write the alternative first, then the null by complement.
| the wording says | Ha uses | so H0 uses |
|---|---|---|
| more than, greater than, above, exceeds, increased | > | ≤ |
| less than, fewer than, below, decreased, under | < | ≥ |
| different from, changed, not equal, differs | ≠ | = |
The procedure, in order, for every problem in this section and the rest of the chapter:
Working the other way, null first, means finding the complement of a sentence before you have it in symbols, which is where at least and more than get confused.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — the choice of symbol depends on the wording
Worked example
We want to test whether the mean GPA of students in American colleges is different from 2.0, out of 4.0. State the null and alternative hypotheses.
Name the parameter
Why: a GPA is a number per student, averaged over all students.
\[ \mu = \text{mean GPA of all American college students} \]
Read off the value
Why: the GPA in the question; the 4.0 is only the scale.
\[ 2.0 \]
Read the direction
Why: different from does not say higher or lower.
\[ \text{different from} \;\Rightarrow\; \ne \]
Write the alternative
Why: not equal, two-sided.
\[ H_a: \mu \ne 2.0 \]
Write the null
Why: the only statement that contradicts not equal is equal.
\[ H_0: \mu = 2.0 \]
Why not a one-sided pair here? The question gives no reason to expect a higher or a lower GPA; different from is neutral. Picking a direction the question did not name would quietly change the question, and the test would then be blind to departures on the side you left out.
Figure (svg): A number line for the mean GPA from 0 to 4 with 2.0 marked. The null, mu equals 2.0, is a single filled cyan dot at 2.0. The alternative, mu not equal to 2.0, is two orange rays, one from 0 up to 2.0 and one from 2.0 to 4, each with a hole at 2.0.
This is the only shape where the null is a single point. Everything else on the line, both above and below 2.0, is the alternative, which is why a two-sided test will later look for surprises in both tails of a distribution.
Check the pair against the picture
Why: the filled dot is in the null alone, and every other mean lies on one of the two orange rays.
\[ \mu = 2.0 \;\text{ or }\; \mu \ne 2.0 \quad \text{(exactly one holds)} \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Example 9.2
Worked example
We want to test whether the mean height of eighth graders is 66 inches. Fill in the correct symbol for the null and alternative hypotheses.
This wording is the one that confuses people: it states a value rather than a direction. There is no more than or less than anywhere, only is.
Name the parameter
Why: height measured per student, averaged.
\[ \mu = \text{mean height of all eighth graders, in inches} \]
Read the direction
Why: is 66 is a claim of equality, and an equality can only live in the null.
\[ \text{is } 66 \;\Rightarrow\; H_0: \mu = 66 \]
Write the alternative as its contradiction
Why: everything other than 66, both sides.
\[ H_a: \mu \ne 66 \]
So a question asking whether something is a value produces the same two-sided pair as one asking whether it is different from that value. In both cases the test can only ever produce evidence that the mean is not 66; it can never show that it is.
Compare the warm-up. The interval 64.30 to 65.90 did not contain 66, so it suggested the mean differs from 66. A test of exactly this pair is the formal version of that judgement.
Check with the symbol rule
Why: the equal sign is in the null, the alternative is strict, and 66 belongs to the null alone.
\[ H_0: \mu = 66 \qquad H_a: \mu \ne 66 \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Try It 9.2
Worked example
We want to test if college students take less than five years to graduate from college, on the average. State the null and alternative hypotheses.
Name the parameter
Why: on the average signals a mean, of time to graduate.
\[ \mu = \text{mean time to graduate, in years} \]
Read off the value
Why: five years.
\[ 5 \]
Read the direction
Why: less than points one way, downward.
\[ \text{less than} \;\Rightarrow\; < \]
Write the alternative
Why: strict.
\[ H_a: \mu < 5 \]
Write the null as the exact complement
Why: not less than five means five or more.
\[ H_0: \mu \ge 5 \]
Figure (svg): A number line for the mean years to graduate from 3 to 7 with 5 marked. The null, mu at least 5, is a cyan band from 5 to the right with a filled dot at 5. The alternative, mu less than 5, is an orange band from 3 up to 5 with a hole at 5.
The complement is the step to slow down for. The opposite of less than 5 is not more than 5: that would leave out 5 itself. It is at least 5. Say it aloud: students take five years or more, on average. Five years exactly is not less than five, so it must sit in the null.
Check the boundary
Why: substitute the value 5 into each hypothesis; it must satisfy the null and fail the alternative.
\[ 5 \ge 5 \;\text{ true}, \qquad 5 < 5 \;\text{ false} \quad \checkmark \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Example 9.3
Worked example
We want to test if it takes fewer than 45 minutes to teach a lesson plan. Fill in the correct symbol for the null and alternative hypotheses.
Name the parameter
Why: a time per lesson, averaged over all the times it is taught.
\[ \mu = \text{mean time to teach the lesson plan, in minutes} \]
Read the direction
Why: fewer than is less than, strictly.
\[ \text{fewer than} \;\Rightarrow\; < \]
Write the alternative
Why: the claim.
\[ H_a: \mu < 45 \]
Write the null
Why: the complement, at least 45.
\[ H_0: \mu \ge 45 \]
Who might run this test? A department head who has been told the lesson takes 45 minutes and suspects it is shorter would. The suspicion is the alternative; the figure she was told, read generously as 45 or more, is the null.
Fewer is ordinarily used for things you count, but the direction is what matters here, not the grammar. Fewer than, less than, under, below and shorter than all produce the same less-than alternative.
Same shape as Example 9.3, a less-than claim about a mean. Notice the null in words: it takes 45 minutes or more on average. A teacher who suspects the plan runs short is the one who has to produce the evidence.
Check the boundary
Why: 45 must satisfy the null and fail the alternative.
\[ 45 \ge 45 \;\text{ true}, \qquad 45 < 45 \;\text{ false} \quad \checkmark \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Try It 9.3
Matching
Match each phrase from a problem to the alternative it produces. Watch for the two phrases that contain an equality: they cannot be alternatives at all, so they tell you about the null instead.
Match the pairs
Why: Exceeds, under and changed are strict claims and go straight into the alternative. At least and no more than carry an equality, so they are nulls; the alternative is their complement, below 30 and above 25 percent respectively.
The last two are the ones to practise. A manufacturer's claim that bulbs last at least 1,000 hours is an at-least statement. It cannot be the alternative, because the alternative never carries an equal sign. It becomes the null, and the alternative is that they last less than 1,000 hours, the challenge to the claim.
The rule of thumb: if the claim you are given contains or implies an equal sign, it is the null and you are testing against it; if it is strict, it is the alternative and you are testing for it.
Trap
A manufacturer claims its bulbs last at least 1,000 hours on average. A first attempt puts the claim in the alternative:
\[ H_a: \mu \ge 1000 \]
\[ H_0: \mu < 1000 \]
Wrong. The alternative carries an equal sign.
The instinct is understandable: the claim is the interesting statement, so it feels like the alternative.
At least includes 1,000 itself, so it is a null-shaped statement. The test asks whether the data contradict the manufacturer, so the challenge is the alternative.
\[ H_0: \mu \ge 1000 \]
\[ H_a: \mu < 1000 \]
Read it aloud: assume the bulbs keep the promise; look for evidence that they fall short. That is how a consumer agency would test an advertised minimum.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Table 9.1
Concept
Every pair you write is one of three shapes, and the shape is fixed by the question, not by the sample. The book's examples cover all three:
| question asked | shape | book's example |
|---|---|---|
| is it different? has it changed? | two-sided: Ha has ≠ | Example 9.2, GPA |
| is it less? has it fallen? | left-sided: Ha has < | Example 9.3, graduation |
| is it more? has it risen? | right-sided: Ha has > | Examples 9.1 and 9.4 |
A two-sided alternative counts a surprise in either direction as evidence. A one-sided alternative counts only one direction: for the graduation test, a sample averaging seven years is no evidence at all that students take less than five, however far from five it is.
\[ H_a: \mu < 5 \quad \text{and } \bar{x} = 7 \;\Rightarrow\; \text{no evidence for } H_a \]
That is why the shape must be chosen before you look at the data. If you peeked first and then pointed the alternative the way the sample happened to go, every departure would look like evidence, and the test would reject far too often. Later sections put a number on how much too often.
When a problem gives no direction at all, as in whether the mean height is 66, use two sides. One side is only right when the question itself names a direction.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Examples 9.2-9.4
Worked example
A medical trial is conducted to test whether or not a new medicine reduces cholesterol by 25 percent. State the null and alternative hypotheses.
This one breaks the habit that the researcher's claim goes in the alternative. Look at the claim's shape before deciding where it goes.
Name the quantity
Why: each patient's cholesterol falls by some percentage; the claim is about the average fall.
\[ \mu = \text{mean percent reduction in cholesterol} \]
Read the claim's shape
Why: reduces by 25 percent is an exact value, an equality.
\[ \text{by } 25\% \;\Rightarrow\; = \]
An equality can only be the null
Why: so the claim being studied goes in H0.
\[ H_0: \mu = 25\% \]
Write the alternative
Why: whether or not points both ways: more or less than 25 percent.
\[ H_a: \mu \ne 25\% \]
The book's answer writes the same pair with the letter p, as p equals 0.25 against p not equal to 0.25. The shape is identical; this deck uses mu because a percentage reduction measured on each patient and then averaged is a mean, not a proportion of patients who have some property.
What can this test conclude? It can find evidence that the reduction is not 25 percent. It can never confirm that it is 25 percent, however good the data, because the claim sits in the null. If the company wants to show the medicine reduces cholesterol by more than some figure, it should test that more-than claim instead.
Check with the symbol rule
Why: the equal sign is in the null, and 25 percent belongs to the null alone.
\[ H_0: \mu = 25\% \qquad H_a: \mu \ne 25\% \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — Try It 9.1
Worked example
The chapter introduction quotes a tutoring service claiming its method helps 90 percent of its students get an A or a B. Write the hypotheses for two different people: a skeptical parent who suspects the true rate is lower, and the service itself, which wants to show it beats 90 percent.
Name the parameter
Why: an A or B, or not, for each student: a proportion.
\[ p = \text{proportion of the service's students who get an A or B} \]
The skeptic's alternative
Why: suspects lower.
\[ H_a: p < 0.90 \]
The skeptic's null
Why: the complement: the service's claim, at least 90 percent.
\[ H_0: p \ge 0.90 \]
The service's alternative
Why: wants to show more than 90 percent.
\[ H_a: p > 0.90 \]
The service's null
Why: the complement: at most 90 percent.
\[ H_0: p \le 0.90 \]
Figure (svg): Two number lines for p from 0.8 to 1 with 0.90 marked. Top, the skeptic's test: the null p at least 0.90 is cyan to the right of 0.90 with a filled dot; the alternative p less than 0.90 is orange to the left with a hole. Bottom, the service's own test: the null p at most 0.90 is cyan to the left; the alternative p greater than 0.90 is orange to the right.
The number never changed and neither did the parameter, yet the two tests are mirror images. Each person puts the thing they want to show in the alternative, so each carries the burden of proof for their own claim. The skeptic must find evidence of a shortfall; the service must find evidence of an excess.
Check both pairs at the boundary
Why: in each test, 0.90 must satisfy the null and fail the alternative.
\[ 0.90 \ge 0.90,\; 0.90 \not< 0.90 \qquad 0.90 \le 0.90,\; 0.90 \not> 0.90 \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, p. 461 — the tutoring service's claim
Estimation
Most wrong pairs in this section come from one step: writing the complement. Try it on the claim from Example 9.3 without looking back.
Predict first
What is the exact complement of the claim that a population mean is less than 5?
Correct: The mean is at least 5
Why: Every mean that is not less than 5 is either equal to 5 or bigger. More than 5 leaves 5 out, not 5 includes values below 5, and exactly 5 leaves out everything above it.
\[ \text{not } (\mu < 5) \;\iff\; \mu \ge 5 \]
Test the tempting answer, more than 5, on the boundary. Is a mean of exactly 5 less than 5? No. Is it more than 5? No. So with that pair the value 5 has no home, the gap from the broken-pairs slide.
A habit that makes this automatic: the complement of a strict symbol is the opposite symbol with a line under it. Less than becomes greater than or equal to; greater than becomes less than or equal to. The line underneath is the equal sign moving into the null.
Step zero
Real claims do not arrive as tidy test questions. Here is one from a newspaper: a city says that since the new bus lanes opened, commuters spend less time getting to work than the 34 minutes they averaged before.
Discussion prompt
Before writing any hypothesis, answer three questions: what is the parameter, what is the value under test, and what does the direction word say? Then write the pair.
The questions earn their keep on the population. The claim is about commuters after the change, not before; the 34 minutes is a fixed comparison value from the past, treated as known. A sample of commuters from before the lanes opened could not test this at all.
Notice also who carries the burden. The city wants credit for an improvement, so it has to show the mean dropped. Until then, the null says the lanes made no improvement, that the mean is still 34 minutes or more.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 464 — the Collaborative Exercise: write hypotheses from news articles
Section
Part 4
Concept
Every hypothesis is about a population parameter, and this chapter tests two kinds. A mean, mu, is the average of a quantity measured on each member of the population. A proportion, p, is the fraction of the population with some yes-or-no property.
\[ H_0: \mu = \mu_0 \quad \text{(a mean)} \qquad H_0: p = p_0 \quad \text{(a proportion)} \]
The zero subscripts mark the value under test, the number from the claim. Read mu-nought as the hypothesised mean and p-nought as the hypothesised proportion.
The choice is not cosmetic. It decides which distribution step 3 uses and which standard error step 4 computes: means will use the normal or Student's t distribution with standard error built from sigma or s, and proportions the normal with standard error built from p-nought.
The test for which you have is the one Section 8.3 used for confidence intervals. Ask what you would record for one member of the population. A number, such as years or inches or dollars, means a mean. A yes or a no, such as voted or took the exam, means a proportion, usually reported as a percentage.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — Examples 9.1 and 9.4 use p; Examples 9.2 and 9.3 use μ
Picture it
The quickest way to tell the two apart is to imagine the data sheet. Below on the left are twenty made-up graduation times, one number per student. On the right are the 500 students of a made-up AP sample, one yes or no each.
Figure (svg): Two panels. Left: a dot plot of 20 made-up graduation times between 4 and 7 years, stacked over a number line, with a dashed line at their mean, 5.18 years; titled measured, a mean. Right: a single bar split into 43 students who took an AP exam and 457 who did not, with p-hat equal to 0.086; titled counted, a proportion.
On the left, each dot is a measurement, and the natural summary is their average, here 5.18 years. A hypothesis about the population of all students' times is about mu. On the right, there is nothing to average except yes and no, and the natural summary is the fraction saying yes, 43 out of 500, or 0.086. A hypothesis about all students is about p.
Two traps hide in the wording. A percentage of students is a proportion, but a percentage change in each student's score is a measurement, so its average is a mean, as in Try It 9.1's cholesterol reduction. And a claim may not say average at all: take less than five years to graduate is about the typical time, a mean, even without the word.
Concept
Every hypothesis pair contains one number, the value under test, written mu-nought or p-nought. It never comes from the sample being tested. It comes from somewhere outside the data, and knowing where helps you find it in a long word problem.
\[ \mu_0, \; p_0 \;=\; \text{a number fixed before the sample is drawn} \]
A number computed from the sample, a sample mean or a sample proportion, never goes into a hypothesis. If a problem says a sample of 40 students had a mean GPA of 2.3, the 2.3 is evidence, used in step 4, and the 2.0 is the value under test.
Reading a problem with this in mind is quick: find the number that existed before anyone collected data. That is the value. Every other number in the problem, sample size, sample mean, standard deviation, belongs to the calculation, not the hypotheses.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — the values in Examples 9.1-9.4
Worked example
Go back to the four examples of the section and, for each, decide mean or proportion from what one person contributes. Then write the alternative with the right letter.
Example 9.1, voters
Why: each registered voter voted or did not: a yes or a no.
\[ \text{proportion: } H_a: p > 0.30 \]
Example 9.2, GPA
Why: each student has a GPA, a number.
\[ \text{mean: } H_a: \mu \ne 2.0 \]
Example 9.3, graduation
Why: each student takes some number of years; on the average confirms it.
\[ \text{mean: } H_a: \mu < 5 \]
Example 9.4, AP exams
Why: each student took an AP exam or did not.
\[ \text{proportion: } H_a: p > 0.066 \]
Two proportions and two means, and the giveaway each time was the unit. Examples 9.1 and 9.4 talk about percentages of people; Examples 9.2 and 9.3 talk about a GPA and a time, quantities with their own units.
A good second check: a proportion's value must lie between 0 and 1, while a mean's value carries units and can be any size the quantity allows. If you find yourself writing p equals 5 years, or mu equals 0.066 without units, the letter is wrong.
Check the scale of each value
Why: both proportions are between 0 and 1, and both means carry units.
\[ 0.30,\; 0.066 \in [0, 1] \qquad 2.0 \text{ GPA},\; 5 \text{ years} \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — Examples 9.1-9.4
Sorting
For each claim, picture the data one person contributes. A number per person points to mu; a yes or a no per person points to p.
Sort into buckets
Sort each claim by the parameter it is about.
The internet speed is also worth a second look. It is stated as exceeds 3, with no word average; but a speed is a number measured each time you test the connection, and a claim about the connection's typical speed is a claim about the mean of those numbers.
The cholesterol claim is the one that gets sorted wrongly, because it contains a percent sign. But 25 percent there is the size of each patient's reduction, a measurement, not the share of patients with some property. Compare fewer than 10 percent of adults, where the percentage really is a share of people.
Half the time for a coin is the same idea as 50 percent: each toss is heads or not, so the claim is p equals 0.5.
Trap
A sample of 40 students has a mean GPA of 2.3. Testing whether the mean GPA differs from 2.0, a first attempt writes:
\[ H_0: \bar{x} = 2.0 \]
\[ H_a: \bar{x} \ne 2.0 \]
Wrong. The sample mean is already known: it is 2.3.
The symbols are legal and the number is right; the letter is the problem.
There is nothing uncertain about x-bar once the data are in, so there is nothing to test. The question is about all American college students, whose mean is unknown.
\[ H_0: \mu = 2.0 \]
\[ H_a: \mu \ne 2.0 \]
The sample mean 2.3 is the evidence, used in step 4. The parameter mu is what the evidence is about. Hypotheses use Greek letters or p, never x-bar or p-hat.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Example 9.2
Worked example
Two claims of the kind the end-of-chapter exercises ask about. First: you are testing that the mean speed of your cable internet connection is more than three megabits per second. Second: a report says the American family has an average of two children, and you want to test it.
Run the same five moves on each, and notice that only the direction word differs in kind.
Internet: parameter and value
Why: a speed per measurement, averaged.
\[ \mu = \text{mean speed, Mbps}, \quad \mu_0 = 3 \]
Internet: alternative from more than
Why: strict, upward.
\[ H_a: \mu > 3 \]
Internet: null as complement
Why: at most 3.
\[ H_0: \mu \le 3 \]
Families: parameter and value
Why: children per family, averaged.
\[ \mu = \text{mean number of children per family}, \quad \mu_0 = 2 \]
Families: the claim is an equality
Why: has an average of two is the status quo and can only be the null.
\[ H_0: \mu = 2 \]
Families: alternative
Why: no direction given, so two-sided.
\[ H_a: \mu \ne 2 \]
Notice the families claim is the report's, and you are testing it, not trying to show it. When the given claim is an equality, the test is set up to look for evidence against it, in either direction unless the problem says otherwise.
Check each boundary
Why: 3 must satisfy only the internet null, and 2 only the families null.
\[ 3 \le 3 \text{ but not } 3 > 3 \qquad 2 = 2 \text{ but not } 2 \ne 2 \]
OpenStax Introductory Business Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1 Null and Alternative Hypotheses — the same rules applied to business claims
Worked example
The third claim from the chapter introduction: a company says its women managers earn an average of 60,000 dollars a year. An employee group suspects they earn less. Write the group's hypotheses, then say what changes if instead a journalist simply wants to know whether the figure is accurate.
Name the parameter
Why: a salary per manager, averaged over all the company's women managers.
\[ \mu = \text{mean annual pay of the women managers, dollars} \]
The group's alternative
Why: suspects less.
\[ H_a: \mu < 60{,}000 \]
The group's null
Why: the company's figure or more.
\[ H_0: \mu \ge 60{,}000 \]
The journalist's alternative
Why: accurate or not: two-sided.
\[ H_a: \mu \ne 60{,}000 \]
The journalist's null
Why: the figure exactly.
\[ H_0: \mu = 60{,}000 \]
The employee group's test can only ever find evidence of underpayment. If the managers in fact earn far more than 60,000 dollars, that test will not reject its null, because higher pay is part of the null. The journalist's two-sided test would notice a departure either way, at the price of needing stronger evidence in any one direction, as later sections show.
Choose the sidedness from the question, before seeing data. Choosing it after looking at which way the sample went is a way of cheating, and later sections explain why.
Check the units and the boundary
Why: the value carries dollars, so mu is right, and 60,000 sits in the null of both tests.
\[ 60{,}000 \ge 60{,}000 \qquad 60{,}000 = 60{,}000 \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9 Introduction, p. 461 — the managers' pay claim
Comparison
Fill in the blanks. For each claim decide the parameter's letter, then the two relations. Type a relation as you would on a keyboard: =, !=, <, >, <= or >=.
Comparison matrix
| claim to test | parameter | H0 | Ha |
|---|---|---|---|
| more than 30% of voters voted | p | p ≤ 0.30 | p > 0.30 |
| mean GPA differs from 2.0 | mu | μ = 2.0 | μ ≠ 2.0 |
| fewer than 45 minutes on average | μ | mu >= 45 | μ < 45 |
| more than 6.6% take AP exams | p | p ≤ 0.066 | p > 0.066 |
| mean height is 66 inches | μ | mu = 66 | μ ≠ 66 |
Read down the H0 column: every entry has an equal sign. Read down the Ha column: none does. Read across each row: the null and alternative use the same letter and the same number, and differ only in the relation. Those three checks are the whole of this section in one glance.
The parameter column is the one people skip. Percentages of people go with p, written as decimals; averages of measurements go with mu, in their units. Get the letter wrong and the pair can be perfectly formed and still describe a different question.
Section
Part 5
Concept
Once the hypotheses are set and the data are in, a test ends in one of exactly two decisions. The book names them precisely, and the names are part of the content.
\[ \text{reject } H_0 \;\Rightarrow\; \text{sufficient evidence for } H_a \]
\[ \text{do not reject } H_0 \;\Rightarrow\; \text{insufficient evidence for } H_a \]
There is no third decision called accept H0. The book's definition of the null says that if you cannot accept the null, some action is required; read that as describing the status quo, which stands until evidence removes it, not as permission to accept the null at the end of a test.
Both decisions are about the null, but both conclusions are about the alternative. Rejecting means there is sufficient evidence for Ha. Not rejecting means there is not sufficient evidence for Ha. Neither one is a statement that H0 is true.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the two options for a decision
Intuition
A decision has three ingredients, and keeping them apart prevents most wrong conclusions. The hypotheses are about the population. The evidence is the sample. The decision connects them by asking one question.
\[ \text{if } H_0 \text{ were true, how surprising would this sample be?} \]
If the answer is very surprising, something has to give. Either you saw a rare fluke, or the null is wrong; a test bets on the second and rejects. If the answer is not very surprising, nothing has to give, and the null survives, not because it was confirmed but because it was not contradicted.
Notice what the question does not ask: how likely is the null to be true? A test never computes that. It assumes the null and measures the sample against it, the way a jury assumes innocence and measures the evidence against it.
The next three slides make this concrete with made-up samples for Example 9.4 and Try It 9.4, using the normal approximation for a sample proportion from Chapter 7. Sections 9.3 to 9.6 do this properly; here the aim is only to see how the hypotheses you wrote feed the calculation, and why the decision has the two names it has.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the evidence is in the form of sample data
Worked example
Back to Example 9.4, with made-up data: a random sample of 500 U.S. students finds 43 who took an AP exam. Use it to see how a test uses the null, and why a null of at most 0.066 is computed at 0.066 exactly.
The idea is from Chapter 7: if the true proportion were p, sample proportions from samples of 500 would be roughly normal, centred at p, with the standard error below. A test asks how often such a sample would come out at 0.086 or higher.
Compute the sample proportion
Why: 43 successes in 500.
\[ \hat{p} = \frac{43}{500} = 0.086 \]
Standard error if p were 0.066
Why: the null's boundary value.
\[ \sqrt{\frac{0.066(0.934)}{500}} = \sqrt{0.00012329} = 0.01110 \]
Standardise the observed value
Why: how many standard errors above 0.066.
\[ z = \frac{0.086 - 0.066}{0.01110} = 1.801 \]
Right-tail area
Why: from the standard normal.
\[ P(\hat{p} \ge 0.086) = P(Z \ge 1.801) = 0.0358 \]
Figure (svg): A bell-shaped curve for the sample proportion p-hat centred at 0.066, the null value, for samples of 500. A vertical yellow line marks the observed 0.086, and the small area to its right is shaded orange and labelled 0.0358.
Now the point. The null also contains p equal to 0.060 and p equal to 0.050, and every other value up to 0.066. Repeat the same three lines for those values and the tail shrinks: under 0.060 the standard error is 0.01062, z is 2.448 and the tail is 0.0072; under 0.050 it is 0.00975, 3.694 and 0.0001.
Figure (svg): Three bell curves for p-hat with samples of 500, centred at 0.050, 0.060 and 0.066, all values allowed by the null p at most 0.066. A yellow line marks the observed 0.086. The area beyond it is 0.0358 under the curve centred at 0.066, 0.0072 under the one at 0.060 and 0.0001 under the one at 0.050.
Check the claim about the boundary
Why: compare the three tails: the boundary gives the largest, so it is the hardest null value to reject.
\[ 0.0358 > 0.0072 > 0.0001 \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the note on using = in the null
Worked example
Try It 9.4 had hypotheses p at most 0.40 against p greater than 0.40. Suppose, with made-up data, a random sample of 200 first-time takers has 92 passing. Find how surprising that is under the null, and write the decision and conclusion. Later sections set the cutoff formally; use 5 percent here.
Sample proportion
Why: 92 out of 200.
\[ \hat{p} = \frac{92}{200} = 0.46 \]
Standard error at the null's boundary
Why: p equal to 0.40.
\[ \sqrt{\frac{0.40(0.60)}{200}} = \sqrt{0.0012} = 0.03464 \]
Standardise
Why: distance from 0.40 in standard errors.
\[ z = \frac{0.46 - 0.40}{0.03464} = 1.732 \]
Right-tail area
Why: the alternative points right, so only large values count against the null.
\[ P(Z \ge 1.732) = 0.0416 \]
Decide
Why: 0.0416 is below the 5 percent cutoff: this sample would be rare if the null were true.
\[ 0.0416 < 0.05 \;\Rightarrow\; \text{reject } H_0 \]
Figure (svg): A bell curve for p-hat centred at the null value 0.40 for samples of 200. A yellow line at 0.46 has the small area to its right shaded orange, 0.0416. A pink dashed line at 0.43 has the larger area to its right outlined, 0.1932.
Conclusion, in context: at the 5 percent level there is sufficient evidence that more than 40 percent of first-time takers pass the state driver's test. The conclusion names the alternative, the population and the evidence; it does not say the null is false with certainty.
Check the standard error and z backwards
Why: rebuild the observed proportion from z.
\[ 0.40 + 1.732(0.03464) = 0.40 + 0.0600 = 0.46 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 463 — Try It 9.4, with an illustrative sample
Worked example
Same hypotheses, same sample size, a different made-up sample: 86 of the 200 pass. Repeat the calculation, then write the decision and conclusion with care, because this is the one that is usually worded wrongly.
Sample proportion
Why: 86 out of 200.
\[ \hat{p} = \frac{86}{200} = 0.43 \]
Standardise against the null's boundary
Why: the same standard error, 0.03464.
\[ z = \frac{0.43 - 0.40}{0.03464} = 0.866 \]
Right-tail area
Why: how often a sample of 200 gives 0.43 or more when p is 0.40.
\[ P(Z \ge 0.866) = 0.1932 \]
Decide
Why: about one sample in five would do this under the null: not surprising.
\[ 0.1932 > 0.05 \;\Rightarrow\; \text{do not reject } H_0 \]
Conclusion, in context: at the 5 percent level there is not sufficient evidence that more than 40 percent of first-time takers pass. It is not correct to say that 40 percent or fewer pass, or that the data show the pass rate is 40 percent.
Why not? Because the data are also consistent with many values in the alternative. The interval below collects every value of p this sample makes plausible, and it contains 0.45 as comfortably as it contains 0.40.
Figure (svg): A number line for p from 0.33 to 0.53. A blue bar marks the values consistent with 86 passes out of 200, from 0.361 to 0.499. Inside it are a cyan dot at 0.40, the null value, and an orange dot at 0.45, a value from the alternative.
Check that 0.45 is plausible too
Why: the 95 percent interval from this sample contains both the null value and an alternative value.
\[ 0.43 \pm 1.96(0.03501) = (0.361,\; 0.499) \ni 0.40,\; 0.45 \]
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — do not reject H0 when the sample information is insufficient
Tweak it
The second driver's sample, 43 percent passing, was not surprising with 200 people. Would the same 43 percent be surprising with more people? Here is the null's curve for the sample proportion, centred at 0.40, with the sample size on a slider.
Parameter explorer
Slide n from 25 to 1000 and watch where 0.43 falls under the curve. Roughly how large must the sample be before a sample proportion of 0.43 sits out in the thin right tail?
\[ \text{centre } 0.40, \quad \text{SE} = \sqrt{0.24 / {n}} \]
What to notice: the null did not change and the observed proportion did not change, yet the verdict can. A larger sample measures more precisely, so a small departure from 0.40 that was lost in the noise with 200 people stands out with 800.
\[ n = 800: \quad \text{SE} = \sqrt{0.24/800} = 0.01732, \quad z = \frac{0.03}{0.01732} = 1.732 \]
This is one more reason not to read do not reject as the null is true. With 200 people the test simply could not see a difference of three percentage points. Not seeing something is not the same as it not being there.
Trap
After the second driver's sample, a report reads:
\[ 0.1932 > 0.05 \]
We accept H0: the data show that at most 40 percent of first-time takers pass.
Wrong. The test cannot show the null is true.
The decision is right. The words after it claim far more than the test found.
A large tail area means the data are not surprising if the null is true. They are also not surprising for p equal to 0.45, in the alternative.
\[ \text{do not reject } H_0 \]
There is not sufficient evidence that more than 40 percent pass. That is all the test found, and all the conclusion may say.
The courtroom version: not guilty, never innocent.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — the two options for a decision
Ranking
Every sample below tests the same hypotheses as the driver's test, p at most 0.40 against p greater than 0.40. Order them from weakest to strongest evidence against the null, by how many standard errors each lies above 0.40.
Put in order
Order the samples from weakest to strongest evidence that more than 40 percent pass.
Why: The z-scores are 0.577, 0.866, 1.443, 1.732 and 2.887. A sample of 50 has standard error 0.06928, twice the 0.03464 of a sample of 200, so the same 0.46 is half as many standard errors out with 50 people as with 200.
\[ \text{SE}_{50} = \sqrt{0.24/50} = 0.06928, \qquad \text{SE}_{200} = \sqrt{0.24/200} = 0.03464 \]
Read the ranking the other way too: the same sample proportion can be strong or weak evidence. A proportion of 0.46 is weak evidence from 50 people and fairly strong evidence from 200, because the bigger sample pins the true proportion down more tightly.
The surprise is that 25 of 50, a sample proportion of one half, is weaker evidence than 92 of 200, a proportion of only 0.46. Strength of evidence is distance from the null measured in standard errors, not in percentage points, and a small sample has wide standard errors.
This is the first glimpse of what step 4 computes for every test in the chapter: a standardised distance from the null value, turned into a tail area.
Real world
News reports summarise hypothesis tests all the time, and the null-and-alternative logic is exactly where they go wrong. Here is a typical headline: a clinical trial of 60 patients found no significant difference between a new painkiller and the standard one.
Discussion prompt
The headline was rewritten as: study proves new painkiller is just as good as the old one. What did the trial's test actually show, and what would it take to support the rewritten headline?
The phrase to watch for is no evidence of an effect turned into evidence of no effect. They sound alike and mean entirely different things. The first is a failure to reject; the second would need the test to accept its null, which tests never do.
This matters most when the null is something people want to be true: a chemical is safe, a policy did no harm. A small study that fails to reject is not a safety certificate.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, p. 462 — decline to reject H0
Sorting
Every statement below follows a test of a null of mu at least 5 against an alternative of mu less than 5, for years to graduate. Sort each statement by whether a careful statistician could write it.
Sort into buckets
Sort each conclusion.
The last one is subtle. A sample mean of 4.8 years is below 5, yet a test can still fail to reject if the sample is small or variable, because 4.8 is not far enough below to be surprising. The decision is about the population; the sample mean is just the evidence.
Reject, with prove swapped for sufficient evidence, is the strongest a test can say. Even then the sample could, rarely, have misled you; Section 9.2 gives that risk a name and a probability.
Section
Part 6
Pattern
Every pair of hypotheses in this lesson came from the same five questions, asked in the same order. Make them a habit now and every test in Chapters 9 to 13 starts correctly.
\[ H_0 : \; = ,\; \ge ,\; \le \qquad H_a : \; \ne ,\; < ,\; > \]
And at the far end of the test, the matching habit: the decision is reject H0 or do not reject H0, and the conclusion is a sentence about the alternative, in context, saying whether there is sufficient evidence for it. Nothing in the procedure ever lets you write accept.
Most wrong answers in this section are not mysteries. They are a claim in the wrong hypothesis, an equal sign in the alternative, a complement with a gap, a percentage left unconverted, or a hypothesis about a statistic. Each one has a one-line check in the list above.
Check
Read the direction word first, then choose.
Decide who is testing what. The claim being challenged here contains no equality of its own; read what the researcher wants to show.
Check your understanding
A researcher wants to test whether fewer than 20 percent of a city's households have a landline telephone. Which pair of hypotheses is correct?
Answer: A
Why: A share of households is a proportion, written as the decimal 0.20. Fewer than is a strict downward claim, so the alternative is p less than 0.20, and the null is its complement with the equal sign, p at least 0.20.
Each wrong option is a slip from this lesson: the hypotheses swapped, the direction reversed, and the wrong parameter. The boundary check settles the correct one: 0.20 satisfies at least 0.20 and fails less than 0.20, so it sits in the null alone.
In words: assume at least a fifth of households still have a landline, and look for evidence that fewer do.
Check
Write the alternative from the wording, then substitute the boundary value into your null.
The wording below names an at-most claim made by somebody else. Ask whether that claim can be an alternative at all.
Check your understanding
A dentist's office advertises that patients wait no more than 15 minutes on average. A patient group wants to test the advertisement. Which pair should the group use?
Answer: A
Why: No more than 15 means at most 15, which carries an equal sign, so the advertisement is the null. The patient group is challenging it, suspecting longer waits, so the alternative is mu greater than 15.
This is the at-least trap seen from the other side. An advertised limit contains its own equal sign, so it becomes the null, and the test looks for evidence of a breach. A wait of exactly 15 minutes keeps the promise, which is why 15 sits with the null.
In words: assume the office keeps its promise, and look for evidence that the average wait is longer than it says.
Check
Decide what the decision allows you to say about the population.
Remember the asymmetry: the test only ever weighs evidence against the null. Pick the statement that says exactly that much and no more.
Check your understanding
A test of H0: μ = 2.0 against Ha: μ ≠ 2.0 for mean GPA does not reject the null. Which conclusion is correct?
Answer: A
Why: Not rejecting means the sample was not surprising if the mean were 2.0, so there is insufficient evidence for the alternative. It does not establish that the mean is 2.0, because values near 2.0 in the alternative fit the data as well.
In context: the sample gives no convincing sign that the mean GPA differs from 2.0, and that is all. The correct sentence names the alternative, says not sufficient evidence, and keeps the population as its subject.
If you chose the statement that the mean GPA is 2.0, go back to the plausible-values figure in Part 5: the data fit the null, but they fit some alternatives just as well.
Explain it to yourself
The whole section rests on one asymmetry: the null gets the equal sign and is assumed, the alternative must be shown, and a test can reject the null but never accept it. Explaining why is the best test of whether it has landed.
Discussion prompt
In three or four sentences, explain why the null must contain the equal sign, and why a test that does not reject the null still cannot accept it. Use the driver's test, p at most 0.40 against p greater than 0.40, as your example.
A strong answer has two parts: the computational reason for the equal sign, one definite value, and the logical reason for never accepting, other values fit too. A very strong one adds the courtroom: the presumption stands until evidence removes it, but its standing is not proof.
If your explanation leaned on the null being more likely to be true, rethink it. The null is not favoured because it is probable; it is assumed because it is the claim that gives the test something definite to compute.
Exit ticket
Write the hypotheses for each claim, saying which parameter and why. Then say what each test could conclude if it rejects its null.
Discussion prompt
(1) A factory claims at most 3 percent of its bolts are defective, and an inspector wants to test the claim. (2) A researcher wants to show the mean resting heart rate of marathon runners is below 60 beats per minute. (3) A teacher wants to know whether the mean score on a new test differs from last year's 72 points.
The first is the one to check twice. The inspector is testing a claim made by the factory, and that claim contains its own equal sign, at most. So the factory's statement is the null and the inspector's suspicion, more than 3 percent, is the alternative.
If you wrote 3 for the first value instead of 0.03, convert: a proportion lies between 0 and 1. If you wrote an equal sign in any alternative, move it into the null.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-463 — the symbol rule and Examples 9.1-9.4
Recap
A hypothesis test starts from two contradictory statements about a population parameter. The null, H0, is the statement of no difference, assumed while the test runs; the alternative, Ha, contradicts it and is what you conclude if the data reject the null.
| idea | in symbols | read it as |
|---|---|---|
| two-sided | H0: μ = μ0, Ha: μ ≠ μ0 | different from, changed, is |
| left-sided | H0: μ ≥ μ0, Ha: μ < μ0 | less than, fewer than, below |
| right-sided | H0: p ≤ p0, Ha: p > p0 | more than, exceeds, above |
| symbol rule | H0 has =, ≥ or ≤; Ha has ≠, < or > | the boundary value belongs to H0 |
| parameter | μ for a mean, p for a proportion | never x̄ or p̂ |
| decisions | reject H0, or do not reject H0 | never accept H0 |
| conclusion | sufficient evidence for Ha, or not | a sentence about the population |
The work is in the reading: decide who is testing what, name the parameter, convert the value, write the alternative from the direction word, and give the null the complement with the equal sign. Then check the boundary value sits in the null alone.
The Introductory Business Statistics text sets up hypotheses with the same rules in its own Section 9.1, with business claims, if you want more practice. Section 9.2 asks what happens when the decision is wrong: rejecting a true null, or failing to reject a false one.
OpenStax Introductory Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1, pp. 462-464 — the whole section
OpenStax Introductory Business Statistics 2e, §9.1 Null and Alternative Hypotheses §9.1 Null and Alternative Hypotheses — the same rules in business contexts
Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.