Hypothesis testing: do I reject H₀?
Enter your summary numbers and a significance level α. The calculator runs the z or t test, finds the p-value and the critical value, and tells you whether to reject the null hypothesis H₀.
- Decision
- Do not reject H₀: the p-value is not less than α = 0.05
Do not reject H₀: the p-value is not less than α = 0.05. The test statistic is t = 1.7817, with a p-value of 0.1085.
- p-value
- 0.1085
- Test statistic
- 1.7817
- Critical value
- ±2.2622
- Statistic
- t
- Degrees of freedom
- 9
- Standard error
- 2.07667
- Estimate
- 53.7
Decision: Do not reject H₀: the p-value is not less than α = 0.05. Do not reject H₀: the p-value is not less than α = 0.05. The test statistic is t = 1.7817, with a p-value of 0.1085.
Rejection region and your statistic
How to calculate
Runs a z or t hypothesis test for one mean, two means, one proportion or two proportions from summary numbers, and compares the p-value with your significance level to reject or keep H₀.
Example with the default inputs (Test One mean, σ unknown (t), Alternative hypothesis H₁ Two-tailed (≠), Significance level (α) 0.05, Sample mean x̄₁ 53.7, Hypothesized mean μ₀ 50, Standard deviation 6.567, Sample size n₁ 10): Do not reject H₀: the p-value is not less than α = 0.05. The test statistic is t = 1.7817, with a p-value of 0.1085.
Method: Compute z or t as on the test statistic page; p-value by the tail of H₁; critical value z or t at α (two-tailed: α ÷ 2 in each tail); reject H₀ when p < α.
- Random, independent samples. t tests assume roughly normal data or large samples; the proportion tests use the normal approximation.
- The two-means and two-proportions tests compare the difference with 0.
- A p-value equal to α does not reject H₀.
Worked examples
Each example is checked against the calculator on every build.
- Test One mean, σ unknown (t), Alternative hypothesis H₁ Two-tailed (≠), Significance level (α) 0.05, Sample mean x̄₁ 53.7, Hypothesized mean μ₀ 50, Standard deviation 6.567, Sample size n₁ 10 gives Decision Do not reject H₀: the p-value is not less than α = 0.05, Test statistic 1.781701, Degrees of freedom 9, Critical value ±2.2622.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.2 Are the data consistent with the assumed process mean? (t = (Ȳ − μ₀) ÷ (s ÷ √N), N − 1 df; 10 wafers, mean 53.7, s 6.567, μ₀ 50: t = 1.782, below the critical 2.262 at α = 0.05, so H₀ is not rejected), https://www.itl.nist.gov/div898/handbook/prc/section2/prc22.htm (retrieved 2026-10-05); OpenStax, Introductory Statistics 2e, §9.4 Rare Events, the Sample, and the Decision and Conclusion (reject H₀ when the p-value is less than α; otherwise do not reject H₀), https://openstax.org/books/introductory-statistics-2e/pages/9-4-rare-events-the-sample-decision-and-conclusion (retrieved 2026-10-05)
- Test One proportion (z), Alternative hypothesis H₁ Right (>), Significance level (α) 0.05, Successes x₁ 26, Sample size n₁ 200, Hypothesized proportion p₀ 0.1 gives Decision Do not reject H₀: the p-value is not less than α = 0.05, Test statistic 1.414214, p-value 0.07865, Critical value 1.6449, Estimate 0.13.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.2.4 Does the proportion of defectives meet requirements? (z = (p̂ − p₀) ÷ √(p₀(1 − p₀) ÷ N); 26 of 200, p₀ 0.10: z = 1.414, below the critical 1.645 at α = 0.05), https://www.itl.nist.gov/div898/handbook/prc/section2/prc24.htm (retrieved 2026-10-05); OpenStax, Introductory Statistics 2e, §9.4 Rare Events, the Sample, and the Decision and Conclusion (reject H₀ when the p-value is less than α; otherwise do not reject H₀), https://openstax.org/books/introductory-statistics-2e/pages/9-4-rare-events-the-sample-decision-and-conclusion (retrieved 2026-10-05)
- Test Two means (t), Alternative hypothesis H₁ Two-tailed (≠), Significance level (α) 0.05, Variances Equal (pooled), Sample mean x̄₁ 20.14458, Standard deviation 6.4147, Sample size n₁ 249, Sample mean x̄₂ 30.48101, Standard deviation s₂ 6.10771, Sample size n₂ 79 gives Decision Reject H₀: the p-value is less than α = 0.05, Test statistic -12.620585, Degrees of freedom 326, Critical value ±1.9673.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.3 Two-Sample t-Test for Equal Means (pooled T = −12.62059 with 326 df; critical 1.9673 at α = 0.05, so H₀ is rejected), https://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm (retrieved 2026-10-05); OpenStax, Introductory Statistics 2e, §9.4 Rare Events, the Sample, and the Decision and Conclusion (reject H₀ when the p-value is less than α; otherwise do not reject H₀), https://openstax.org/books/introductory-statistics-2e/pages/9-4-rare-events-the-sample-decision-and-conclusion (retrieved 2026-10-05)
- Test One mean, σ known (z), Alternative hypothesis H₁ Left (<), Significance level (α) 0.05, Sample mean x̄₁ 97, Hypothesized mean μ₀ 100, Standard deviation 15, Sample size n₁ 100 gives Decision Reject H₀: the p-value is less than α = 0.05, Test statistic -2, p-value 0.02275, Critical value −1.6449.Source: OpenStax, Introductory Statistics 2e, §9.4 Rare Events, the Sample, and the Decision and Conclusion (reject H₀ when the p-value is less than α; otherwise do not reject H₀), https://openstax.org/books/introductory-statistics-2e/pages/9-4-rare-events-the-sample-decision-and-conclusion (retrieved 2026-10-05)
How it works
The tests and their statistics (the same as the test statistic calculator):
| Test | Statistic | Standard error SE | Distribution |
|---|---|---|---|
| One mean, σ known | z = (x̄ − μ₀) ÷ SE | σ ÷ √n | normal |
| One mean, σ unknown | t = (x̄ − μ₀) ÷ SE | s ÷ √n | t, n − 1 df |
| Two means, Welch | t = (x̄₁ − x̄₂) ÷ SE | √(s₁²/n₁ + s₂²/n₂) | t, df = (s₁²/n₁ + s₂²/n₂)² ÷ ((s₁²/n₁)²/(n₁ − 1) + (s₂²/n₂)²/(n₂ − 1)) |
| Two means, pooled | t = (x̄₁ − x̄₂) ÷ SE | sₚ√(1/n₁ + 1/n₂), sₚ² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) ÷ (n₁ + n₂ − 2) | t, n₁ + n₂ − 2 df |
| One proportion | z = (p̂ − p₀) ÷ SE, p̂ = x ÷ n | √(p₀(1 − p₀) ÷ n) | normal |
| Two proportions | z = (p̂₁ − p̂₂) ÷ SE | √(p̂(1 − p̂)(1/n₁ + 1/n₂)), p̂ = (x₁ + x₂) ÷ (n₁ + n₂) | normal |
Then, with the significance level α:
- p-value. Right-tailed: the upper tail above the statistic. Left-tailed: the lower tail below it. Two-tailed: twice the upper tail beyond |statistic|, at most 1.
- Critical value. Right-tailed: the z or t with an upper tail of α. Left-tailed: minus that. Two-tailed: ± the value with an upper tail of α ÷ 2. Shown to 4 decimals.
- Decision. Reject H₀ when the p-value is less than α; otherwise do not reject H₀. A p-value equal to α does not reject.
Rules:
- α is more than 0 and at most 0.5. Means are between −10¹² and 10¹², standard deviations more than 0, sample sizes whole numbers from 1 to 10⁹, and successes from 0 to their sample size.
- A t test needs at least 2 observations in each sample. Successes above the sample size, or two proportions with no successes or only successes, give no answer, with a message. So does a statistic too large to show.
- The differences x̄ − μ₀, x̄₁ − x̄₂ and p̂ − p₀, the proportions and p₀(1 − p₀) ÷ n are exact on the decimals you type; square roots, tail areas and critical values use floating point.
Assumptions
- Random, independent samples. t tests assume roughly normal data or large samples; the proportion tests use the normal approximation.
Worked examples by hand
One mean, σ unknown, two-tailed, α = 0.05 (the default, NIST's wafers): x̄ = 53.7, μ₀ = 50, s = 6.567, n = 10. SE = 6.567 ÷ √10 = 2.0767, so t = 3.7 ÷ 2.0767 = 1.7817 with 9 df. The critical value is ±2.2622, and 1.7817 is inside it; the p-value is about 0.108, not less than 0.05, so do not reject H₀.
One proportion, right-tailed, α = 0.05 (NIST's defects): 26 of 200, p₀ = 0.10. p̂ = 0.13, SE = √(0.1 × 0.9 ÷ 200) = √0.00045 = 0.021213, z = 0.03 ÷ 0.021213 = 1.4142. The p-value is 0.07865, and the critical value is 1.6449, so do not reject H₀.
Two means, pooled, two-tailed, α = 0.05 (NIST's car mileage): x̄₁ = 20.14458, s₁ = 6.4147, n₁ = 249; x̄₂ = 30.48101, s₂ = 6.10771, n₂ = 79. t = −12.6206 with 326 df, beyond the critical ±1.9673, so reject H₀.
One mean, σ known, left-tailed, α = 0.05: x̄ = 97, μ₀ = 100, σ = 15, n = 100. SE = 15 ÷ 10 = 1.5, z = −3 ÷ 1.5 = −2, p = Φ(−2) = 0.02275, less than 0.05, so reject H₀. The critical value is −1.6449.
Other questions people ask
How do I do a hypothesis test?
State H₀ and the alternative H₁, pick a significance level α (often 0.05), compute the test statistic from your sample, find its p-value, and compare. If the p-value is less than α, reject H₀; otherwise do not reject it.
When do I reject the null hypothesis?
Reject H₀ when the p-value is less than α. Equally, reject it when the test statistic is beyond the critical value in the direction of H₁. Both rules always give the same decision.
Does "do not reject H₀" mean H₀ is true?
No. It means the sample does not give strong enough evidence against H₀ at the chosen α. A larger sample might.
Should I use a z test or a t test?
Use a z test for a mean when the population standard deviation σ is known, and for proportions. Use a t test for a mean when you only have the sample standard deviation s. For large samples the two give almost the same answer.
What is a one-tailed versus a two-tailed test?
A two-tailed test (H₁: ≠) looks for a difference in either direction and splits α between the two tails. A left-tailed (<) or right-tailed (>) test looks in one direction only and puts all of α in that tail, so its critical value is closer to 0.
What significance level should I use?
0.05 is the most common. Use 0.01 when a false rejection would be costly, or 0.10 for an early look. Choose α before you see the data.