Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Hypothesis testing is a method for using sample data to judge between two competing claims about a population. The null hypothesis, written H0, usually represents no effect, no difference, or the standard value being tested. The alternative hypothesis, written H1 or Ha, represents the change, effect, or difference that the researcher is looking for.

Stating these hypotheses clearly matters because every later step in the test depends on them.

Understanding Statistics: Null and Alternative Hypotheses

A good test begins before any data are collected. Start by naming the population quantity that matters. It may be an average waiting time, a proportion of defective parts, or the difference between two teaching methods.

Next, identify the benchmark from policy, past research, a label, or a claim being checked. The null hypothesis must be precise enough to build a model of what ordinary sample variation would look like if that benchmark were true.

Equality belongs in the null hypothesis because the calculations need one exact reference point. The alternative describes the kind of result that would count as meaningful evidence against that reference point.

Choosing the direction is a scientific decision, not a calculation choice made after seeing the sample. Use a two-sided alternative when values above or below the benchmark would both matter. For example, a medicine label may claim an average dose is correct, and too much or too little could be a problem.

Use a one-sided alternative only when one direction is the stated concern and the other direction would not change the decision. A factory may only need evidence that the defect rate is above its limit. Selecting a one-sided test after noticing a convenient direction makes the evidence look stronger than it really is.

The test statistic puts the observed result on a common scale. It compares the gap between the sample result and the null value with the amount of random sampling variation expected. A gap of two standard errors is more unusual than a gap of half a standard error.

Sample size matters here. Larger samples usually have smaller standard errors, so they can detect smaller differences.

This does not mean every detected difference is important in real life. A tiny change in average screen time can be statistically convincing with thousands of students, yet still be too small to affect a school policy.

The significance level is set before examining results. It controls the chance of rejecting a true null hypothesis in the long run. A level of five percent is common, though higher stakes often call for a stricter level.

Rejecting the null does not prove the alternative beyond all doubt. It means the data would be sufficiently unusual under the null model. Failing to reject the null does not prove that nothing is happening.

The study may have too little data, too much natural variation, or measurements that are not accurate enough. Students should pay close attention to the population, the sampling method, the direction of the claim, and whether the conclusion matches the evidence. A test can be calculated perfectly yet answer the wrong question when its setup is poor.

Key Facts

  • H0 is the default claim tested against the data, often using equality: μ = μ0, p = p0, or μ1 = μ2.
  • Ha is the competing claim and uses an inequality: μ ≠ μ0, μ > μ0, μ < μ0, p ≠ p0, p > p0, or p < p0.
  • A two-sided test uses Ha: parameter ≠ value and looks for evidence in both tails of the sampling distribution.
  • A right-tailed test uses Ha: parameter > value, while a left-tailed test uses Ha: parameter < value.
  • The test statistic measures how far the sample result is from H0 in standard error units, such as z = (x̄ - μ0)/(σ/√n).
  • If p-value ≤ α, reject H0; if p-value > α, fail to reject H0.

Vocabulary

Null hypothesis
The null hypothesis is the claim that there is no effect, no difference, or that a population parameter equals a specified value.
Alternative hypothesis
The alternative hypothesis is the claim that contradicts H0 and represents the effect or difference being tested for.
Significance level
The significance level, α, is the chosen cutoff probability for deciding when sample evidence is strong enough to reject H0.
P-value
The p-value is the probability, assuming H0 is true, of getting a result at least as extreme as the observed sample result.
One-sided test
A one-sided test checks for evidence in only one direction, either greater than or less than the null value.

Common Mistakes to Avoid

  • Putting the equality sign in Ha is wrong because the null hypothesis is the hypothesis that contains equality, such as =, ≤, or ≥.
  • Saying accept H0 is misleading because a large p-value means the data did not provide enough evidence to reject H0, not that H0 has been proven true.
  • Choosing a one-sided test after seeing the data is wrong because the direction of Ha must be chosen before collecting or analyzing the sample.
  • Confusing the sample statistic with the population parameter is wrong because hypotheses are statements about population values such as μ or p, not sample values such as x̄ or p̂.

Practice Questions

  1. 1 A cereal box is labeled as having a mean fill weight of 500 g. A quality inspector wants to test whether the true mean fill weight is less than 500 g. Write H0 and Ha using μ.
  2. 2 A school claims that 60% of students ride the bus. A survey of 200 students finds that 108 ride the bus. Write H0 and Ha for testing whether the true proportion is different from 0.60, then compute the sample proportion p̂.
  3. 3 A new study wants to know whether a tutoring program improves average exam scores compared with the old method. Should the alternative hypothesis be one-sided or two-sided, and what claim should it make?