Hypothesis Test Calculator (t, z, Chi-Square)

Hypothesis tests show whether a difference in data is larger than chance alone would explain. Run the most common tests from summary statistics and get the test statistic, p-value and decision at your chosen significance level.

How it works

Run the most common significance tests from summary statistics: one-sample and two-sample (Welch) t-tests, one- and two-proportion z-tests, and the chi-square test of independence.

One-sample t = (x̄ − μ₀) ÷ (s ÷ √n),  df = n − 1
Welch t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂),  Welch–Satterthwaite df
One-proportion z = (p̂ − p₀) ÷ √(p₀(1 − p₀) ÷ n)
Two-proportion z = (p̂₁ − p̂₂) ÷ √(p̄(1 − p̄)(1/n₁ + 1/n₂))
χ² = Σ (Observed − Expected)² ÷ Expected,  df = (rows − 1)(columns − 1)

Common uses

  • Comparing performance before and after a change
  • A/B tests and survey comparisons
  • Statistics coursework and research

Worked example

The calculator above opens with this example. Change any input to see the results update instantly, or select Reset to return to these figures.

TestTwo-sample t-test (Welch, means)
Sample 1 mean48.2
Sample 1 standard deviation9.4
Sample 1 size42
Sample 2 mean43.6
Sample 2 standard deviation10.1
Sample 2 size38
Alternative hypothesisTwo-tailed (≠)
Significance level (α)5%
Example inputs
DecisionReject H₀
p-value0.0389
Test statistic (t)2.1022
Degrees of freedom75.74
Difference in means4.60
Standard error2.1882
Results

The result is statistically significant: data this extreme would be unlikely if the null hypothesis were true. Statistical significance does not measure practical importance; check the size of the effect as well.

Interpreting the results

  • Choose the alternative hypothesis before looking at the data; switching to a one-tailed test after the fact inflates false positives.
  • Welch’s t-test does not assume equal variances and is a safe default for comparing two means.
  • Chi-square results are unreliable when expected counts fall below 5; combine categories or use an exact test.

Frequently asked questions

What does a p-value mean?

The p-value is the probability of observing results at least as extreme as the data if the null hypothesis were true. A small p-value, typically below 0.05, suggests the data are inconsistent with the null hypothesis.

When should I use Welch’s t-test?

Use Welch’s t-test to compare two means when the groups may have different variances or sizes. It does not require the equal-variance assumption of Student’s t-test and performs well in most practical situations.

What does the chi-square test of independence show?

It tests whether two categorical variables, such as payer type and service line, are related. A significant result means the distribution of one variable differs across categories of the other.

Browse all 13 Statistics & Forecasting calculators