Hypothesis Testing — Definition, Formula & Examples
Hypothesis testing is a systematic method for using sample data to decide whether a claim about a population parameter (such as a mean or proportion) is likely true or false. You set up two competing statements, collect data, and use probability to judge which statement the evidence supports.
A hypothesis test is a formal statistical inference procedure in which a null hypothesis , representing no effect or a default value of a population parameter, is evaluated against an alternative hypothesis by computing a test statistic from sample data and comparing its associated -value to a predetermined significance level . If , the null hypothesis is rejected in favor of the alternative.
Key Formula
Where:
- = Sample mean
- = Hypothesized population mean under H₀
- = Population standard deviation (known)
- = Sample size
How It Works
First, state the null hypothesis (the default claim) and the alternative hypothesis (what you suspect is true). Next, choose a significance level , commonly 0.05. Then collect sample data and compute a test statistic, such as a -score or -score, that measures how far the sample result is from what predicts. Use the test statistic to find the -value — the probability of observing data at least as extreme as yours if were true. If the -value is less than or equal to , reject ; otherwise, fail to reject .
Worked Example
Problem: A factory claims its light bulbs last an average of 1000 hours. You test 36 bulbs and find a sample mean of 980 hours. The population standard deviation is known to be 60 hours. At the 0.05 significance level, is there evidence the true mean is less than 1000?
State hypotheses: Set up the null and alternative hypotheses.
Compute the test statistic: Plug the values into the z-test formula.
Find the p-value and decide: For a left-tailed test, the p-value is P(Z ≤ −2.0) ≈ 0.0228. Since 0.0228 < 0.05, reject H₀.
Answer: At the 0.05 significance level, there is sufficient evidence to conclude the true mean lifetime is less than 1000 hours.
Why It Matters
Hypothesis testing is the backbone of data-driven decisions in medicine, engineering, and social science. Clinical trials use it to determine whether a new drug outperforms a placebo. You will encounter it in AP Statistics, introductory college statistics, and any research methods course.
Common Mistakes
Mistake: Interpreting 'fail to reject H₀' as proof that H₀ is true.
Correction: Failing to reject H₀ means the data are not strong enough to rule it out — it does not confirm H₀. The test only measures evidence against the null, never evidence for it.
