Short-Runs Control Charts (Variables Data) with Python
By: Roberto Salazar
Tags: Programming, Quality Assurance, Engineering, Python, Industrial Engineering

Python for Industrial Engineers

Short-Runs Control Charts (Variables Data) with Python

Image by Steven Lelham available at Unsplash

Quality Control Charts

Quality control charts represent a great tool for engineers to monitor if a process is under statistical control. They help visualize variation, find and correct problems when they occur, predict expected ranges of outcomes and analyze patterns of process variation from special or common causes. Quality control charts are often used in Lean Six Sigma projects and DMAIC projects under the control phase and are considered as one of the seven basic quality tools for process improvement.

Control Limits

Control limits are plotted lines above and below the center line (i.e. mean) in quality control charts that function as thresholds to identify signals (i.e. points beyond control limits) and help determining if a process is under statistical control. They are defined by formulas specific to each type of control chart that include constants, which vary depending on the sample size. Such constants are listed in the following table:

Control Limit Constants

Short-Runs Control Charts for Continuous Data

Short-runs control charts (also known as Deviation from Nominal control charts) are a group of quality control charts used on high-mix, low-volume (i.e. customizable products) environments. Short-runs control charts, instead of evaluating the variations of each measurement, they evaluate the variation of parts from their target.

For the following examples, each type of short-runs quality control chart for continuous data will be built from scratch using Python. In the same way, a brief description of each control chart will be provided. Let’s take a look at the Python codes.

Target IX chart and MR chart

The Target IX chart (also known as individuals X deviation chart, difference chart or nominal chart) and MR chart are used to monitor and evaluate the consistency of variables (measurement) data. The Target IX chart is similar to a regular IX chart with one exception: the plot points are the difference between the individual data point and its target.

The Target IX chart and MR chart may have different runs combined on the same chart only if the variances of the different targets are identical. In order to use the Target IX chart along with the MR chart, the sample size n must be equal to 1 and there should be a unique target value for each sample.

On the Target IX chart, the y-axis shows the deviation from the target, target value (i.e. 0), center line and control limits while the x-axis shows the sample units. On the MR chart, the y-axis shows the moving range, center line and control limits while the x-axis shows the sample units.

Z-bar chart and W chart

The Z-bar chart and W chart are used when the variations between runs with different targets is too large to use Target IX chart and MR chart. The Z-bar chart and W chart are a type of normalization of X-bar chart and R chart for subgrouped data.

The Z-bar chart and W chart may have different runs combined on the same chart only if the sample size n is equal for all parts. The Target Xbar2 and Target Rbar can be obtained from prior control charts, historical data, prior experience or nominal specifications.

On the Z-bar chart, the y-axis shows the normalized deviation from the target, center line (i.e. target value = 0) and control limits while the x-axis shows the sample groups. On the W chart, the y-axis shows the normalized range, center line (i.e. target value = 1) and control limits while the x-axis shows the sample groups.

Z chart and MW chart

The Z chart and W chart are used when the variations between runs with different targets is too large to use Target IX chart and MR chart. The Z chart and W chart are a type of normalization of individuals X chart and MR chart.

The Z chart and W chart may have different runs combined on the same chart only if the sample size n is equal for all parts.

On the Z chart, the y-axis shows the normalized deviation from the target, center line (i.e. target value = 0) and control limits while the x-axis shows the sample units. On the MW chart, the y-axis shows the normalized moving range, center line (i.e. target value = 1) and control limits while the x-axis shows the sample units.

Concluding Thoughts

Quality control charts represent great tools for analyzing processes stability and obtaining significant statistical information to be used during Lean Six Sigma and DMAIC projects for process improvement. Quality and industrial engineers must be capable of interpreting them accurately to identify undesirable trends that could lead to potential nonconformities in order to take preventive actions rather than corrective actions, and thus, reduce scrap and waste.

This guide covers step-by-step tutorials on how to build short-runs quality control charts from scratch using multiple Python libraries. Taking into consideration its high popularity among professionals and academics, Python represents a great tool capable of building quality control charts for statistical purposes. While there are other programs and software available where they can be built as well (e.g. Minitab, R, Microsoft Excel), it is up to quality and industrial engineers to decide which one to use based on their coding and analytical skills while complying with the organization’s objectives and the customers’ specifications.

— —

If you found this article useful, feel welcome to download my personal code on GitHub. You can also email me directly at rsalaza4@binghamton.edu and find me on LinkedIn. Interested in learning more about data analytics, data science and machine learning applications in the engineering field? Explore my previous articles by visiting my Medium profile. Thanks for reading.

- Robert