Standard Deviation Plot
NIST/SEMATECH Section 1.3.3.28 Standard Deviation Plot
What It Is
A standard deviation plot displays the group standard deviations versus group identifier, with a horizontal reference line drawn at the overall standard deviation. It is the scale counterpart to the mean plot, used to determine whether the variability of a process or measurement is constant across groups or changing over time.
The horizontal axis shows group identifiers (categorical or ordered, e.g., months, time windows, or factor levels). The vertical axis shows the within-group standard deviation. A horizontal reference line is drawn at the overall standard deviation of the full dataset. When the standard deviations cluster near the reference line, the variance is approximately constant across groups. Departures from the line reveal where and by how much the variability changes.
Questions This Plot Answers
- Are there any shifts in variation?
- What is the magnitude of the shifts in variation?
- Is there a distinct pattern in the shifts in variation?
Why It Matters
A common assumption in one-factor analyses is that of equal variances across factor levels. The standard deviation plot provides a graphical check for that assumption. For univariate data, grouping the data into equal-sized intervals and plotting the standard deviation of each group provides a graphical test of whether the variance is constant over time.
When to Use a Standard Deviation Plot
Use a standard deviation plot to detect changes in scale between groups of data. The grouping is determined by the analyst — the groups may be levels of a factor variable, months of the year, or arbitrary equal-sized segments of a time series. Standard deviation plots are typically used in conjunction with mean plots: the mean plot checks for shifts in location while the standard deviation plot checks for shifts in scale. A common assumption in one-factor analyses is that of equal variances; this plot provides a graphical check of that assumption.
How to Interpret a Standard Deviation Plot
The horizontal axis shows the group identifier and the vertical axis shows the group standard deviations. The overall reference line provides a baseline for comparison. Groups with standard deviations well above the reference line indicate periods or conditions of increased variability, while groups below the line indicate reduced variability. A distinct upward or downward trend suggests that the process variability is systematically changing over time. Although the standard deviation is the most commonly used measure of scale, the same concept applies to other robust measures such as the median absolute deviation or average absolute deviation, which may be preferred when significant outliers are present.
Assumptions and Limitations
The standard deviation plot requires multiple observations per group to compute meaningful within-group standard deviations. The sample standard deviation is sensitive to outliers within a group; for data with significant outliers, consider using the median absolute deviation instead. For arbitrary time-based grouping, the choice of group size affects the resolution: too few groups may miss short-term shifts, while too many groups produce noisy estimates.
Reference: NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.3.28
Formulas
Group Standard Deviation
The sample standard deviation within the j-th group, measuring the spread of observations around the group mean.
Overall Standard Deviation
The standard deviation of all N observations pooled together, serving as the horizontal reference line on the standard deviation plot.
Python Example
import numpy as npimport matplotlib.pyplot as plt
# Monthly data — standard deviation by month (similar to NIST PBF11.DAT)# Simulates a process where summer months have higher variabilityrng = np.random.default_rng(42)months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']# Higher spread in summer months (Jun-Aug)spreads = [2.1, 1.9, 2.3, 2.8, 3.2, 4.5, 5.1, 4.8, 3.5, 2.6, 2.0, 1.8]groups = [rng.normal(50, s, 20) for s in spreads]
# Compute group standard deviations and overall SDstds = [g.std(ddof=1) for g in groups]all_data = np.concatenate(groups)overall_sd = all_data.std(ddof=1)
fig, ax = plt.subplots(figsize=(10, 5))ax.plot(range(len(months)), stds, 's-', color='darkorange', markersize=8, linewidth=2, label='Monthly Std Dev')ax.axhline(overall_sd, color='red', linestyle='--', linewidth=1.5, label=f'Overall SD = {overall_sd:.2f}')ax.set_xticks(range(len(months)))ax.set_xticklabels(months)ax.set_xlabel("Month")ax.set_ylabel("Standard Deviation")ax.set_title("Standard Deviation Plot — Monthly Variation")ax.legend()ax.grid(True, alpha=0.3)plt.tight_layout()plt.show()