Test statistic vs p-value

By Jude Wallis · Published

A test statistic measures how far your sample result sits from what the null hypothesis claims, in standard errors for a z or t test. A p-value is the probability, if the null is true, of a test statistic at least that extreme. The statistic is a distance and the p-value is the tail area beyond it.

The p-value has its own topic, 3.6, in Unit 3 of the Fall 2026 AP Statistics course, and the test statistic is computed in the carrying-out topics: 3.7 for a proportion and 4.5 for a mean, with 3.13, 3.15, and 4.10 repeating the pattern for two proportions, chi-square, and two means.

Test statistic vs p-value: the short answer

A significance test produces two numbers in sequence. The test statistic comes first: it compresses the sample into one number that measures distance from the null hypothesis. The p-value comes second: it converts that distance into a probability by finding the area under a reference curve at and beyond the test statistic.

The conversion needs two things the test statistic does not contain: the reference curve, with its degrees of freedom, and the direction of the alternative hypothesis. For that reason one test statistic can correspond to several different p-values, and you cannot read the strength of evidence from the statistic alone.

The link runs in one direction. On a fixed curve with a fixed alternative, a test statistic farther out in the direction of HaH_a always gives a smaller p-value.

What the test statistic measures

For proportions and means the test statistic has one form:

test statistic=statistic−null valuestandard error\text{test statistic} = \frac{\text{statistic} - \text{null value}}{\text{standard error}}

The result is a zz or a tt, and its unit is standard errors. A value of 1.50 says the sample statistic is 1.50 standard errors above the null value, and a value of −1.50-1.50 says the same distance below. It can be any real number.

The chi-square statistic, written χ2\chi^2, is built differently. It adds up (observed−expected)2expected\frac{(\text{observed} - \text{expected})^2}{\text{expected}} over the cells of a table, so it is never negative and carries no direction.

A test statistic is a property of the sample you drew. It is on the scale of the reference curve's horizontal axis, and on its own it is not a probability. The details of the zz and tt forms are in what is a standardized test statistic.

What the p-value measures

The p-value is the probability, computed assuming the null hypothesis is true, of getting a test statistic at least as extreme as the one observed, in the direction of the alternative hypothesis. It is an area under the reference curve, so it always lies between 0 and 1.

Which area depends on HaH_a:

  • Right-tailed alternative: the area to the right of the test statistic.
  • Left-tailed alternative: the area to the left of it.
  • Two-sided alternative: the area in both tails beyond ±\pm the test statistic.
  • Chi-square test: the area to the right, always.

A small p-value says a result like yours would be rare if H0H_0 were true, which counts as evidence against H0H_0. It is the number you compare with the significance level α\alpha (alpha) to make the decision. The careful wording is covered in what does a p-value mean.

One test statistic, several p-values

The table holds the test statistic at 2.50 and changes only the curve and the tail. The chi-square rows use 6.25, which is 2.5022.50^2.

Test statisticReference curveTail countedp-value
z=2.50z = 2.50Standard normalRight0.0062
z=2.50z = 2.50Standard normalBoth0.0124
t=2.50t = 2.50tt, 29 dfBoth0.0183
t=2.50t = 2.50tt, 9 dfBoth0.0339
t=2.50t = 2.50tt, 5 dfBoth0.0545
χ2=6.25\chi^2 = 6.25Chi-square, 1 dfRight0.0124
χ2=6.25\chi^2 = 6.25Chi-square, 2 dfRight0.0439
χ2=6.25\chi^2 = 6.25Chi-square, 4 dfRight0.1812

At α=0.05\alpha = 0.05 the first four rows reject H0H_0 and the fifth does not, with the same 2.50 in every one. The chi-square rows show the same pattern: 6.25 is convincing with 1 or 2 degrees of freedom and unremarkable with 4. A test statistic becomes interpretable only once the curve and the tail are named. You can check any row with the p-value calculator.

The differences side by side

FeatureTest statisticp-value
What it isA distance from the null claimA probability computed assuming H0H_0 is true
ScaleStandard errors for zz and tt0 to 1
Possible valuesAny real number for zz and tt; 0 or more for χ2\chi^2Between 0 and 1
Computed fromSample data and the null valueThe test statistic, the reference curve, and the direction of HaH_a
Where it sits on the curveA point on the horizontal axisAn area under the curve
Compared withA critical valueThe significance level α\alpha
Stronger evidence against H0H_0Farther out in the direction of HaH_aSmaller

When to use which. Report both. The test statistic shows the work and lets a reader check the calculation. The p-value carries the decision, because it is already on the same scale as α\alpha.

The classic mix-up and how to avoid it

The frequent error is reading a test statistic as if it were a probability, or a p-value as if it were a distance. Statements such as "z=2.50z = 2.50, so there is a 2.5% chance" or "the p-value is 0.03 standard errors" mix the two scales. A test statistic can be negative or larger than 1. A p-value cannot be either.

A second error is comparing the test statistic with α\alpha. A zz of 1.50 is larger than 0.05, and that comparison means nothing. Compare the p-value with α\alpha, or the test statistic with a critical value.

A third error is assuming the same statistic always means the same evidence. The table above shows 2.50 giving p-values from 0.0062 to 0.0545.

Neither number measures the size of an effect. A large sample shrinks the standard error, so a small difference can produce a large test statistic and a tiny p-value. Read the size of an effect from the estimate and its confidence interval, as statistical vs practical significance explains.

From a sample to a test statistic to a p-value

A report claims that 40% of a town's households own a pet. In a random sample of 150 households, 69 own a pet. Test H0:p=0.40H_0: p = 0.40 against Ha:p≠0.40H_a: p \neq 0.40 at α=0.05\alpha = 0.05. Give the test statistic and the p-value, and say what each one means.

  1. Check the large counts condition with the null value: 150(0.40)=60150(0.40) = 60 and 150(0.60)=90150(0.60) = 90, both at least 10. The sample is random, and 150 households is assumed to be under 10% of the town.

  2. Compute the sample proportion: p^=69150=0.46\hat{p} = \frac{69}{150} = 0.46.

  3. Compute the standard error under H0H_0: 0.40×0.60150=0.0016=0.04\sqrt{\frac{0.40 \times 0.60}{150}} = \sqrt{0.0016} = 0.04.

  4. Compute the test statistic: z=0.46−0.400.04=1.50z = \frac{0.46 - 0.40}{0.04} = 1.50. The sample proportion is 1.50 standard errors above the claimed value.

  5. Convert to a p-value. The alternative is two-sided, so count both tails of the standard normal curve: the area to the right of 1.50 is 0.0668, and doubling gives 2×0.0668=0.13362 \times 0.0668 = 0.1336.

  6. Decide: 0.1336>0.050.1336 > 0.05, so fail to reject H0H_0.

  7. See what the tail choice does. Had the alternative been Ha:p>0.40H_a: p > 0.40, the same z=1.50z = 1.50 would give a p-value of 0.0668. Had it been Ha:p<0.40H_a: p < 0.40, the p-value would be the area to the left of 1.50, which is 0.9332.

The test statistic is z=1.50z = 1.50: the sample proportion of 0.46 sits 1.50 standard errors above 0.40. The two-sided p-value is 0.1336: if 40% of households really own a pet, a sample proportion at least this far from 0.40 in either direction would occur about 13% of the time. That is not rare, so the test fails to reject H0H_0.

Equal test statistics, opposite decisions

Two studies each test H0:μ=20H_0: \mu = 20 against Ha:μ≠20H_a: \mu \neq 20 at α=0.05\alpha = 0.05, and both populations are stated to be approximately normal. Study A has n=30n = 30, xˉ=22\bar{x} = 22, s=4.3818s = 4.3818. Study B has n=6n = 6, xˉ=23\bar{x} = 23, s=2.9394s = 2.9394. Find each test statistic and p-value.

  1. Study A standard error: 4.381830=4.38185.4772=0.8000\frac{4.3818}{\sqrt{30}} = \frac{4.3818}{5.4772} = 0.8000.

  2. Study A test statistic: t=22−200.8000=2.50t = \frac{22 - 20}{0.8000} = 2.50, with 30−1=2930 - 1 = 29 degrees of freedom.

  3. Study B standard error: 2.93946=2.93942.4495=1.2000\frac{2.9394}{\sqrt{6}} = \frac{2.9394}{2.4495} = 1.2000.

  4. Study B test statistic: t=23−201.2000=2.50t = \frac{23 - 20}{1.2000} = 2.50, with 6−1=56 - 1 = 5 degrees of freedom.

  5. Convert each to a two-sided p-value on its own curve. With 29 degrees of freedom, t=2.50t = 2.50 gives 0.0183. With 5 degrees of freedom, t=2.50t = 2.50 gives 0.0545.

  6. Decide. Study A: 0.0183≤0.050.0183 \le 0.05, reject H0H_0. Study B: 0.0545>0.050.0545 > 0.05, fail to reject H0H_0.

Both studies have t=2.50t = 2.50. Study A's p-value is 0.0183 and it rejects H0H_0; Study B's p-value is 0.0545 and it fails to reject. The tt curve with 5 degrees of freedom has heavier tails than the curve with 29, so the same distance from the null leaves more area beyond it. The test statistic alone could not have told the two studies apart.

Frequently asked questions

Does a bigger test statistic always mean a smaller p-value?

On the same reference curve with the same alternative, yes: a test statistic farther out in the direction of HaH_a leaves less area beyond it. Across different curves or tails, no. A tt of 2.50 has a two-sided p-value of 0.0183 with 29 degrees of freedom and 0.0545 with 5.

Can a p-value be negative or greater than 1?

No. A p-value is a probability, so it lies between 0 and 1. A test statistic has no such limit: a zz or tt can be negative or well above 1. If your p-value falls outside 0 to 1, you have probably written down the test statistic instead.

Which one do I compare with alpha?

The p-value. Both the p-value and α\alpha are areas under the reference curve, so they can be compared directly: reject H0H_0 when the p-value is at or below α\alpha. The test statistic is compared with a critical value, which is a point on the horizontal axis.