Null and Alternative Hypotheses: Definition and Examples

By Dr. Zubair Khalid, DVM, MS, PhD ·

Null and Alternative Hypotheses: Definition and Examples

The null and alternative hypotheses are given as a pair of competing statements about a population parameter, and together they cover every possible outcome. The null hypothesis ($H_0$) says there is no effect or no difference, and the alternative hypothesis ($H_1$ or $H_a$) says there is one. You test the null, then decide whether the data give you enough evidence to reject it.

Quick Answer

  • The null hypothesis ($H_0$) is a statement of "no effect" or "no difference" about a population parameter [1].
  • The alternative hypothesis ($H_1$ or $H_a$) is the negation of the null, and it always uses an inequality: $\neq$, $<$, or $>$ [2].
  • Both hypotheses must refer to the same parameter, and the null always contains an equal sign [2].
  • You write the hypotheses before you collect data, based on the research question [2].
  • You never prove either hypothesis. You either reject $H_0$ or fail to reject it [3][1].

What Is a Null and Alternative Hypothesis?

The null hypothesis (H0) is the claim that there is no effect or no difference, and the alternative hypothesis (H1 or Ha) is the claim that there is one. You test the null, and if your data are unlikely under it, you reject it in favor of the alternative.

Think of the null as the default assumption you start from. In a study comparing two fertilizers, the null says the two fertilizers give equal mean plant heights. The alternative says the means differ. Both statements are about the population, not about the plants you happened to measure.

A simple way to keep them straight: the null always contains an equals sign (or a less-than-or-equal or greater-than-or-equal sign), and the alternative always contains an inequality such as not equal, less than, or greater than [2]. They are mutually exclusive, so exactly one of them is true about the population [1].

QuestionNull (H0)Alternative (H1 or Ha)
What does it claim?No effect, no differenceSome effect or difference
What symbol does it use?Equals signInequality sign [2]
Which one gets tested?Yes, the test is built around itNo, it is accepted only if H0 is rejected
ExampleMean A equals mean BMean A is not equal to mean B

The notation H0 and H1 (or Ha) is just shorthand. The subscript 0 marks the null and the subscript 1 or a marks the alternative. Some textbooks write Ha and some write H1, but they mean the same thing.

You never prove either hypothesis. When you reject the null, you have found evidence against it, not proof of the alternative [3]. When you fail to reject the null, that does not mean the null is true. It may just mean your sample was too small to detect a real effect.

The pair must refer to the same population parameter, such as a mean or a proportion, and together they must cover every possible value [1]. If they overlap or leave a gap, the logic of the test breaks down.

What the Null and Alternative Hypotheses Mean

In plain terms, the null hypothesis is the boring explanation. It says any pattern you see in your sample is just random chance, not a real effect in the population. The alternative hypothesis is the interesting explanation. It says something real is going on.

The precise statistical definition is tighter. The null hypothesis is a statement about a population parameter, such as a mean $\mu$ or a proportion $p$, that specifies a single value or a single equality. The alternative hypothesis is the set of parameter values that remain once the null is removed. The two are mutually exclusive statements, so if one is false, the other is true [1].

This pairing matters because hypothesis testing works by assuming $H_0$ is true, then asking how likely your sample result would be under that assumption [4]. If the result would be very unlikely, you reject $H_0$ in favor of $H_1$. If it would not be unlikely, you retain $H_0$.

One subtle point trips up many people. When you reject the null, you have not proven the alternative. You tested the null hypothesis, not the alternative, so the correct phrasing is that you found evidence against $H_0$ [3]. The alternative hypothesis is often the research hypothesis, but the test itself is aimed at the null [3].

How It Works

Every hypothesis test follows the same skeleton. You state the pair, choose a test statistic, and compare what you observed to what $H_0$ predicts.

For a one-sample test of a mean, the pair looks like this:

$$H_0: \mu = \mu_0$$ $$H_1: \mu \neq \mu_0$$

For a two-sample test comparing two means, the pair becomes:

$$H_0: \mu_1 = \mu_2$$ $$H_1: \mu_1 \neq \mu_2$$

Here is what each symbol means.

SymbolMeaning
$H_0$Null hypothesis, the claim of no effect
$H_1$ or $H_a$Alternative hypothesis, the claim of an effect
$\mu$Population mean
$\mu_0$The specific value assumed under the null
$\mu_1, \mu_2$Population means of two groups
$\neq$"Not equal to," a two-tailed alternative
$<$ or $>$"Less than" or "greater than," a one-tailed alternative

The test statistic measures how far your sample result sits from the null value, in units of standard error. For a two-sample comparison, the Welch statistic is:

$$t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}$$

where $\bar{x}_1$ and $\bar{x}_2$ are the sample means, $s_1^2$ and $s_2^2$ are the sample variances, and $n_1$ and $n_2$ are the sample sizes. The denominator is the standard error of the difference. A large absolute $t$ means the observed difference is far from what $H_0$ predicts.

If you are still building the logic of the whole procedure, see What Is Hypothesis Testing? Steps, Errors and Examples.

Worked Example

A researcher grows 20 plants under Fertilizer A and 20 under Fertilizer B and records height in centimeters. The question is whether the two fertilizers produce different mean heights.

The data:

FertilizerHeights (cm)
A12.1, 13.4, 11.8, 14.2, 12.9, 13.1, 12.5, 13.8, 12.2, 13.6, 12.7, 13.3, 11.9, 14.0, 12.4, 13.7, 12.6, 13.2, 12.8, 13.5
B14.3, 15.1, 13.9, 15.6, 14.7, 14.9, 14.1, 15.3, 14.4, 15.0, 14.6, 15.2, 13.8, 15.5, 14.2, 15.4, 14.5, 14.8, 14.0, 15.7

The hypotheses are:

$$H_0: \mu_A = \mu_B$$ $$H_1: \mu_A \neq \mu_B$$

Step by step:

  1. Sample sizes: $n_A = 20$ and $n_B = 20$.
  2. Sample means: $\bar{x}_A = 12.9850$ and $\bar{x}_B = 14.7500$.
  3. Sample standard deviations: $s_A = 0.7066$ and $s_B = 0.5916$.
  4. Observed difference: $\bar{x}_A - \bar{x}_B = 12.9850 - 14.7500 = -1.7650$.
  5. Welch standard error: $SE = \sqrt{0.4992/20 + 0.3500/20} = 0.2061$.
  6. Welch $t$ statistic: $t = -1.7650 / 0.2061 = -8.5654$.
  7. Welch degrees of freedom: $df = 36.8617$.
  8. Two-sided p-value: $p = 0.0000$.

For comparison, the pooled Student $t$ gives $t = -8.5654$ with $df = 38$ and $p = 0.0000$.

from scipy import stats
fertA = [12.1, 13.4, 11.8, 14.2, 12.9, 13.1, 12.5, 13.8, 12.2, 13.6,
         12.7, 13.3, 11.9, 14.0, 12.4, 13.7, 12.6, 13.2, 12.8, 13.5]
fertB = [14.3, 15.1, 13.9, 15.6, 14.7, 14.9, 14.1, 15.3, 14.4, 15.0,
         14.6, 15.2, 13.8, 15.5, 14.2, 15.4, 14.5, 14.8, 14.0, 15.7]
t, p = stats.ttest_ind(fertA, fertB, equal_var=False)
print(f"t = {t:.4f}, p = {p:.4f}")  # t = -8.5654, p = 0.0000
Output:
t = -8.5654, p = 0.0000
GroupnMean (cm)SD (cm)
Fertilizer A2012.98500.7066
Fertilizer B2014.75000.5916
Comparison$t = -8.5654$$df = 36.8617$, $p = 0.0000$

How to Interpret It

The p-value is the probability of getting a result at least as extreme as yours if $H_0$ were true [4]. Here $p = 0.0000$ to four decimals, which is far below any conventional threshold such as 0.05. You reject $H_0$ and conclude the fertilizers do not give equal mean plant heights.

Two things to keep straight. First, rejecting $H_0$ does not prove $H_1$ [3]. It means the data are unlikely under the null. Second, the decision is not guaranteed to be correct. A Type I error happens when you reject a true null, and a Type II error happens when you fail to reject a false null [4].

The direction of the difference is also worth reading. The negative $t$ reflects that group A's mean is lower than group B's. If your alternative had been one-tailed, such as $H_1: \mu_A < \mu_B$, the p-value would be half of the two-sided value, but only if the observed difference points in the predicted direction.

For the decision rule in more detail, see When to Reject the Null Hypothesis: Definition and Examples.

When to Use It (and when not to)

Use a null and alternative pair whenever you are making an inference about a population parameter from sample data. That covers one-sample tests, two-sample tests, ANOVA for more than two means, tests of Pearson's $r$, and proportion tests [4].

Do not use this framework when you are only describing your sample. If you have the whole population, there is nothing to infer and no hypothesis to test. Do not use it to fish for significant results by testing many pairs after seeing the data. The hypotheses should be set before data collection [2].

Also be careful with the direction. A two-tailed alternative, $\mu_1 \neq \mu_2$, is the safe default because it does not commit you to a direction in advance. A one-tailed alternative is defensible only when the research question genuinely predicts one direction, and you should decide that before looking at the data. The choice between these is covered in Directional vs. Non-Directional Hypotheses.

Null vs Alternative Hypothesis

The two are partners, not rivals. The null is what you assume, and the alternative is what you accept if the data push you away from that assumption.

FeatureNull hypothesis ($H_0$)Alternative hypothesis ($H_1$)
ClaimNo effect or no differenceSome effect or difference
SymbolAlways contains $=$, $\leq$, or $\geq$Always contains $\neq$, $<$, or $>$ [2]
Role in testAssumed true, then testedAccepted only if $H_0$ is rejected
Example$\mu_A = \mu_B$$\mu_A \neq \mu_B$
Typical sourceDefault or status quoResearch question [2]

If you want a deeper look at the second column, see Alternative Hypothesis: Definition, Examples and How to Write It.

Common Mistakes

  • Writing the alternative with an equals sign. The alternative must be an inequality. Fix: use $\neq$, $<$, or $>$, never $=$ [2].
  • Stating hypotheses about the sample instead of the population. $H_0: \bar{x}_1 = \bar{x}_2$ is wrong because sample means are known. Fix: write the hypotheses about $\mu$, the population parameter.
  • Choosing a one-tailed test after seeing the data. This inflates your false positive rate. Fix: decide the direction before collecting data.
  • Saying you proved the alternative. A rejected null is evidence against $H_0$, not proof of $H_1$ [3]. Fix: say "the data provide evidence against the null."
  • Letting the hypotheses overlap or leave gaps. The pair must cover all outcomes [3]. Fix: check that $H_1$ is the exact negation of $H_0$.
  • Confusing statistical significance with practical importance. A tiny difference can be significant with a large sample. Fix: report the effect size alongside the p-value.

Limitations

Hypothesis testing tells you whether a result is unlikely under the null. It does not tell you how large the effect is, whether the effect matters in practice, or whether your study was designed well. A significant p-value from a biased sample is still biased.

The framework also depends on assumptions. The Welch test used above assumes roughly independent observations and approximately normal distributions, or large enough samples for the central limit theorem to help. Violating those assumptions can distort the p-value. And because the null is a point claim, it is almost never exactly true in the real world, which is why "reject" often just means "the sample is large enough to detect a small difference."

How to Choose Between the Null and Alternative Hypothesis

Choosing the pair is really two decisions: what parameter you are asking about, and what direction of effect you are willing to commit to before you see data.

Start from the research question

Write the question in plain words first. "Do these two fertilizers produce different mean heights?" or "Is the mean weight of these puppies lower than the breed standard?" The parameter is whatever the question is about: a mean, a proportion, a correlation, or a difference between groups.

Put the equality in the null

The null takes the equality. For a two-group comparison it is mean A equals mean B. For a one-sample test it is the mean equals a specific value. The alternative is everything else [2]. This is why the null is described as the default or status quo and the alternative as the research claim [2].

Decide the direction before collecting data

A two-sided alternative (not equal) is the safe default because it does not commit you to a direction. A one-sided alternative (less than or greater than) is defensible only when your question genuinely predicts one direction and you decide that before looking at the data. Choosing the direction after seeing the results inflates your false positive rate.

Check the pair covers everything

The alternative should be the exact negation of the null. If the null is "mean equals 10," the alternative is "mean is not 10," not "mean is greater than 10" unless you deliberately chose a one-sided test. A pair that overlaps or leaves a gap is a writing error, not a statistical one.

Worked Examples of Null and Alternative Hypotheses

These short examples show the same logic across different kinds of questions. Each pair names the parameter, puts the equality in the null, and states the alternative as an inequality.

Example 1: One mean against a standard

A veterinarian wants to know whether a litter of puppies has a mean birth weight different from the breed standard of 450 grams.

H0: mean birth weight equals 450 g H1: mean birth weight is not equal to 450 g

This is a two-sided test because the question allows the mean to be either above or below the standard.

Example 2: Two groups compared

A student compares mean exam scores for two teaching methods.

H0: mean score for method A equals mean score for method B H1: mean score for method A is not equal to mean score for method B

This matches the fertilizer example in the main article: the null claims no difference, and the alternative claims a difference in either direction.

Example 3: A proportion

A clinic wants to know whether the proportion of patients who return for a follow-up visit differs from 0.60.

H0: proportion equals 0.60 H1: proportion is not equal to 0.60

The parameter is a proportion rather than a mean, but the structure is identical.

Example 4: A one-sided question

A nutritionist believes a new diet lowers mean body weight in a group of dogs compared with their starting weight.

H0: mean change equals zero H1: mean change is less than zero

Here the direction is built into the question before data collection, which is what makes a one-sided alternative acceptable.

ScenarioNullAlternativeType
Puppy weight vs standardMean equals 450 gMean not equal to 450 gTwo-sided
Two teaching methodsMeans equalMeans not equalTwo-sided
Follow-up proportionProportion equals 0.60Proportion not equal to 0.60Two-sided
Diet lowers weightMean change equals zeroMean change less than zeroOne-sided

Common Misconceptions About Null and Alternative Hypotheses

Several beliefs about these hypotheses are widespread and wrong. Clearing them up prevents most of the errors students make when writing them.

"The alternative is what I am trying to prove"

You are not proving the alternative. The test is aimed at the null, and a small p-value means the data are unlikely under the null [3][4]. The correct conclusion is that the data provide evidence against the null, not that the alternative is proven.

"Failing to reject means the null is true"

Failing to reject the null means your data were not unlikely enough under it to justify rejection. The null may still be false; your sample may simply have been too small to detect a real effect [1].

"The hypotheses are about my sample"

The hypotheses are about population parameters, not sample statistics. Writing a null about the sample mean is a category error because the sample mean is already known and needs no testing.

"A significant result means the effect is large or important"

Statistical significance and practical importance are different things. A tiny difference can be significant when the sample is large, so report the effect size alongside the p-value.

"The two hypotheses can both be true"

They are mutually exclusive statements about the same parameter [1]. If one is false, the other is true. That is what makes the decision rule work.

How the Hypotheses Fit Into a Test, Step by Step

A diagram in words helps here. Picture a funnel with four stages.

Stage 1, state the pair. You write the null and alternative before collecting data, naming the parameter and the direction [2].

Stage 2, assume the null. The test temporarily treats the null as true and asks what results it would predict [4].

Stage 3, measure the gap. You compute a test statistic that expresses how far your sample result sits from the null value, in units of standard error. A large gap means the result is unusual under the null.

Stage 4, decide. You compare the p-value, the probability of a result at least as extreme as yours if the null were true [4], to a threshold you set in advance. If the p-value is small, you reject the null. If not, you fail to reject it.

Two kinds of error can occur at the decision stage. A Type I error is rejecting a true null, and a Type II error is failing to reject a false null [4]. Neither error can be eliminated entirely, which is why the decision is described as evidence rather than proof.

The direction of the alternative changes the p-value. With a two-sided alternative, both tails of the distribution count. With a one-sided alternative, only the predicted tail counts, so the p-value is half the two-sided value when the observed effect points the predicted way.

Frequently Asked Questions

What is the difference between the null and alternative hypotheses?

The null hypothesis states no effect or no difference and always contains an equality. The alternative hypothesis states the opposite and always contains an inequality. Together they are mutually exclusive and cover every possible value of the parameter [1].

Can the null and alternative hypotheses both be true?

No. They are mutually exclusive statements about the same parameter [1]. If the null is false, the alternative is true, and the reverse also holds. That is why rejecting one means accepting the other as the working explanation.

Do I always need a null hypothesis?

For formal hypothesis testing, yes. The test is built around the null, and the p-value is defined as the probability of the data under that null [4]. Without a null, there is nothing to compute a p-value against.

What does it mean if I fail to reject the null?

It means your data were not unlikely enough under $H_0$ to justify rejecting it. It does not mean the null is true or proven [1]. It may simply mean your sample was too small to detect a real effect.

How do I choose between a one-tailed and two-tailed alternative?

Use a two-tailed alternative when you only expect a difference, in either direction. Use a one-tailed alternative when your research question predicts a specific direction before data collection. The one-tailed p-value is half the two-tailed value when the effect points the predicted way.

References

  1. Statistical hypothesis test - Wikipedia
  2. Hypothesis Testing (1 of 5) - Concepts in Statistics
  3. 8.1: The null and alternative hypotheses - Statistics LibreTexts/08%3A_Inferential_Statistics/8.1%3A_The_null_and_alternative_hypotheses)
  4. Key Takeaways and Exercises - Research Methods in Psychology

Further Reading

Related Articles

Related articles