Graphical summary: statistics, histogram and intervals together

Updated

A graphical summary puts everything you need to judge one column of data on a single page: the descriptive statistics, a histogram with a normal curve, a boxplot, an Anderson–Darling normality test, and 95% confidence intervals for the mean, the median and the standard deviation. It answers three questions at once: what do the data look like, could they be normal, and how precisely do they pin down the process center and spread?

When to use it

  • As the first look at a new column, before a capability study, a control chart or a hypothesis test.
  • When you need to report a mean or standard deviation with its uncertainty, not just a single number.
  • When you have to decide between a test based on the mean (such as the 1-sample t-test) and one based on the median (such as the sign test or 1-sample Wilcoxon).
  • When you want to show a team the shape of a process in one picture.

How it works

The summary combines pieces that each have their own article:

  • Descriptive statistics: N, mean, standard deviation, variance, minimum, quartiles, median and maximum, as in descriptive statistics. Quartiles use the (n + 1)p rule.
  • Skewness and kurtosis: the adjusted sample versions. Skewness is near 0 for symmetric data and positive for a long right tail. Kurtosis (excess kurtosis) is near 0 for normal data, positive for heavy tails and negative for flat, short-tailed data.
  • Histogram and boxplot: the histogram shows the shape; the boxplot shows the median, the quartiles and any points far beyond them.
  • Anderson–Darling test: checks whether the data could come from a normal distribution. See normality test.
  • Confidence interval for the mean, based on the t distribution with n − 1 degrees of freedom:
x̄ ± t(0.975, n − 1) · s / √n
  • Confidence interval for the standard deviation, based on the chi-square distribution. It assumes normal data:
s · √((n − 1) / χ²(0.975, n − 1)) ≤ σ ≤ s · √((n − 1) / χ²(0.025, n − 1))
  • Confidence interval for the median, from the sorted data. The interval runs from the k-th smallest to the k-th largest value, where k is chosen from the binomial distribution with p = 0.5. Because ranks are whole numbers, the exact confidence is usually a little above 95%; this article reports that achieved confidence. Some programs interpolate between neighboring values to hit 95% exactly, which gives slightly narrower limits.

Example

A packaging line fills coffee bags labeled 500 g. The filler is set to aim at 503 g so that almost no bag is underweight. A technician weighs 25 bags taken across one shift:

Weight (g)
503.5501.2504.3504.6499.7
500.8503.2502.5503.0501.5
504.5504.3503.1504.9503.8
501.5503.6501.4504.5502.9
502.7501.8505.1502.7502.3

The graphical summary reports:

StatisticValue
N25
Mean502.936
StDev1.4151
Variance2.0024
Skewness−0.385
Kurtosis−0.482
Minimum499.70
Q1501.65
Median503.00
Q3504.30
Maximum505.10
Anderson–Darling A²0.273 (p = 0.637)
95% CI for the mean502.352 to 503.520
95% CI for the median502.30 to 503.80 (achieved confidence 95.7%)
95% CI for StDev1.105 to 1.969

Working through two of the intervals:

  • Mean: t(0.975, 24) = 2.0639, so the half-width is 2.0639 × 1.4151 / √25 = 0.584 g, and the interval is 502.936 ± 0.584.
  • Median: with n = 25, the probability that 7 or fewer of 25 values fall below the true median is 0.0216. So the interval runs from the 8th smallest value (502.3) to the 8th largest (503.8), with confidence 1 − 2 × 0.0216 = 0.957.
Histogram of coffee bag weight0246FrequencyLSLTarget500502504506Weight (g)
Histogram of coffee bag weight
Boxplot of coffee bag weight500502504Weight (g)Shift sample
Boxplot of coffee bag weight

How to read the results

  • Start with the normality test. A p-value of 0.637 gives no reason to doubt normality, so the mean, the t interval and the chi-square interval for σ are all trustworthy here.
  • Read the mean interval against the target. The interval 502.35 to 503.52 g contains the 503 g aim, so the data give no evidence that the filler is off its setting.
  • Read the spread against the label. One bag weighed 499.7 g, below the 500 g label. With a mean of about 502.9 g and σ between 1.1 and 2.0 g, the 500 g label sits only about 1.5 to 2.7 standard deviations below the mean. Some underweight bags are expected; a capability analysis would put a number on how many.
  • Use skewness and kurtosis as hints, not verdicts. With 25 values, a skewness of −0.39 is well within what normal data produce by chance.
  • Compare the mean and median intervals. When they overlap, as here, the center is clear. When the data are skewed, the median interval is the better description of a typical value.

Common mistakes

  • Reading the 95% interval as the range of individual bags. The interval for the mean is about ±0.6 g; individual bags vary about ±4 g. Use a tolerance interval for the range of parts.
  • Trusting the σ interval on non-normal data. The chi-square interval is sensitive to the shape of the distribution. If the normality test fails, treat it as rough.
  • Treating a high p-value as proof of normality. With small samples the test has little power. Look at the histogram and the probability plot too.
  • Summarizing mixed data. Bags from two filling heads in one column can look normal and still hide two different means. Summarize each head separately.

Frequently asked questions

Why is the confidence for the median interval not exactly 95%?

The median interval uses actual data values as its limits, and the confidence attached to each pair of ranks comes from the binomial distribution in steps. The nearest pair that gives at least 95% is reported, with its exact confidence. Interpolated intervals land on 95% but are an approximation.

Which normality test does the graphical summary use?

The Anderson–Darling test. It weighs the tails more heavily than the Kolmogorov–Smirnov test, which makes it good at spotting the tail problems that matter for capability and tolerance work.

What is the difference between a graphical summary and descriptive statistics?

Descriptive statistics give the numbers only. The graphical summary adds the pictures, a normality test and confidence intervals, so you can judge the shape and the uncertainty as well as the values.

How many values do I need?

There is no hard minimum, but intervals and the normality test are very rough below about 20 values. With 25 or more you get a usable picture of shape; with 100 or more the histogram becomes reliable.

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