Null Hypotheses and Alternative Hypotheses

Statistical hypothesis testing is a method for using sample data to make inferences about a population. Understanding null and alternative hypotheses, along with how p-values are calculated and interpreted, is essential for applying hypothesis tests correctly.

After reading this material, you should be able to explain:

What is Null Hypothesis?

In statistical hypothesis testing, we define two competing hypotheses about a population parameter:

  1. The null hypothesis ($H_0$) specifies the claim being tested. It often represents no effect, no difference, or no change, although more generally it specifies a particular value or model. For example, when testing a new drug, the null hypothesis might state that the drug has the same average effect as a placebo.
  2. The alternative hypothesis ($H_1$ or $H_a$) describes the competing claim. In the drug example, it might state that the drug and placebo have different effects.

Choosing appropriate hypotheses depends on the research question. The null hypothesis usually provides a precise benchmark against which the observed data can be evaluated, while the alternative describes the departure from that benchmark that is scientifically relevant.

The relationship between the null and alternative hypotheses is central to null hypothesis significance testing (NHST), which is widely used in fields such as medicine, psychology, neuroscience, genetics, economics, and linguistics.

The basic goal of NHST is to use sample data to assess whether there is sufficient evidence to reject the null hypothesis in favor of the alternative. This decision is based on the p-value, which measures how unusual the observed result would be if the null hypothesis were true.

Null Hypothesis Testing Illustration

The plot illustrates the distribution of a test statistic under the assumption that the null hypothesis $H_0$ is true:

The Language of Hypothesis Testing

Understanding P-Values Through an Analogy

Imagine that you are a detective evaluating evidence against a suspect. In this analogy, the null hypothesis ($H_0$) is that the suspect is innocent, while the alternative hypothesis ($H_a$) is that the suspect is guilty.

As you collect evidence—such as fingerprints, DNA samples, or eyewitness accounts—you ask how unusual evidence this strong would be if the suspect were innocent.

The p-value plays a similar role: it measures how unusual the observed result, or a more extreme one, would be under the assumption that $H_0$ is true.

In a one-tailed test, only evidence in a specified direction is treated as evidence against $H_0$. In a two-tailed test, extreme results in either direction are considered.

If the p-value is small, for example below a significance level of 5%, the observed evidence would be unusual under $H_0$. In statistical testing, this leads us to reject $H_0$.

A large p-value means the evidence is not sufficiently unusual under $H_0$, so we fail to reject it.

The analogy has an important limitation: a p-value is not the probability that the suspect is innocent or guilty. Likewise, in statistical testing it is not the probability that $H_0$ is true or false.

Interpretation of the P-value

The p-value is the probability of obtaining a test statistic at least as extreme as the one observed, assuming that the null hypothesis $H_0$ is true.

Example: Coin Toss Experiment

$$ P(\text{heads}) = 0.5 $$

$$ P(\text{heads}) \neq 0.5 $$

Statistical Test

We use a binomial test to calculate the p-value.

I. Compute the probability of observing exactly 4 heads under $H_0$:

$$ P(X = 4) = \binom{10}{4}(0.5)^4(0.5)^6 = 210(0.5)^{10} \approx 0.2051 $$

II. Compute the probabilities of outcomes at least as extreme as the observed result.

Because this is a two-tailed test with a fair coin, outcomes of 0 to 4 heads and 6 to 10 heads are equally or more extreme than the observed result.

III. Total P-value:

By symmetry:

$$ \text{p-value} = 2P(X\leq4) = 2\left(\sum_{k=0}^{4}P(X=k)\right) $$

IV. Sum of Probabilities:

$$ \begin{align} P(X = 0) &= 0.00098 \\ P(X = 1) &= 0.00977 \\ P(X = 2) &= 0.04395 \\ P(X = 3) &= 0.11719 \\ P(X = 4) &= 0.20508 \\ \sum_{k=0}^{4} P(X = k) &= 0.37697 \end{align} $$

V. Compute P-value:

$$ \text{p-value} = 2(0.37697) = 0.75394 $$

Decision

This does not mean that we have proved the coin is fair. It only means that the observed result is consistent with what we could reasonably see from a fair coin.

Additional Considerations