Statistical Process Control Tutorial Guide v7
Statistical Process Control Tutorial Guide v7
Process Control
Monitoring Quality
in Healthcare.
Tutorial
Guide.
Statistical Process Control (SPC) techniques, when applied to measurement data, can be
used to highlight areas that would benefit from further investigation. These techniques enable
the user to identify variation within their process. Understanding this variation is the first step
towards quality improvement.
There are many different SPC techniques that can be applied to data. The simplest SPC
techniques to implement are the run and control charts. The purpose of these techniques is to
identify when the process is displaying unusual behaviour.
The purpose of this guide is to provide an introduction to the application of run charts and
control charts for identifying unusual behaviour in healthcare processes. SPC techniques are
a tool for highlighting this unusual behaviour. However, these techniques do not necessarily
indicate that the process is either right or wrong – they merely indicate areas of the process
that could merit further investigation.
History of SPC
Statistical Process Control (SPC) Charts were first introduced in 1928. Commissioned by Bell
Laboratories to improve the quality of telephones manufactured, Walter Shewhart developed a
simple graphical method – the first of a growing range of SPC Charts.
Purpose of Guide
The purpose of this tutorial guide is to give a brief overview of the different types of SPC chart,
some guidance on the rules that should be applied to the charts, and how to interpret their
output.
An interactive tool has been produced to automate the production of SPC charts for the user.
This is an Excel-based tool which is hosted on the Quality Indicators pages of the ISD website.
Common Cause
All processes have random variation - known as ‘common cause variation’. A process
is said to be ‘in control’ if it exhibits only common cause variation i.e. the process is
completely stable and predictable, with any variation due to regular, natural or ordinary
causes.
Special Cause
Unexpected events/unplanned situations can result in ‘special cause variation’. A process
is said to be ‘out of control’ if it exhibits special cause variation i.e. the process is unstable
due to irregular or unnatural causes that are not inherent in the design of the process.
Areas of special cause variation may be of interest to the user for quality control or
improvement purposes and can be signals for underlying issues. A signal on a SPC chart does
not necessarily mean that something is wrong, nor do they tell the user what may be causing
the variation. They should instead be used as a trigger for further investigation.
Dynamic Processes
A process that is observed across time is known as a dynamic process. An SPC chart for
a dynamic process is often referred to as a ‘time-series’ or a ‘longitudinal’ SPC chart.
Static Processes
A process that is observed at a particular point in time is known as a static process. An
SPC chart for a static process is often referred to as a ‘cross-sectional’ SPC chart. A cross-
sectional SPC chart is a good way to compare different institutions. For example, hospitals
or health boards can be compared as an alternative to league tables as we will see later.
Choosing the correct chart type is an important step, using the incorrect chart type can lead to
misinterpretation and cause a Type I or Type II statistical error.
Type I Error
Incorrectly flagging a signal when there is no signal present; this is known as a false positive.
Type II Error
Failing to flag a signal when a signal is actually present; this is known as a false negative.
Two of the most popular SPC tools in use today are the run chart and Shewhart control
chart. They are easy to construct, as no specialist software is required. They are easy to
interpret, as there are only a few basic rules to apply in order to identify the variation type
without the need to worry too much about the underlying statistical theory.
Run Chart
A time ordered sequence of data, with a centreline drawn horizontally through the chart,
usually based on the median. A run chart enables the monitoring of the process level and
identification of the type of variation in the process over time.
Control Chart
A time ordered sequence of data, with a centreline calculated by the mean. Control charts
bring the addition of control limits (and warning limits – optional). A control chart enables
the monitoring of the process level and identification of the type of variation in the process
over time with additional rules associated with the control (and warning) limits.
Example 1
The chart below shows an example run chart: the absolute value of the daily price
movement (%) of the FTSE100 Index from 4 November 2016 to 14 December 2016.
0.018
0.016
0.014
0.012
0.01
0.008
0.006
0.004
0.002
0
Dec 12, 2016
Dec 13, 2016
Dec 14, 2016
Dec 1, 2016
Dec 2, 2016
Dec 5, 2016
Dec 6, 2016
Dec 7, 2016
Dec 8, 2016
Dec 9, 2016
Nov 4, 2016
Nov 7, 2016
Nov 8, 2016
Nov 9, 2016
Nov 10, 2016
Nov 11, 2016
Nov 14, 2016
Nov 15, 2016
Nov 16, 2016
Nov 17, 2016
Nov 18, 2016
Nov 21, 2016
Nov 22, 2016
Nov 23, 2016
Nov 24, 2016
Nov 25, 2016
Nov 28, 2016
Nov 29, 2016
Nov 30, 2016
Useful Observations
Those observations that do not fall directly on the centreline are known as “useful
observations”. The number of useful observations in a sample is equal to the total number
of observations minus the number of observations falling on the centreline.
Run
A sequence of one or more consecutive useful observations on the same side of the
centreline. Any observations falling directly on the centreline can be ignored.
Table 1 below lists the rules which can be applied to the run chart for determining the type of
variation in the process.
Source: Perla, RJ., Provost, LP., Murray, SK. 2011. The run chart: a simple analytical tool for learning from
variation in healthcare processes. [Online]
Available at: http://www.wales.nhs.uk/sites3/Documents/841/Run%20charts%20%28August%202011%29.
pdf [Accessed 3 April 2017].
Run charts are a good chart to choose if the user is looking for something quick, simple and
basic, but their lack of statistical power makes them less able to reliably identify areas of
special cause variation (i.e. there will be more type II errors with run charts) than Shewhart
charts, so if the user is looking for something that is more robust, a run chart is unlikely to be
sufficient. However, as a starting point it is always better to plot a run chart first before any
other type of SPC chart.
There are many different types of chart available, and the correct chart to use depends on the
type of data being collected.
Types of Data
Continuous data
Occupy any value within a range. Typically a measurement of some kind, they are
unrestrained by “categories”, and can be infinite in range. Examples of continuous data
would be measurements of height, weight or length; monetary values and anything which
could be considered workload or throughput.
Discrete data
Observations where each possible observation is distinct from one another. It can be
categorical e.g. number of red balloons handed out at a fair; or numeric, typically count
data e.g. the number of falls in a care home each month; or binomial data e.g. how many
red balloons are handed out each hour. Typically, when putting a binomial process into an
SPC chart, the data should be presented as a proportion of a success, or a proportion of
failures.
Type II Error
Failing to flag a signal when a signal is actually present; this is known as a false negative.
Types of Distribution
Poisson
Data that has a Poisson distribution is discrete and is based on events occurring over time
(or space) at a fixed rate on average, but where each event occurs independently and at
random. For example, the number of new hip fracture admissions.
Binomial
Data that has a Binomial distribution is discrete and is based on data with only two
possibilities e.g. the probability of being dead or alive, male or female etc.
Geometric
Data that has a Geometric distribution is discrete and is based on the number of Bernoulli
trials until the first observation with a particular characteristic of interest, where trials are
independent and an occurrence is equally likely on each trial. For example, the number of
days between needles sticks.
A list of chart types and a brief summary of the types of data they serve is found in Table 3 (see
section 2.4 and section 2.5 for examples of their application). This is not an exhaustive list and
is not intended to be prescriptive. A judgement on the type of chart to use should be made
depending on what is appropriate for the data and what measures stakeholders are tracking.
This should be used as a guide only.
Figure 1 is a flow chart which illustrates the decision making process for choosing the correct
chart type.
No
Are data extreme/ Poisson Binomial Use T Chart
unlikely events, e.g.
HAI occurance?
Is there more than
one data point per
subgroup?
Use P Chart
Yes No
Use Xbar & S Chart Use XmR Chart
No Unequal
Use U Chart
Yes
Use G Chart
Is the Area of Equal
Opportunity equal or Use C Chart
unequal?
Table 4 contains standard Shewhart Control Chart Rules for identifying special cause
variation agreed for Improvement Programmes in NHS Scotland.
These are standard rules which should be sufficient for the vast majority of charts but they can
be adapted accordingly only if it is appropriate for the data and any changes have been agreed
beforehand.
Example 1
Hospital Standardised Mortality Ratios are calculated for all SPSP-participating hospitals
in Scotland. SPC charts can be very useful for this measure to identify areas of unnatural
variation.
As the data are continuous and consist of individual measurements, the preferred chart for
this would be an XmR chart. If HSMR was being calculated and then averaged for multiple
hospitals each quarter, then an Xbar chart would be suitable, with the process being the
average of each measurement across all sites (note: the number of sites should remain
constant).
1.6
1.4
1.2
HSMR
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
The chart above shows that the process looked relatively stable until quarter 19, where
there was a large spike, followed by two outlying quarters. This likely pulled the centreline
up slightly, leading to the downward shift in the centre. So, additional investigation of the
outlying quarters would be necessary.
As the data are binomial (acceptable/unacceptable), then the best chart for this type of data
is a P chart. The best way to plot this process is with the proportion of successes to the
number of overall beans. In this case, the process will be the proportion (percentage) of
green beans in each scoop.
40
Rate of green beans chosen (%)
35
30
25
20
15
10
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
The variable control limits come from the variable size of each sample. Scoops with more
beans will have tighter limits as the predicted proportion of green beans obtained by
random chance should tend towards the true mean (which the centreline is an estimate of)
when the sample size increases.
The above P chart shows no outliers, but does show a downward shift. There is also no
lower control limit as the calculated limit was less than 0, and a negative percentage is
impossible to achieve in this context.
As the data in this example are poisson counts, a C or U chart would be suitable, and
as there is room for one keyboard to have more loose keys than another, the chart used
should be a U chart.
0.3
Number of Loose Keys per
Sample of 10 keyboards
0.25
0.2
0.15
0.1
0.05
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
The mean number of defects (unadjusted for sample size) found per sample is 2.7 (~0.1 per
100 keys per sample). Most samples fluctuate closely around this number and no samples
are out of control, however there is a downward shift from sample 9 to sample 16,
indicating that further investigation is required to determine what was happening there.
As the data in this example are Poisson counts, a C or U chart would be suitable, and as
the number of residents in the home is constant month-to-month, a C chart is appropriate
here.
6
Number of Loose Keys per
Sample of 10 keyboards
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
The mean number of defect falls found per sample is around 2. Most samples fluctuate
closely around this number or below, however an upward shift is present in the final 6 data
points.
NOTE: these data could also be presented as a percentage (number of residents who fell/
total number of residents).
These advantages and disadvantages are for information purposes only and are not intended to
try and sway a user towards one approach or the other. The decision to use just an XmR chart
is down to the user(s) and should be agreed upon before production of any chart begins.
Run charts and Shewhart control charts are not the only type of SPC chart available, and a
process over time is not the only type of data which can be put into an SPC chart. Data which
are point-in-time comparisons, e.g. crude mortality rates by hospital for one quarter in Scotland
could be put into an appropriate funnel plot to be compared against the national average. Like
Shewhart control charts, there are a number of approaches to funnel plots (based on Xbar+S, P
or U charts) depending on the data.
Further Information
There are a wide range of online resources on the use and calculation of SPC charts. As
mentioned in the introduction, the Quality Indicators team have produced an interactive tool in
producing SPC charts. The tool takes the user through the selection process step-by-step and
decides what the best chart is to use.
The Quality Improvement hub has pages dedicated to Shewhart control charts and run charts.
The Healthcare Data Guideiii is an excellent reference guide for this type of analysis.
Acknowledgments
This document was prepared by the Quality Indicators Team from both knowledge of the topic
within PHI and reference material. This document was circulated to individuals with Quality
Indicators and wider PHI for comments and feedback. Their input was much appreciated
and we are grateful for their advice. Any error or lack of clarity that remains is, however, our
responsibility.
Contact Information
If after reading this document you have any unanswered queries on SPC charts, or would
like to discuss any aspects further, please contact the Quality Indicators Team, via NSS.
isdQualityIndicators@nhs.net.
Where xij is the ith datapoint from group j and is the number of groups and n is the number of
data points per group.
P Chart
Where xij is the ith datapoint from group j and m is the number of groups and n is the number
of data points per group.
Where xi is the total number of “defects” from group j and m is the number of groups.
U Chart
Where xi is the total number of “defects” from group j, is the number of groups and n is the
sample size for each group.
T Chart
Where ti is the time between the ith event and n is the number of events.
G Chart
Where gi is the number of occurrences between the ith event and k is the number of events.