Hypothesis Testing Calculator
Calculate p-values, test statistics, confidence intervals, and conclusions for common hypothesis tests.
Background
Hypothesis testing helps you decide whether sample data gives enough evidence to reject a null hypothesis. This calculator shows the test statistic, p-value, decision, assumptions, effect size, and a plain-English conclusion so students can understand the result, not just copy a number.
How to use this calculator
- Choose the test type or use the “Which test should I use?” helper.
- Enter summary statistics, raw data, category counts, or a two-way table.
- Choose α and the alternative hypothesis: left-tailed, right-tailed, or two-tailed.
- Click Calculate Hypothesis Test.
- Read the p-value, reject/fail-to-reject decision, confidence interval, assumptions, effect size, and plain-English conclusion.
How this calculator works
- Mean tests use t or z style test statistics depending on the test and available information.
- Proportion tests use normal approximation z tests and pooled proportions for hypothesis testing.
- Chi-square tests compare observed counts with expected counts.
- ANOVA compares between-group variation with within-group variation using an F statistic.
- The calculator converts the test statistic into a p-value and compares it with α.
Formula & Equations Used
One-sample t: t = (x̄ − μ₀) / (s / √n)
Two-sample t: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)
One-proportion z: z = (p̂ − p₀) / √(p₀(1 − p₀)/n)
Chi-square: χ² = Σ (O − E)² / E
ANOVA: F = MS_between / MS_within
Example Problems & Step-by-Step Solutions
Example 1: One-sample mean test
A class sample has mean 72.4, standard deviation 8.1, and n = 36. Test whether the true mean differs from 70.
Use a two-tailed one-sample t-test with H₀: μ = 70 and H₁: μ ≠ 70.
Example 2: Two-proportion test
Compare whether two groups have different success rates using x₁/n₁ and x₂/n₂.
The calculator uses the pooled proportion for the z test and an unpooled standard error for the confidence interval.
Example 3: One-way ANOVA
Paste each group on its own line to test whether at least one group mean is different.
ANOVA gives an F statistic and p-value, but a significant result does not say which exact groups differ.
Common mistakes to avoid
- Do not say “accept H₀.” In most intro stats courses, say “fail to reject H₀.”
- Do not confuse statistical significance with practical importance. Check the effect size too.
- Do not use a two-sample test for paired before/after data.
- Do not use chi-square tests with expected counts that are too small without caution.
- Make sure the alternative hypothesis direction matches the wording of the problem.
FAQ
What does the p-value mean?
The p-value is the probability of getting a result at least as extreme as your sample result, assuming the null hypothesis is true.
When do I reject the null hypothesis?
Reject H₀ when the p-value is less than or equal to α. Otherwise, fail to reject H₀.
Which test should I use for before/after data?
Use a paired t-test because each before value is linked to a matching after value.