Course contentsShow
← Data Science
Lesson 314 of 2,1459. Hypothesis Testing FoundationsFree lesson

What is a Test Statistic?

Define test statistics as standardized measures that quantify how far sample data deviates from the null hypothesis.

What is a Test Statistic?

You'll learn: How we turn sample data into a single number that measures how unusual our results are under the null hypothesis.

The Core Idea

A test statistic is a standardized measure that quantifies how far your sample data deviates from what you'd expect if the null hypothesis (H₀) were true. Think of it as a "weirdness score" for your data.

Remember the legal analogy from earlier lessons? If hypothesis testing is like a trial where the null hypothesis is "innocent until proven guilty," the test statistic is the prosecution's evidence converted into a single numerical value. It doesn't say "guilty" or "not guilty" by itself—it just measures how strong the evidence is.

Why Standardize?

Imagine you sampled 100 people and found their average height was 68 inches. Is that unusual? Well, it depends on what you expected, how much heights vary, and how big your sample was.

The test statistic combines all these factors into one number, typically by:

  1. Taking the difference between what you observed and what H₀ predicts
  2. Dividing by the standard error (how much you'd expect samples to vary)

This standardization lets you compare results across different studies, sample sizes, and units of measurement.

An Everyday Analogy

Think of a test statistic like a z-score you learned earlier. Just as a z-score tells you "how many standard deviations away from the mean" a value is, a test statistic tells you "how many standard errors away from the null hypothesis" your sample result is.

Key Takeaway: A test statistic is a standardized number that measures how incompatible your sample data is with the null hypothesis—the bigger the test statistic, the stronger the evidence against H₀.