Test Statistic Calculator

This test statistic calculator computes the z, t, paired t, proportion, correlation t, chi-square or F statistic and shows the formula with your numbers filled in.

Checks on your data

  • The decision depends on the significance level you choose in advance. 0.05 is shown as a common default.
  • Each test assumes independent observations; t tests assume roughly normal data or a reasonably large sample.

Results

Test statistic t
2.3962862
Degrees of freedom
29
p-value (two-tailed)
0.0232339
Reject H₀ at α = 0.05?
Yes
Cohen's d
0.4375
Distribution of t under H₀ with the p-value shaded
-4-2024t = 2.396t
Show step-by-step solution
  1. Formula: t = (x̄ − μ₀) ÷ (s ÷ √n).
  2. Substitute: (103.5 − 100) ÷ (8 ÷ √30).
  3. Result: t = 2.3962862, df = 29.
  4. p-value = 0.0232339.
Testsz, t, paired, proportion, r, F, χ²
GivesStatistic, df, p-value
Effect sizeCohen's d
Default α0.05

What Is Test Statistic?

A test statistic measures how far your sample result is from what the null hypothesis predicts, in units of standard error. The larger it is in absolute value, the stronger the evidence against H₀.

Pick the test, enter your summary values and the calculator shows the formula, the substitution, the degrees of freedom, the p-value and, where it applies, Cohen’s d. A curve shows the distribution under H₀ with the p-value area shaded.

The sections below give the formulas, a worked t example and guidance on choosing between z and t.

How to Use the Test Statistic Calculator

  1. Pick the test.
  2. Enter your summary statistics.
  3. Read the statistic with the formula filled in.
  4. Compare the p-value with α.

Test Statistic Formula

t (one mean)

t=xˉ−μ0s/nt=\frac{\bar x-\mu_0}{s/\sqrt n}

z (proportion)

z=p^−p0p0(1−p0)/nz=\frac{\hat p-p_0}{\sqrt{p_0(1-p_0)/n}}

Chi-square

χ2=∑(O−E)2E\chi^2=\sum\frac{(O-E)^2}{E}

Test Statistic Variables Explained

SymbolMeaningNotes
x̄Sample mean
μ₀Hypothesised mean
sSample standard deviation
nSample size

Test Statistic Worked Example

A sample of 30 has mean 103.5 and SD 8 and we test μ₀ = 100. The standard error is 8 ÷ √30 = 1.4606, so t = 3.5 ÷ 1.4606 = 2.396 with 29 degrees of freedom. The two-tailed p-value is about 0.023, so H₀ is rejected at 5 %.

With the example values loaded in the calculator above, the steps are:

  1. Formula: t = (x̄ − μ₀) ÷ (s ÷ √n).
  2. Substitute: (103.5 − 100) ÷ (8 ÷ √30).
  3. Result: t = 2.3962862, df = 29.
  4. p-value = 0.0232339.

Result: Test statistic t = 2.3962862; p-value (two-tailed) = 0.0232339.

Where Test Statistic Is Used

Homework

Check each step of a test.

Lab reports

Compute the statistic from summary data.

Choosing a test

Compare z, t, F and chi-square.

Effect size

Get Cohen’s d with the test.

Common Test Statistic Mistakes to Avoid

  • Decide the alternative before looking at data.
  • Use t unless σ is truly known.
  • Report the effect size as well as p.

Test Statistic Terms and Definitions

Test statistic
A number computed from the sample that measures how far the data are from H₀ in standard-error units.

Test Statistic FAQs

What is a test statistic?

A value computed from your sample that is compared with a known distribution to judge H₀.

How do I calculate a test statistic?

Take the difference between the sample estimate and the hypothesised value, then divide by its standard error.

z or t?

Use z when the population SD is known or for proportions; use t when you estimate the SD from the sample.

How is the p-value found?

From the tail area of the distribution beyond the test statistic.

Related calculators

Last updated 2026-11-09. See our disclaimer.