What Is Hypothesis Test?
A hypothesis test asks whether sample data give enough evidence to reject a null hypothesis. You state H₀ and H₁, choose a significance level α, compute a test statistic, find the p-value and reject H₀ if p < α.
Choose a one-sample t-test, a two-sample Welch t-test, a paired t-test, a one-proportion z-test or a two-proportion z-test, then enter the sample sizes, means, standard deviations or counts. Select a two-tailed, right-tailed or left-tailed alternative and the calculator returns the statistic, degrees of freedom, p-value, critical value, decision and a confidence interval for the effect, with the p-value shaded on the curve.
The article below explains each test, the formulas, a worked example and answers about two-tailed tests and what failing to reject means.
How to Use the Hypothesis Test Calculator
- Choose the test that matches your data.
- Enter the sample sizes, means, SDs or counts.
- Choose the alternative hypothesis and α.
- Read the statistic, p-value and decision.
Hypothesis Test Formula
One-sample t
Welch two-sample t
One-proportion z
Hypothesis Test Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| H₀, H₁ | Null and alternative hypotheses | |
| α | Significance level | |
| t or z | Test statistic | (estimate − null) ÷ SE |
| p | p-value |
Hypothesis Test Worked Example
Two groups: 30 people with mean 52.4 (SD 8.1) and 35 with mean 48.1 (SD 9.3). The standard error is √(8.1²/30 + 9.3²/35) = 2.158, so t = 4.3 ÷ 2.158 = 1.99 with about 63 degrees of freedom. The two-tailed p-value is about 0.051, just above α = 0.05, so you fail to reject H₀.
With the example values loaded in the calculator above, the steps are:
- Test: Two-sample Welch t-test. H₀: μ₁ = μ₂.
- Statistic = (estimate − null value) ÷ standard error = 4.3 ÷ 2.15827 = 1.99233, df = 62.979.
- Two-tailed p-value = 0.0506733.
- Compare p with α = 0.05: p ≥ α, so do not reject H₀.
Result: Test used = Two-sample Welch t-test; t statistic = 1.99233; p-value = 0.0506733; Decision = Fail to reject H₀ (p ≥ 0.05).
Where Hypothesis Test Is Used
Comparing two groups
Testing whether two means or proportions differ.
Checking a claim
Testing a mean or proportion against a target.
Before-and-after data
Running a paired test from summary values.
Coursework
Verifying hypothesis test answers.
Common Hypothesis Test Mistakes to Avoid
- Write H₀ and H₁ before computing.
- Use Welch for two means unless you have good reason to assume equal variances.
- Report the effect size and a confidence interval, not just p.
Hypothesis Test Terms and Definitions
- Null hypothesis
- The default claim of no effect or no difference.
- p-value
- The probability of a result at least this extreme if H₀ is true.
- α
- The cut-off probability for rejecting H₀.
Hypothesis Test FAQs
How do I do a hypothesis test?
State H₀ and H₁, choose α, compute the test statistic, find the p-value and compare it with α.
What is a two-tailed hypothesis test?
A test where H₁ is "not equal", so extreme values in either direction count as evidence.
When do I use a z-test and when a t-test?
Use t for means with an estimated SD; use z for proportions or a known σ.
What does it mean to fail to reject H₀?
The evidence is not strong enough; it does not prove H₀ is true.