Null vs Alternative Hypothesis: How to Write Them
By Jude Wallis · Published
The null hypothesis (H0) states no difference or effect about a population parameter and always uses an equals sign. The alternative hypothesis (Ha) is the claim you seek evidence for, written with <, >, or not-equal. Both describe parameters like p or mu, never sample statistics.
This is the "Setting Up a Test" step in the Fall 2026 AP Statistics course, covered in Unit 3 topic 3.5 for proportions and Unit 4 topic 4.4 for means.
Null vs alternative hypothesis at a glance
A significance test compares two claims about a population, never about your sample alone. The null hypothesis, written (read "H-naught"), is the no-effect claim: it sets a population parameter equal to one specific value. The alternative hypothesis, written , is the claim you actually want evidence for.
You reject when the p-value is small enough, meaning below your significance level. The p-value is the probability of getting a result as extreme or more extreme than what you observed, assuming is true. Think of as the default position that stays in place until the evidence pushes hard enough to abandon it. Getting the two hypotheses right is the first step of every test, so it pays to slow down here, because a wrong parameter or a flipped inequality will send the rest of your work in the wrong direction.
What the null hypothesis (H0) says
The null hypothesis is a statement of no difference or no effect, and it is always about a population parameter. For a proportion that parameter is , the population proportion. For a mean it is (the Greek letter mu), the population mean.
always contains equality, so it looks like or , where and are the specific hypothesized values. That hypothesized value usually comes from a claim, a target, or the status quo you are checking. If a label says a box holds 500 grams, then is the number you place in .
What the alternative hypothesis (Ha) says
The alternative hypothesis is the claim you are collecting data to support. It uses a strict inequality or the not-equal sign, never an equals sign, so it is written with , , or (not equal to).
Use a one-sided alternative when the question points in a single direction. "Is the on-time rate lower than claimed?" gives , while "did the mean increase?" gives . Use a two-sided alternative, or , when you care whether the parameter differs from the hypothesized value in either direction.
Pick the direction from the question wording before you look at the data. Choosing the side after you see which way the sample came out inflates your error rate, a Type I error problem.
Why hypotheses use parameters, not statistics
Every hypothesis is a guess about a fixed but unknown number that describes the whole population, called a parameter. The sample proportion (read "p-hat") and the sample mean (read "x-bar") are statistics: numbers you compute from data that change from one sample to the next. Because a statistic is already known once you have the data, there is nothing left to test about it.
So a hypothesis like has no meaning, since the value of is simply whatever your sample gave you. The unknown you are actually asking about is , the population proportion, which is why is the correct form. Keep parameters (, , and , the population mean difference) inside the hypotheses and statistics (, ) outside them.
Symbols and words for proportions and means
The table below lists the parameter, the null, and the common alternatives for the three setups you meet most in AP Statistics. Every row keeps the population parameter in the hypotheses and leaves the sample statistic out.
| Case | Parameter | Null hypothesis | Alternative hypothesis |
|---|---|---|---|
| One proportion | (population proportion) | , , or | |
| One mean | (population mean) | , , or | |
| Paired mean difference | (population mean difference) | , , or |
For paired data you first compute a difference for each pair, then treat , the population mean of those differences, like any other mean.
How to write H0 and Ha in four steps
- Name the population parameter in words and symbols, such as = the true proportion of voters who approve, or = the mean battery life of all units.
- Find the hypothesized value from the claim or target, and write the null as parameter = value.
- Read the question to decide the direction, then write the alternative with , , or .
- Check that both hypotheses use the parameter, that only has an equals sign, and that you fixed the direction before seeing the data.
This is the same setup work the AP course labels "Setting Up a Test." If you are unsure which parameter and test apply, see which statistical test to use.
Common mistakes when writing hypotheses
Writing hypotheses about a statistic. is wrong because , the sample mean, is something you calculate, not an unknown you test. Hypotheses are always about the parameter, so write instead.
Putting the equality in Ha. The alternative never contains , , or ; only carries the equals sign. If you find yourself writing , move the equality back to and leave a strict inequality in .
Choosing the direction after seeing the data. Deciding on versus once you notice which way landed makes your test look stronger than it really is. Set the sidedness from the research question first, then collect and analyze the data.
Setting up a one-proportion test (one-sided)
A delivery company advertises that 90% of its packages arrive on time. A consumer group takes a random sample of 200 packages and wants to test whether the true on-time rate is lower than 90%. Write the null and alternative hypotheses.
Identify the parameter. Let = the true proportion of all packages from this company that arrive on time. This is a population proportion, not the sample proportion .
Find the hypothesized value. The advertised rate is the value being checked, so .
Write the null as an equality. .
Decide the direction from the question. The group suspects the rate is lower, so the alternative is one-sided in the less-than direction: .
Confirm the direction was set by the group's question before any data were collected, not after seeing the sample.
versus , where is the true proportion of all packages that arrive on time.
Setting up a one-mean test (two-sided)
A machine is supposed to fill bottles with a mean of 500 mL. An engineer wants to know whether the mean fill differs from 500 mL in either direction and measures a random sample of 30 bottles. Write the null and alternative hypotheses.
Identify the parameter. Let = the true mean fill volume of all bottles from this machine. This is a population mean.
Find the hypothesized value. The target fill is the value being checked, so mL.
Write the null as an equality. .
Decide the direction from the question. The engineer cares about a difference either way (too full or too empty), so the alternative is two-sided: .
Note that the sample mean will be used later to compute the test statistic, but it never appears in the hypotheses.
versus , where is the true mean fill volume in mL.
Setting up a paired mean-difference test (one-sided)
A teacher records each of 25 students' reading speed before and after a 6-week program and wants evidence that the program increases reading speed. Define the difference for each student as (after - before). Write the null and alternative hypotheses.
Recognize the design. Each student is measured twice, so this is paired data, and you work with the differences (after - before).
Identify the parameter. Let = the true mean difference (after - before) for the population of students. This is a population mean difference.
Write the null as no change. No effect means the mean difference is 0, so .
Decide the direction from the question. "Increases" means after is larger than before, a positive difference, so .
Keep the statistic out. The sample mean difference is a statistic, so it does not go in the hypotheses.
versus , where is the true mean of the (after - before) differences.
Frequently asked questions
Which hypothesis gets the equals sign?
The null hypothesis always does. sets the parameter equal to a specific value, such as . The alternative uses only a strict inequality or the not-equal sign (, , or ) and never contains an equals sign.
Can I use x-bar or p-hat in my hypotheses?
No. Hypotheses are statements about population parameters like and . The sample statistics and are numbers you compute from data, so there is nothing to test about them and they stay out of and .
How do I choose between a one-sided and a two-sided alternative?
Read the research question before you see the data. If it asks whether a value increased or decreased, use a one-sided alternative ( or ). If it asks only whether the value changed or differs, use a two-sided alternative ().
Does the AP exam make me write hypotheses?
Yes. Setting up a test is a tested skill for proportions (topic 3.5) and means (topic 4.4), and Section II of the exam includes an inference free-response question that can be a full hypothesis test.