Course contentsShow
← Data Science
Lesson 1391 of 2,14535. Statistical Anomaly DetectionFree lesson

The Grubbs' Test Statistic

Computing the G statistic as the maximum absolute deviation from the mean in standard deviation units.

The Grubbs' Test Statistic

You'll learn: How to compute the G statistic that quantifies how extreme a suspected outlier is relative to your dataset.

The Core Idea

Grubbs' test identifies outliers by measuring how far the most extreme value deviates from the mean, expressed in standard deviation units. The test statistic, called G, captures this distance in a single number that you can compare against critical values to decide if the point is truly anomalous.

Think of it like grading on a curve: if most students score between 70-90, a score of 15 stands out dramatically. The G statistic quantifies how many curve-widths away that extreme score sits.

Computing the G Statistic

The formula is straightforward:

G = |X - X̄| / s

Where:

  • X is the suspected outlier (the maximum or minimum value)
  • X̄ is the sample mean
  • s is the sample standard deviation
  • | | denotes absolute value

You calculate G for whichever data point is farthest from the mean — either the maximum or minimum value in your dataset.

The Process

  1. Compute the mean and standard deviation of your dataset
  2. Identify the most extreme value (furthest from the mean)
  3. Calculate the absolute deviation: |X - mean|
  4. Divide by the standard deviation to get G

A larger G value means the point is more extreme. You'll later compare this computed G against a critical value from Grubbs' distribution tables to determine statistical significance.

Key Takeaway: The Grubbs' test statistic G measures the maximum deviation from the mean in standard deviation units, providing a standardized way to assess whether the most extreme point in your dataset is an outlier.