Home / Articles / Engineering Mathematics
Engineering Mathematics · 4 min read

Statistics and Quality Control in Engineering

Learn how engineers use statistics for quality control: X-bar and R charts, control limits, process capability Cp and Cpk, with fully solved factory examples.

No two machined shafts, bottled drinks or concrete cubes are ever exactly alike. Statistical quality control gives engineers a disciplined way to tell normal, harmless variation from a real problem, before a factory produces thousands of rejects. In this guide we cover the essential statistics, build control charts and calculate process capability, using a realistic machining example throughout.

Variation: The Enemy of Quality

Every process has two kinds of variation:

  • Common-cause variation: the many small, random influences always present (tiny temperature changes, material differences, tool vibration). It cannot be removed without changing the process itself.
  • Special-cause variation: something specific has gone wrong, such as a worn tool, a wrong setting or a new batch of raw material. It should be found and fixed.

Walter Shewhart's insight in the 1920s was that statistics can separate the two. A process showing only common-cause variation is said to be in statistical control.

The Statistics You Need

For a sample of \( n \) measurements \( x_1, x_2, \ldots, x_n \):

$$ \bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i, \qquad s = \sqrt{\frac{1}{n - 1}\sum_{i=1}^{n}(x_i - \bar{x})^2} $$

The range \( R = x_{\max} - x_{\min} \) is a quick measure of spread that works well for small subgroups.

Many process outputs follow, at least approximately, a normal distribution. Then about 68.3% of values lie within \( \pm 1\sigma \) of the mean, 95.4% within \( \pm 2\sigma \) and 99.73% within \( \pm 3\sigma \). That last figure is why control limits are usually placed at three standard deviations.

Control Charts for Variables

Engineers usually take small subgroups (often \( n = 5 \)) at regular intervals and plot two charts:

  • An X-bar chart of subgroup means, which watches the process centre.
  • An R chart of subgroup ranges, which watches the process spread.

If \( \bar{\bar{x}} \) is the grand mean of all subgroup means and \( \bar{R} \) the average range, the control limits are

$$ UCL_{\bar{x}} = \bar{\bar{x}} + A_2\bar{R}, \qquad LCL_{\bar{x}} = \bar{\bar{x}} - A_2\bar{R} $$

$$ UCL_R = D_4\bar{R}, \qquad LCL_R = D_3\bar{R} $$

The constants come from standard tables. For \( n = 5 \): \( A_2 = 0.577 \), \( D_3 = 0 \), \( D_4 = 2.114 \) and \( d_2 = 2.326 \).

Signals that the process is out of control

  1. A point beyond either control limit.
  2. Seven or more consecutive points on one side of the centre line.
  3. Six points steadily rising or falling (a trend, often tool wear).
  4. Obvious cycles or patterns, such as shift-to-shift differences.

Solved Problem 1: Building X-bar and R Charts

A lathe turns shafts with a specified diameter of 25.00 ± 0.15 mm. Twenty-five subgroups of five shafts each are measured. One typical subgroup reads 25.04, 24.98, 25.06, 25.01 and 25.03 mm. Over all subgroups, the grand mean is 25.02 mm and the average range is 0.12 mm. Find the control limits.

Step 1: Check one subgroup. Mean and range of the sample subgroup:

$$ \bar{x} = \frac{25.04 + 24.98 + 25.06 + 25.01 + 25.03}{5} = \frac{125.12}{5} = 25.024\ \text{mm} $$

$$ R = 25.06 - 24.98 = 0.08\ \text{mm} $$

Step 2: X-bar chart limits.

$$ UCL_{\bar{x}} = 25.02 + (0.577)(0.12) = 25.02 + 0.069 = 25.089\ \text{mm} $$

$$ LCL_{\bar{x}} = 25.02 - 0.069 = 24.951\ \text{mm} $$

Step 3: R chart limits.

$$ UCL_R = (2.114)(0.12) = 0.254\ \text{mm}, \qquad LCL_R = (0)(0.12) = 0\ \text{mm} $$

Step 4: Interpret. The sample subgroup (mean 25.024 mm, range 0.08 mm) lies comfortably inside both sets of limits, so it shows no special cause.

Sanity check. The X-bar limits (±0.069 mm) are much narrower than the specification (±0.15 mm). That is expected, because averages of five values vary less than individual shafts, by a factor of \( \sqrt{5} \approx 2.24 \). Never confuse control limits, which describe what the process does, with specification limits, which describe what the customer wants.

Process Capability

A process can be perfectly in control and still produce rejects if its natural spread is too wide. Capability indices compare the spread with the tolerance.

First estimate the process standard deviation from the average range:

$$ \hat{\sigma} = \frac{\bar{R}}{d_2} $$

Then

$$ C_p = \frac{USL - LSL}{6\hat{\sigma}}, \qquad C_{pk} = \min\left(\frac{USL - \mu}{3\hat{\sigma}},\ \frac{\mu - LSL}{3\hat{\sigma}}\right) $$

\( C_p \) measures potential capability if the process were perfectly centred; \( C_{pk} \) accounts for the actual off-centre mean. Industry commonly expects \( C_{pk} \geq 1.33 \), and Six Sigma programmes aim higher.

Solved Problem 2: Is the Lathe Capable?

Using the data above (\( \bar{R} = 0.12 \) mm, \( \mu = 25.02 \) mm, \( USL = 25.15 \) mm, \( LSL = 24.85 \) mm), find \( C_p \), \( C_{pk} \) and the expected fraction of defective shafts.

Step 1: Estimate sigma.

$$ \hat{\sigma} = \frac{0.12\ \text{mm}}{2.326} = 0.0516\ \text{mm} $$

Step 2: Cp.

$$ C_p = \frac{25.15 - 24.85}{6(0.0516)} = \frac{0.30}{0.3095} = 0.97 $$

Step 3: Cpk. Distances from the mean to each limit are 0.13 mm (upper) and 0.17 mm (lower):

$$ C_{pk} = \frac{0.13}{3(0.0516)} = \frac{0.13}{0.1548} = 0.84 $$

Step 4: Fraction defective. Convert each distance into a z-score:

$$ z_U = \frac{0.13}{0.0516} = 2.52, \qquad z_L = \frac{0.17}{0.0516} = 3.30 $$

From normal tables, \( P(Z > 2.52) = 0.0059 \) and \( P(Z > 3.30) = 0.0005 \), so about 0.64% of shafts, roughly 6,400 parts per million, will be out of tolerance.

Sanity check. \( C_p \) below 1 means the natural \( 6\sigma \) spread is wider than the tolerance, so some rejects are unavoidable even if centred. Since the mean sits 0.02 mm high, most rejects are oversize, matching \( z_U < z_L \). Re-centring to 25.00 mm would raise \( C_{pk} \) to equal \( C_p \), about 0.97, and cut rejects to roughly 0.37%; reaching 1.33 would require reducing variation itself.

Did You Know?

  • Walter Shewhart drew the first control chart at Bell Telephone Laboratories in a memo dated 1924.
  • W. Edwards Deming taught statistical quality control to Japanese engineers from 1950, and Japan's top quality award is named the Deming Prize.
  • "Six Sigma" quality, popularised by Motorola in the 1980s, is usually quoted as 3.4 defects per million opportunities, allowing for a 1.5-sigma drift in the mean.

Key Takeaways

  • Control charts separate common-cause from special-cause variation using \( \pm 3\sigma \) limits.
  • For \( n = 5 \) subgroups, use \( A_2 = 0.577 \), \( D_4 = 2.114 \) and \( d_2 = 2.326 \).
  • Control limits are not specification limits; capability indices link the two.
  • \( C_{pk} \) below 1.33 signals a need to centre the process or reduce its variation.

For help with engineering statistics, control chart projects or Six Sigma assignments, Amathify's subject experts and PhD scholars offer step-by-step solutions via WhatsApp or the Ask a Question form.

Stuck on a problem or assignment?

Our experts and PhD scholars solve maths, physics and chemistry — step by step.

WhatsApp usAsk a question

Related articles