Hypothesis testing is the cornerstone of statistical inference. It provides a formal, systematic way to evaluate claims about populations using sample data. From clinical trials to A/B testing, from quality control to psychological research — hypothesis testing is everywhere. This guide walks you through every step clearly.

What is a Statistical Hypothesis?

A statistical hypothesis is a claim about a population parameter (like a mean, proportion, or variance). We use sample data to test whether there is enough evidence to support or refute this claim.

Every hypothesis test involves two competing hypotheses:

Null Hypothesis (H₀): The default assumption — no effect, no difference, no relationship. Example: H₀: μ = 50. You try to disprove this.

Alternative Hypothesis (H₁ or Hₐ): What you are trying to show. Example: H₁: μ ≠ 50. This is supported if you reject H₀.

The 6 Steps of Hypothesis Testing

Step 1: State the Hypotheses

Write explicit H₀ and H₁ before collecting data. Decide whether the test is two-tailed (H₁: μ ≠ μ₀), left-tailed (H₁: μ < μ₀), or right-tailed (H₁: μ > μ₀).

Step 2: Choose the Significance Level (α)

α is the probability of rejecting H₀ when it is actually true (Type I error rate). Set α before collecting data. Common choices: α = 0.05, α = 0.01, α = 0.001 (for medical or safety research).

Step 3: Collect Data and Choose the Appropriate Test

SituationTest to Use
Test one mean (σ unknown)One-sample t-test
Compare two independent meansTwo-sample t-test
Compare before/after (paired)Paired t-test
Compare 3+ group meansOne-way ANOVA
Test a proportionOne-proportion z-test
Test categorical frequenciesChi-square test
Non-normal 2-group comparisonMann-Whitney U test
Non-normal 3+ groupsKruskal-Wallis test

Step 4: Calculate the Test Statistic

The test statistic measures how far your sample result is from what H₀ predicts, in standard error units. General form:

Test statistic = (Observed − Expected under H₀) / Standard Error

Step 5: Find the P-Value

The p-value is the probability of getting a test statistic this extreme or more extreme, assuming H₀ is true. Use statistical tables or a calculator. Smaller p-values provide stronger evidence against H₀.

Step 6: Make a Decision

Complete Worked Example

A nutritionist claims that a new diet reduces mean daily calorie intake below 2,000 calories. A sample of 25 participants following the diet had mean intake x̄ = 1,850 calories with SD s = 300 calories. Test at α = 0.05.

Step 1: H₀: μ = 2000 | H₁: μ < 2000 (left-tailed test)

Step 2: α = 0.05, one-tailed

Step 3: One-sample t-test (σ unknown, sample data available)

Step 4: t = (1850 − 2000) / (300/√25) = −150/60 = −2.50

Step 5: df = 24. P(T < −2.50) = 0.010

Step 6: p = 0.010 < 0.05 → Reject H₀. The diet significantly reduces calorie intake below 2,000 calories (t(24) = −2.50, p = 0.010).

Type I and Type II Errors

DecisionH₀ is Actually TrueH₀ is Actually False
Reject H₀❌ Type I Error (α) — False Positive✅ Correct — True Positive (Power)
Fail to Reject H₀✅ Correct — True Negative❌ Type II Error (β) — False Negative

You cannot minimise both simultaneously. Reducing α (stricter test) increases β (more false negatives). The solution is a larger sample size — which reduces both types of error.

Statistical Power

Power = 1 − β = the probability of correctly rejecting H₀ when the alternative is true. Power ≥ 0.80 is typically required. Power increases with: larger n, larger effect size, higher α, and lower variability.

Always conduct a power analysis before your study to ensure you collect enough data to detect your expected effect. Use our Sample Size Calculator for this.

Reporting Hypothesis Test Results

Always report: the test used, test statistic, degrees of freedom, p-value, and effect size. Example APA format: t(24) = −2.50, p = .010, d = −0.50