AI Statistics SolverBlogHypothesis Testing Guide
Statistics Guide

How to Do Hypothesis Testing Step by Step (With Examples)

March 2026 · 12 min read · Hypothesis Testing

Hypothesis testing is a systematic procedure for deciding whether sample data provides enough evidence to reject a claim about a population. It’s one of the most important techniques in statistics — and one of the most commonly misunderstood. This guide walks through every step with a concrete example so you can apply the process to any problem.

The 5 Steps of Hypothesis Testing

Every hypothesis test follows the same five steps, regardless of the test type. Once you know these steps, you can apply them to t-tests, z-tests, chi-square tests, F-tests, and any other test you’ll encounter in a statistics course.

  1. State the null hypothesis (H₀) and alternative hypothesis (H₁)
  2. Choose the significance level (α)
  3. Calculate the test statistic
  4. Find the p-value or critical value
  5. Make a decision and state the conclusion

Step 1 — State the Hypotheses

The null hypothesis (H₀) is the default assumption — it states that there is no effect, no difference, or no relationship. The alternative hypothesis (H₁) is what you’re trying to find evidence for.

The way H₁ is written determines whether the test is one-tailed or two-tailed:

  • Two-tailed: H₁: μ ≠ μ₀ (testing for any difference)
  • Right-tailed: H₁: μ > μ₀ (testing for an increase)
  • Left-tailed: H₁: μ < μ₀ (testing for a decrease)
Example Problem

A teacher claims that students who use a new study method score higher than the school average of 72 on the final exam. A sample of 30 students using the new method has a mean score of 76 with a standard deviation of 10. Test this claim at α = 0.05.

H₀: μ = 72 (new method makes no difference)
H₁: μ > 72 (new method improves scores) → right-tailed test

Step 2 — Choose the Significance Level

The significance level (α) is the probability threshold below which you’ll reject H₀. The most common choice is α = 0.05, which means you’re willing to accept a 5% chance of incorrectly rejecting a true null hypothesis (a Type I error).

Some fields use stricter thresholds: medical research often uses α = 0.01, and particle physics uses α = 0.0000003. Use whatever value is specified in your problem; if none is given, α = 0.05 is the standard default.

Example continued: The problem specifies α = 0.05. Since H₁ states μ > 72, this is a right-tailed test. The critical region is in the right tail of the distribution.

Step 3 — Calculate the Test Statistic

The test statistic converts your sample result into a standardized number that tells you how far the sample is from what H₀ predicts. For a one-sample t-test:

t = (x̄ − μ₀) / (s / √n)

Where x̄ is the sample mean, μ₀ is the hypothesized population mean, s is the sample standard deviation, and n is the sample size.

Calculation
= 76, μ₀ = 72, s = 10, n = 30
t = (76 − 72) / (10 / √30)
t = 4 / (10 / 5.477)
t = 4 / 1.826 = 2.19
df = n − 1 = 29

Step 4 — Find the P-Value or Critical Value

There are two equivalent ways to make the decision:

P-value approach

Find the probability of getting a test statistic as extreme as yours, assuming H₀ is true. For t = 2.19, df = 29, right-tailed: p ≈ 0.018. Since p = 0.018 < α = 0.05, reject H₀.

Critical value approach

Find the critical value t* for α = 0.05, df = 29, right-tailed: t* = 1.699. Since t = 2.19 > t* = 1.699, the test statistic falls in the critical region, so reject H₀.

Decision
p-value = 0.018 < α = 0.05 → REJECT H₀
t = 2.19 > t* = 1.699 → REJECT H₀
Both approaches agree: reject the null hypothesis.

Step 5 — State the Conclusion

Never just say “reject” or “fail to reject” — always connect the decision back to the original research question in plain English.

Conclusion

There is sufficient statistical evidence at the 5% significance level to conclude that students using the new study method score higher than the school average of 72. (t(29) = 2.19, p = .018)

Common Mistakes to Avoid

  • Saying “accept H₀” — you never accept the null; you either reject it or fail to reject it
  • Choosing the wrong tail — read H₁ carefully to determine one-tailed vs two-tailed
  • Wrong degrees of freedom — for one-sample t-test, df = n−1
  • Confusing p-value with probability that H₀ is true — p-value is about the data given H₀, not about H₀ itself
  • Reporting only p < 0.05 — always report the exact p-value and test statistic

When to Use Which Test

  • One-sample t-test: Compare a sample mean to a known value
  • Two-sample t-test: Compare means from two independent groups
  • Paired t-test: Compare means from the same subjects before and after
  • z-test for proportion: Test whether a sample proportion equals a hypothesized value
  • Chi-square test: Test relationships between categorical variables
  • One-way ANOVA: Compare means across three or more groups

Need to solve a hypothesis test right now?

Enter your data and get a full step-by-step solution in seconds.

Run the Hypothesis Test Solver →

Summary

Hypothesis testing follows a consistent five-step structure: state the hypotheses, set α, compute the test statistic, find the p-value or critical value, and state the conclusion. The type of test (t-test, z-test, chi-square, etc.) changes the formula in step 3, but the framework stays the same. Once you internalize this structure, any new test type becomes a matter of finding the right formula — the logical process doesn’t change.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top