Descriptive statistics: mean, standard deviation and quartiles

Updated

Descriptive statistics summarize a column of data in a few numbers: how many values there are, where they center (mean and median), how much they spread (standard deviation and quartiles) and how far they reach (minimum and maximum). They are the first thing to look at before any test, chart or capability study, because they show at a glance whether the data make sense.

When to use it

  • You have just collected or imported measurements and want to check them before going further.
  • You need the mean and standard deviation for a report, a sample size calculation or a quick capability estimate.
  • You want to compare a few columns side by side, such as the same dimension from two machines.
  • You want to spot problems early: missing values, a typo that became an outlier, or a column that was recorded in the wrong unit.

How it works

Take the values of a column that are present (not missing). Call them x₁ to xₙ, and sort them from smallest to largest.

  • N is how many values are present; N* is how many are missing.
  • Mean: the sum divided by N.
x̄ = (x₁ + x₂ + … + xₙ) / n
  • StDev, the sample standard deviation, measures the typical distance from the mean. It divides by n − 1, not n, so that it does not underestimate the spread of the process the sample came from.
s = √( Σ (xᵢ − x̄)² / (n − 1) )
  • SE Mean, the standard error of the mean, is how much the mean itself would vary from sample to sample: s / √n. It shrinks as the sample grows; the standard deviation does not.
  • Minimum and Maximum are the smallest and largest values.
  • Q1, Median and Q3 cut the sorted data into quarters. Each sits at rank (n + 1)p of the sorted data, with p = 0.25, 0.5 and 0.75; when the rank falls between two values, the result is interpolated between them. This is the definition the NIST/SEMATECH e-Handbook uses. Other programs sometimes use other definitions, so quartiles of small samples can differ slightly from one program to another.

Example

A machining cell turns bushings with a nominal bore of 25.000 mm. An inspector measures 15 bushings from the morning shift. One part fell into the chip bin before it was measured, so its value is recorded as missing (*).

Bore (mm)
25.01224.99825.00425.02124.987
25.00925.01524.99325.00625.011
25.00024.99625.01825.003*

The results:

NN*MeanSE MeanStDevMinimumQ1MedianQ3Maximum
14125.005210.002630.0098224.9870024.9975025.0050025.0127525.02100

Working through the quartiles: with 14 values, Q1 sits at rank 15 × 0.25 = 3.75, three quarters of the way from the 3rd smallest value (24.996) to the 4th (24.998), which gives 24.9975. The median sits at rank 7.5, halfway between 25.004 and 25.006.

Histogram of bore diameter024FrequencyTarget24.9825.0025.02Bore (mm)
Histogram of bore diameter

How to read the results

  • Check N and N* first. If N* is larger than you expected, find out why values are missing before you trust the rest. Parts that could not be measured are often the unusual ones.
  • Compare the mean and the median. Here they are 25.0052 and 25.005, almost the same, which fits a roughly symmetric spread. A mean well away from the median points to skewed data or a few extreme values.
  • Read the standard deviation against the tolerance. A standard deviation of about 0.010 mm means most bores fall within about ±0.03 mm of the mean (three standard deviations). If the tolerance were ±0.020 mm, this process could not hold it, whatever the mean.
  • Look at the extremes. A minimum or maximum far beyond the quartiles is worth a second look: a typing error, a measurement problem or a real special cause.
  • Use SE Mean for the mean, not for parts. It tells you how precisely the sample pins down the process mean (about ±2 × 0.0026 mm here), not how much individual parts vary.

Common mistakes

  • Using SE Mean as the spread of the process. It is much smaller than the standard deviation and makes a process look far better than it is.
  • Ignoring missing values. A blank cell and a * are not the same as zero; entering 0 for a missing part pulls the mean down and inflates the standard deviation.
  • Trusting the mean of mixed data. Bores from two machines or two shifts in one column can produce a reasonable-looking mean that describes neither. Describe each group on its own.
  • Stopping at the numbers. Two very different shapes can share a mean and standard deviation. Always look at a histogram or a boxplot as well.

Frequently asked questions

Why does the standard deviation divide by n − 1?

Because the deviations are measured from the sample mean, which is itself fitted to the data, they come out slightly too small on average. Dividing by n − 1 instead of n corrects for that, so the sample standard deviation estimates the process standard deviation without bias in its variance.

What is the difference between StDev and SE Mean?

StDev describes how much individual values vary. SE Mean describes how much the average of a sample of this size would vary if you took another sample. SE Mean equals StDev divided by the square root of N.

What does N* mean?

N* is the number of missing values in the column, shown as * in the worksheet. They are left out of every other statistic.

Why are my quartiles different in a spreadsheet?

Spreadsheets and statistics programs use several definitions of quartiles. The (n + 1)p rule used here is common in quality work; spreadsheet functions often use a different rule. The difference is small and disappears as the sample grows.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab