Hypothesis Test Calculator
Run a z-test, t-test or chi-square test from summary statistics or raw data. Get the test statistic, p-value, critical value, confidence interval, effect size, a plain-English interpretation and a ready-to-paste APA 7 results sentence.
Labels for the write-up (optional)
Shaded red = rejection region at the chosen α. The dashed line is your observed test statistic: if it lands in the red zone, you reject H₀.
Expected counts under H₀
Step-by-step calculation
Interpretation
APA 7 Results Sentence
Assumptions to check
How to Run a Hypothesis Test (6 Steps)
- State the hypotheses. H₀ is the “no effect / no difference” claim (always contains =). H₁ is what you are trying to find evidence for (≠, > or <).
- Choose α. The risk of a Type I error you are willing to accept (usually .05).
- Pick the right test (table below) and check its assumptions.
- Compute the test statistic — how many standard errors your sample result is from the null value.
- Find the p-value (or compare with the critical value).
- Decide and interpret in context. If p < α, reject H₀; otherwise fail to reject. Always add the effect size and a confidence interval.
Which test should I use?
| Question | Data | Test |
|---|---|---|
| Is one mean different from a known value? | Numeric, σ unknown | One-sample t |
| Same, but σ is known | Numeric | One-sample z |
| Do two separate groups have different means? | Numeric, 2 independent groups | Two-sample (Welch) t |
| Did the same people change between two measurements? | Numeric, paired/matched | Paired t |
| Is a proportion different from a claimed value? | Categorical (success/failure) | One-proportion z |
| Do two groups differ in a proportion? | Categorical, 2 independent groups | Two-proportion z |
| Are two categorical variables related? | Counts in an r × c table | Chi-square independence |
| Do observed counts match a claimed distribution? | Counts in one variable | Chi-square goodness-of-fit |
| Compare 3 or more means? | Numeric, 3+ groups | One-way ANOVA |
Worked Examples with Interpretation & APA Write-Up
Example 1 — Two-sample (Welch) t-test
A professor compares final-exam scores of students taught with active learning (n = 30, M = 78.40, SD = 9.60) and with traditional lecture (n = 32, M = 72.10, SD = 11.20). H₀: μ₁ − μ₂ = 0; H₁: μ₁ − μ₂ ≠ 0; α = .05.
- SE = √(9.6²/30 + 11.2²/32) = 2.644; t = 6.30 / 2.644 = 2.38; Welch df = 59.54; p = .020.
- Cohen’s d = 0.60 (medium); 95% CI for the difference [1.01, 11.59].
- Interpretation: p < .05, so reject H₀. Active-learning students scored about 6.3 points higher on average; the interval excludes 0, consistent with the test.
APA 7 write-up
An independent-samples t-test (Welch’s, equal variances not assumed) was conducted to compare exam score between active learning and lecture. Mean exam score was significantly higher for active learning (M = 78.40, SD = 9.60) than for lecture (M = 72.10, SD = 11.20), t(59.54) = 2.38, p = .020, d = 0.60, 95% CI [1.01, 11.59] for the mean difference.
Example 2 — One-sample t-test (fail to reject)
A random sample of n = 36 commutes has M = 54 min, SD = 12. Test H₀: μ = 50 vs H₁: μ ≠ 50 at α = .05. Then t(35) = 2.00, p = .053, d = 0.33, 95% CI [49.94, 58.06].
- Interpretation: p = .053 > .05, so we fail to reject H₀. This does not prove the mean is 50; the evidence is simply not strong enough at the .05 level. Note that 50 sits just inside the interval.
APA 7 write-up
A one-sample t-test was conducted to compare mean commute time to the test value of 50. The sample mean (M = 54.00, SD = 12.00) was not significantly different from the test value, t(35) = 2.00, p = .053, d = 0.33, 95% CI [49.94, 58.06].
Example 3 — Chi-square test of independence
Counts of students (rows: study format Group-A / Group-B; columns: grade low / mid / high) are [20, 30, 10] and [25, 15, 40]. Then χ²(2, N = 140) = 21.13, p < .001, Cramér’s V = .39 (medium to large).
APA 7 write-up
A chi-square test of independence was conducted to examine the relationship between study format and grade. The relationship was statistically significant, χ2(2, N = 140) = 21.13, p < .001, Cramér’s V = .39.
APA Style Cheat-Sheet for Hypothesis Tests
- Italicize statistical symbols (t, z, F, p, M, SD, N, n, d, r); do not italicize Greek letters (χ², α, η²).
- Put a space on both sides of =, < and >. Report t and z to 2 decimals and p to 3 decimals without a leading zero (p = .034). Write p < .001 for tiny values — never p = .000.
- Report degrees of freedom in parentheses: t(35), χ²(2, N = 140). Welch’s t keeps the fractional df (e.g., 59.54).
- Always add an effect size (d, h, V, w) and a confidence interval, e.g., 95% CI [1.01, 11.59].
- Say “statistically significant” only when p < α. For non-significant results write “did not differ significantly” — never “proved no difference”.
- For a one-tailed test, add “one-tailed” after the p-value and justify it before looking at the data.
Frequently Asked Questions
You did not find enough evidence against H₀. A large p-value never proves H₀ is true — the sample may simply be too small to detect a real effect.
Use two-tailed unless a difference in only one direction is meaningful and was decided before seeing the data. A one-tailed test is more powerful in the chosen direction but cannot detect an effect in the other.
Welch’s test does not require equal variances and loses almost nothing when variances are equal, so it is the safer default.
With huge samples, trivial differences become “significant”. Effect sizes such as Cohen’s d (0.2 small, 0.5 medium, 0.8 large) tell you how large the difference actually is.