The construction of a Control Chart follows
some simple general rules. The first thing to
plot is the Center Line. Usually, this is a
mean or average of the data being charted, but
not always. Next we need an estimate of Sigma
calculated for each subgroup. The Control Limits
are then plotted at 3sigma above and below
the Center Line for each subgroup. In this discussion,
we won’t get into the various rules which
are then applied that indicate whether we have
an out of control situation. Simple, but the
devil is in the details.
Calculating the Center Line
i chart (also called X chart,
individual chart, Item chart)
For the i chart, where each point of the
data is plotted individually, the Center Line
is the mean. The calculation of the Center Line
(CL) is simply the average of the data being
plotted: sum(data) / number of data points.
Attribute Charts (for count or pass/fail
type data)
Since the c chart is simply plotting counts,
the Center Line calculation is similar with
the CL being the average of the counts being
plotted.
The p chart and the u chart calculate the mean
as the sum of the numerator divided by the sum
of the denominator. That is, the average fraction
rejected for the p chart (pcap) and total nonconformities
divided by the total units (ucap) for the c
chart.
Variable Charts (for measurement
type data)
The Xbar chart is a little more complex.
With the Xbar chart we are plotting the mean
(Xbar) values of the subgroups. If all the subgroups
are the same size, then the CL is XBarBar, the
mean of the means. So Xbar is the mean of each
of those subgroups, one for each subgroup. XBarBar
is the mean of the XBars.
If we have varying subgroups, then we need
to weight them by subgroup size. To calculate
the estimated sigma we sum the products of the
Xbar and Subgroup size and divide that by the
sum of the subgroup sizes:
(n_1*Xbar_1+n_2*Xbar_2+…+n_N*Xbar_N)
/ (n_1+n_2+…+n_N)
where n_i is the subgroup size of the ith subgroup
and Xbar_i is the mean of the data in the ith
subgroup.
The R Chart uses the average of the Subgroup
Ranges for the Center Line. If, however, we
have varying subgroup sizes, then we need to
use SigmaCap *d2_i. SigmaCap is explained in
calculations of Sigma for Xbar and R Charts
below. (Notice that this can mean that the CL
can vary by subgroup as shown in the example
Range Chart Construction.)
The Median Chart has two methods for calculating
the CL depending on whether we are using Mean
of the medians (/mean option) or median of the
medians. We start by calculating the medians
of each subgroup, then taking either the average
or the median of these to arrive at the Center
Line.
Estimating Sigma
We next need to estimate sigma for each subgroup.
We do this because we are trying to find if
there is a difference in the subgroup variation
between subgroups. The estimated sigma for each
subgroup is the within subgroup variation. Once
we have this estimated sigma, the upper control
limits is the CL + 3*sigma and the lower control
limit is CL – 3*sigma.
i Chart
The i chart uses moving ranges to calculate
the estimated sigma. In the command gichart
width by 2, the 2 indicates the number
of points used to calculate the moving range.
The first moving range is between points 1 and
2, the second between points 2 and 3, etc. The
estimated sigma is calculated using the average
of these moving ranges. Sigma, then, is this
average divided by d2.
d2 is a published constant that is dependent
on the subgroup size, in this case 2. For an
i chart that uses 2 as the subgroup size, this
value is 1.128. Many control charts use some
constant such as this, each dependent on the
subgroup size.
We’ve set up some illustrations of these
calculations on our Statit eQC Live Demo. Log
into live.statit.com
and choose the Chart Construction category.
I Chart Construction will demonstrate the calculations
for the i chart we have discussed.
Hover over data points
to see data values and tips
Attribute Charts
The attribute charts are exceptions in that
they do not need the constant. For example,
the p chart estimates sigma with sqrt(pcap(1pcap)/n_i)
where pcap is the CL calculated above and n_i
is the size of the subgroup for that point.
Since the p chart calculates the fraction or
percent of rejects, the ni is the denominator
for each subgroup. It is important to note that
the magnitude of sigma is inversely proportional
to the square root of the number of date points
making up a subgroup. Thus, your control limits
are tighter for a plotted point that has larger
denominator.
These calculations are illustrated in P Chart
Construction in the category Chart Construction
at http://live.statit.com
Hover over data points
to see data values and tips
The u chart is similar with the calculation
for sigma being sqrt(ucap/ni), where ucap is
the total nonconformities divided by total units.
Variable Charts
On the Variable Charts, things are a bit
more complex. The Xbar chart can estimate sigma
based on either subgroup ranges or subgroup
standard deviations. When based on subgroup
ranges and different subgroup sizes, the estimated
Sigmacap is calculated as:
(R_1*f_1/d2_1+R_2*f_2/d2_2
+ … + R_N*f_N/d2_N)/(f_1+f_2+…+f_N)
where f_i and d2_i are a ratio of constants
and a constant, respectively, that are subgroup
size dependent. The Sigmacap is an overall process
sigma with the above formula calculating one
number. However, the subgroup sizes come into
play with the weighting that the f and d2 constants
give. Then, to finally calculate the subgroup
sigma, the number from the above formula is
divided by the subgroup size, n_i. This produces
the inverse relationship between sigma and the
subgroup size, so that a larger subgroup will
have a smaller sigma.
Hover over data points
to see data values and tips
There is a similar formula for subgroup standard
deviation calculations.
For the Range Chart, the same formula for Sigmacap
is used, but to calculate the subgroup sigma,
the subgroup d3 constant is multiplied by the
Sigmacap. Again, the value of d3 is dependent
on the subgroup size. The list of d2 and d3
values are available for subgroup sizes with
the “d2 d3 Table” macro in the Chart
Construction category on http://live.statit.com.
Notice that the Lower Control Limit cannot go
below zero. If the calculation yields a negative
value, zero is used.
Hover over data points
to see data values and tips
Conclusion
In conclusion, we can identify the common components
of a control chart. First is the Center Line,
which may be an average of some values or the
median. The calculation of the Center Line depends
on the type of chart.
The Control Limits are calculated as CL + 3*sigma
and CL – 3*sigma. The calculation of the
sigma value is dependent on the chart type and,
perhaps, on the options chosen for the chart.
The control limits on an I chart are constant
while those for the Xbar, p chart, u chart and
most other charts are dependent on the subgroup
size.
Many constants are used in calculation of the
control limits for variable charts. The constants
are, as well, dependent on the subgroup size.
One thing we cannot do is calculate a standard
deviation of the data and assume that that is
the value of sigma we want to use. Sigma and,
thus, Control Limits depend on the subgroup
size of the chart, and usually need to be calculated
subgroup by subgroup.
References:
Statit Custom QC Help > Quality Control
> QC Formulas
Burr, I.W. (1969), "Control Charts for
Measurements with Varying Sample Sizes",
Journal of Quality Technology, 1:163:7.
