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).
How to Read a Hypothesis Test
The test asks whether the data would be surprising if the null hypothesis were true. For two groups, 30 people with mean 52.4 (SD 8.1) and 35 with mean 48.1 (SD 9.3), the standard error is 2.158 and t = 4.3 ÷ 2.158 = 1.99.
With about 63 degrees of freedom, the two-tailed p-value is about 0.051. That is just above α = 0.05, so you fail to reject H₀. That is not proof of no difference. It says the data do not give enough evidence at that level, and the observed effect and its standard error show how large the gap could still be.
Where Hypothesis Test Is Used
One-sample tests
Compare a sample mean with a hypothesised value.
Two-sample tests
Compare two means, or two proportions.
Paired data
Test the mean of the differences.
Showing the steps
See the hypotheses, statistic, p-value and decision.
Common Hypothesis Test Mistakes to Avoid
- State H₀ and H₁ before you look at the data.
- Choose one-tailed or two-tailed from the research question, not from the result.
- "Fail to reject" is not the same as "accept".
- Report the effect size and an interval, not only the p-value.
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 and p-value from the data, then reject H₀ if p is less than α. The calculator performs and explains each step.
What is a two-tailed hypothesis test?
It tests for a difference in either direction. The p-value counts extreme results in both tails, so it is twice the one-tailed value for a symmetric statistic.
When do I use a z-test and when a t-test?
Use z when the population SD is known or the sample is very large. Use t when the SD is estimated from the sample, which is the usual case.
What does it mean to fail to reject H₀?
The data are not unusual enough, at your α, to rule out the null. It does not show that the null is true.