This chapter discusses control charts as an important tool of statistical process control (SPC). They may be divided into two major groups: control charts for variables and control charts for attributes. Among the control charts for variables, we will study the control charts for the mean (ˉX), for the range (R), and for the standard deviation (S). Among the control charts for attributes, we will study the p chart (defective fraction), the np chart (number of defective products), the c chart (total number of defects per unit), and the u chart (average number of defects per unit). Finally, to measure the process capability, we will study the main indexes: Cp, Cpk, Cpm, and Cpmk.
Keywords
Control charts for variables; Control charts for attributes; Control charts for the mean (ˉX); Control charts for the range (R); Control charts for the standard deviation (S); p chart; np chart; c chart; u chart; Process capability indexes
In God we trust. All others must bring data.
W. Edwards Deming
22.1 Introduction
Statistical process control (SPC) has been widely used to improve productivity, reducing the waste of inputs and rework, and, consequently, diminishing costs and increasing production capability. For Montgomery (2013), SPC is a set of tools used for solving problems whose main objective is to measure, monitor, control, and improve process quality. Control charts are an important SPC tool. They are used to assess process variability throughout time and to indicate whether the process is in control or not.
A process is in control when the variation in the product quality characteristics is only a result of random causes. These causes are inherent to the process (not identifiable), and they do not affect the product quality characteristics.
A process is out of control when the variation in the product quality characteristics or in the level of defects is a result of special causes that can be corrected or eliminated. This process variation is an anomaly, significantly impacting product quality characteristics, which requires an immediate intervention.
These special causes of variation can be a result of several factors, such as, ambient temperature, poor lighting, lack of equipment adjustments and maintenance, operators’ physical and mental fatigue, lack of training, quality of raw materials, etc.
The line chart presented in Section 3.2.1 in Chapter 3 is used to show the data evolution or trend of a quantitative variable at regular intervals. This chart can be used in process control to verify the evolution of the process mean throughout time.
Control charts can be divided into two major groups: control charts for variables, in which the quality characteristic is measured in a quantitative scale, and control charts for attributes, in which the quality characteristic is measured in a qualitative scale.
22.2 Estimating the Process Mean and Variability
Let X be a random variable that represents the quality characteristic, being normally distributed with a mean μ and with a known standard deviation σ, that is, X ~ N(μ, σ). In practice, since we usually do not know μ and σ, they must be estimated from samples or subgroups.
Thus, we must define the sampling method and the sample size. For Gomes (2010), the samples must be drawn from homogeneous batches formed by items produced by the same machine, operator and plant. According to the author, there is no predefined rule regarding the sample size, because it will depend on the production volume, on the inspection costs, and on how important the information obtained is.
The number of samples collected is represented by m, whose values usually vary between 20 and 30. Each sample contains n observations, whose values are small and are usually between 4 and 6.
For a certain sample i with n elements, its sample mean (ˉXi) is given by:
ˉXi=∑nj=1ˉXijn
(22.1)
where Xij is the j-th element of the i-th sample or subgroup. and its sample range (ˉRi) is:
ˉRi=Xmaxi−Xmini
(22.2)
so, ˉXi follows a normal distribution with a mean μ and a standard deviation σˉXi, that is, ˉXi~N(μ,σˉXi), such that:
E(ˉXi)=μ
(22.3)
Var(ˉXi)=σ2n
(22.4)
σˉXi=σ√n
(22.5)
Assume that m samples are collected, each one of them containing n observations of the quality characteristic to be investigated. Therefore, the mean of the sample or subgroup means and the mean of the sample ranges are given by:
̿X=∑mi=1ˉXim
(22.6)
ˉR=∑mi=1Rim,respectively,
(22.7)
where:
ˉXi= mean of the i-th sample or subgroup;
̿X= mean of the sample means;
m = number of samples;
n = number of observations for each sample;
Ri = range of the i-th sample or subgroup;
ˉR= mean of the sample ranges.
Consequently, we can use ̿X as an estimate for μ and ˉR/d2 as an estimate for σ, as we will see in the following section.
22.3 Control Charts for Variables
Control charts for variables, also known as Shewhart control charts, are used when the product quality characteristic is measured in continuous values, such as, temperature, length or width, weight, volume, concentration, etc.
In this case, it is necessary to monitor the average value and also the variability in the quality characteristic. To control the process mean, control charts for the mean (ˉX) are used. To monitor process variation, we have the control charts for the range (R) or the control charts for the standard deviation (S). Control charts for R are more commonly used to measure process variation (Montgomery, 2013).
Control charts for variables were developed by Shewhart aiming at detecting the presence of special causes in the variation of a certain process. Thus, if the process is under statistical control, future observations can be based on previous observations. For example, the graphical representation of a series of data is temporally plotted and the points plotted are compared to the control limits calculated previously. Hence, if one of these points is outside the control limits, this may indicate that the process is not in statistical control, that is, the control parameter has changed (Pylro, 2008).
22.3.1 Control Charts for ˉX and R
22.3.1.1 Control Charts for ˉX
Let X be a random variable that represents the quality characteristic with a normal distribution, mean μ, and a known variance σ2, that is, X ~ N(μ, σ2). Considering m samples of size n, the mean of the sample means is given by ̿X. Therefore, we have:
Z=̿X−μσ/√n~N(0,1)
(22.8)
that is, variable Z follows a standard normal distribution.
The probability of variable Z assuming values between − zα/2 and zα/2 is 1 − α, so:
P(−zα/2≤Z≤zα/2)=1−α
(22.9)
or:
P(−zα/2≤̿X−μσ/√n≤zα/2)=1−α
(22.10)
Therefore, the confidence interval for μ is:
P(̿X−zα/2σ√n≤μ≤̿X+zα/2σ√n)=1−α
(22.11)
In statistical process control, we usually adopt zα/2 = 3, so, the control limits for ˉX can be specified as:
UCL=ˉˉX+3σ√nCl=ˉˉXLCL=ˉˉX−3σ√n
(22.12)
where:
UCL: Upper Control Limit;
CL: Center Line;
LCL: Lower Control Limit.
These limits are also called three sigma control limits. The terms Upper and Lower Control Limits are also known as Upper Specification Limit (USL) and Lower Specification Limit (LSL). Fig. 22.1 shows the probability distribution of the mean and the confidence interval of 99.74% used as limits in the control charts.
In practice, since we do not know σ, we must estimate it. According to Sharpe et al. (2015), for normally distributed data, in which we do not have any other estimate of the standard deviation, we can use the relationship between the sample range i (Ri) and its standard deviation (σi), represented by the random variable W, called relative range:
W=Riσi
(22.13)
The mean of the distribution of W is a constant called d2 that depends on the sample size and its values can be found in Table O in the Appendix. By using this constant, the standard deviation estimator ˆσi is given by:
ˆσi=Rid2
(22.14)
Considering m samples of size n, the mean of the sample ranges is given by ˉR (Expression 22.7), and the sample standard deviation estimator can be written as:
The term 3d2√n can be substituted for A2, which is a constant that depends only on the sample size (n) and its values can be found in Table O in the Appendix.
UCL=ˉˉX+A2ˉRCL=ˉˉXLCL=ˉˉX−A2ˉR
(22.17)
22.3.1.2 Control Charts for R
According to Sharpe et al. (2015) and Montgomery (2013), the procedure for R control charts is very similar to the ˉX charts. The difference is that, in this case, we need to estimate the standard deviation for the range (σR).
The parameters of the R chart with the 3 sigma control limits are given by:
UCL=ˉR+3σRCL=ˉRLCL=ˉR−3σR
(22.18)
In practice, since we do not know σR, we must estimate it. Assuming that the quality characteristic is normally distributed, ˆσR can be calculated from the distribution of the relative range W = R/σ. The standard deviation of W, known as d3, is a constant that depends on the sample size (n). Given that:
R=Wσ
the standard deviation of the range (σR) is given by:
The values of constants D3 and D4 can be found in Table O in the Appendix for several values of n.
Example 22.1
The manufacturing process of a bookshelf is carried out by cutting steel sheets to produce the shelves, supports, and legs. The quality characteristic to be evaluated is the thickness of the steel sheet to make the shelves, measured in mm. Hence, 25 samples were used, each one of them with 5 observations, as shown in Table 22.E.1. The time interval between the samples or subgroups is 1 hour. Check and see if the process is in control by using the ˉX and R charts.
Table 22.E.1
Measurements of the Steel Sheet Thickness in mm
Sample
Measurements
m1
m2
m3
m4
m5
1
14.25
14.37
14.78
13.98
14.12
2
13.87
14.12
14.76
14.44
13.85
3
13.54
14.12
14.87
15.12
14.17
4
15.07
14.51
14.87
15.22
14.24
5
13.48
14.32
14.65
13.67
13.94
6
13.88
13.96
13.75
14.47
14.83
7
14.22
14.36
15.12
15.36
14.78
8
14.25
14.98
14.55
15.37
15.12
9
14.74
13.87
13.85
14.31
14.55
10
14.77
14.65
14.89
15.47
15.07
11
15.12
15.17
14.85
14.35
15.02
12
13.48
13.74
14.38
14.27
13.99
13
13.78
14.12
14.57
14.67
13.58
14
14.57
15.12
15.37
15.11
14.73
15
14.76
14.55
15.34
15.44
15.21
16
14.76
14.22
14.30
14.97
15.32
17
15.10
14.85
14.62
14.50
15.35
18
14.68
14.27
14.87
15.31
15.46
19
14.36
14.64
13.87
13.65
14.12
20
13.87
13.98
14.65
14.59
14.25
21
14.71
14.35
14.67
15.33
15.12
22
13.47
13.81
14.26
14.54
14.37
23
14.38
14.97
15.27
15.09
15.07
24
14.17
14.67
14.32
13.42
13.69
25
15.24
15.04
14.87
14.65
14.88
Solution
To specify the control limits, initially, we have to calculate each sample’s mean and range (ˉXi and Ri). After that, we have to calculate the mean of the sample means and the mean of the sample ranges:
̿X=∑25i=1ˉXi25=363.5425=14.54
ˉR=∑25i=1Ri25=24.6825=0.99
These calculations are shown in detail in Table 22.E.2.
Table 22.E.2
Calculating ̿X and ˉR
Sample
Measurements
m1
m2
m3
m4
m5
ˉXi
Ri
1
14.25
14.37
14.78
13.98
14.12
14.30
0.80
2
13.87
14.12
14.76
14.44
13.85
14.21
0.91
3
13.54
14.12
14.87
15.12
14.17
14.36
1.58
4
15.07
14.51
14.87
15.22
14.24
14.78
0.98
5
13.48
14.32
14.65
13.67
13.94
14.01
1.17
6
13.88
13.96
13.75
14.47
14.83
14.18
1.08
7
14.22
14.36
15.12
15.36
14.78
14.77
1.14
8
14.25
14.98
14.55
15.37
15.12
14.85
1.12
9
14.74
13.87
13.85
14.31
14.55
14.26
0.89
10
14.77
14.65
14.89
15.47
15.07
14.97
0.82
11
15.12
15.17
14.85
14.35
15.02
14.90
0.82
12
13.48
13.74
14.38
14.27
13.99
13.97
0.90
13
13.78
14.12
14.57
14.67
13.58
14.14
1.09
14
14.57
15.12
15.37
15.11
14.73
14.98
0.80
15
14.76
14.55
15.34
15.44
15.21
15.06
0.89
16
14.76
14.22
14.30
14.97
15.32
14.71
1.10
17
15.10
14.85
14.62
14.50
15.35
14.88
0.85
18
14.68
14.27
14.87
15.31
15.46
14.92
1.19
19
14.36
14.64
13.87
13.65
14.12
14.13
0.99
20
13.87
13.98
14.65
14.59
14.25
14.27
0.78
21
14.71
14.35
14.67
15.33
15.12
14.84
0.98
22
13.47
13.81
14.26
14.54
14.37
14.09
1.07
23
14.38
14.97
15.27
15.09
15.07
14.96
0.89
24
14.17
14.67
14.32
13.42
13.69
14.05
1.25
25
15.24
15.04
14.87
14.65
14.88
14.94
0.59
Sum
363.54
24.68
Mean
14.54
0.99
From Table O in the Appendix, we can determine the values of constants A2 = 0.577, D3 = 0 and D4 = 2.114 of the control limits for ˉX and R, considering n = 5.
Hence, the control limits for ˉX by using Expression (22.17) can be written as:
UCL=̿X+A2ˉR=14.5417+0.557×0.9872=15.1111
CL=̿X=14.5417
LCL=̿X−A2ˉR=14.5417−0.557×0.9872=13.9722
On the other hand, the control limits for R by using Expression (22.22) are:
UCL=D4ˉR=2.114×0.9872=2.0874
CL=ˉR=0.9872
LCL=D3ˉR=0.0000
The control charts for ˉX and R will be generated by using Stata and SPSS software, as shown in Figs. 22.2, 22.3, 22.8, and 22.9.
The R charts (Figs. 22.3 and 22.9) indicate that the process variation is in control. The same is not true in relation to the process mean. We can observe, from the ˉX control charts (Figs. 22.2 and 22.8), that there is one sample outside the control limits, providing strong evidence that the process mean changed due to the presence of special causes.
The presence of special causes can also be verified if the sequence of points in the chart is nonrandom (a trend, changes in the mean, seven consecutive points above or below the center line, or seven ascending or descending consecutive points).
Before investigating a special cause, it would be interesting to verify if there were any problems in the measuring system or an error when plotting the point. If these errors are not found, the company must revise its process and eliminate the special causes, making the process stable.
Solution by Using Stata Software
The data in Example 22.1 are available in the file Example_22.1.dta. To construct the ˉX chart on Stata, we have to use the following command:
xchart varlist [if] [in] [, xchart_options]
The variables in this example were called m1, m2, m3, m4, and m5. If we only type the command xchart followed by the name of the variables, a scatter plot will be constructed. To connect the points in the chart, it is necessary to include the option connect(l), which will generate the following command:
xchart m1-m5, connect(l)
The same logic applies to the R chart starting from the command rchart:
rchart varlist [if] [in] [, rchart_options]
Therefore, we must type the following command:
rchart m1-m5, connect(l)
Conversely, the ˉX and R charts can be obtained jointly by using Stata software, through the command shewhart:
shewhart m1-m5, connect(l)
Figs. 22.2 and 22.3 show the control charts for ˉX and R, respectively, which were obtained on Stata.
Solution by Using SPSS Software
The data in Example 22.1 are available in the file Example_22.1.sav. The first column represents the sample or subgroup under analysis. The observations that correspond to each sample are listed sequentially in the second column, a variable called Thickness, as shown in Fig. 22.4.
So, we must click on Analyze → Quality Control → Control Charts..., select, in Variables Charts, the option X-bar, R, s, define the variables we are interested in, and click, in Charts, on the options X-bar using range and Display R chart, as shown in Figs. 22.5, 22.6 and 22.7.
Figs. 22.8 and 22.9 show the control charts for ˉX and R, respectively, which were obtained from SPSS software.
22.3.2 Control Charts for ˉX and S
Even though the ˉX and R control charts are commonly used, depending on the case, it could be more interesting to use the standard deviation chart (S) to monitor the process’s dispersion. One advantage of the R chart is its simplicity and how easy it is to apply it. On the other hand, the S chart is more precise, since it considers all the data in each sample and not only the maximum and minimum values as the R chart. Therefore, the standard deviation is a more efficient measure of variation than the range, mainly for large samples (n > 10).
Constructing the ˉX and S control charts is similar to the ˉX and R charts, the only difference lies in the equations used to calculate the control limits.
For a certain sample i with n elements, its sample standard deviation (Si) is given by:
Si=√∑ni=1(Xi−ˉX)2n−1
Assuming that m samples were collected, each one of them containing n observations of the quality characteristic, the mean of the sample or subgroup means and the mean of the sample standard deviations are given by:
̿X=∑mi=1ˉXim
ˉS=∑mi=1Sim,respectively
The control limits for the mean (ˉX) are calculated as:
UCL=ˉˉX+A3ˉSCL=ˉˉXLCL=ˉˉX−A3ˉS
(22.23)
Constant A3 can be found in Table O in the Appendix for several different values of n.
And the control limits for the standard deviation (S) are given by:
UCL=B4ˉSCL=ˉSLCL=B3ˉS
(22.24)
Constants B3 and B4 can also be found in Table O in the Appendix for several different values of n.
Example 22.2
The production of strawberry seedlings is widespread in many Brazilian regions with temperate and subtropical climate. They can be used for in natura consumption or in manufacturing processes. The variable being analyzed is the crown diameter (mm). Hence, 20 samples were used, each one of them with 4 observations, as shown in Table 22.E.3. The time interval between the samples or subgroups is 30 minutes. Check and see if the process is in control by using the ˉX and S charts.
Table 22.E.3
Measurements of the Crown Diameter and mm
Sample
Measurements
m1
m2
m3
m4
1
8.62
8.12
8.44
8.33
2
8.10
8.27
8.65
8.48
3
8.64
8.59
8.87
8.96
4
9.01
8.87
9.22
9.15
5
9.14
9.08
8.87
8.74
6
9.24
9.41
9.37
9.52
7
9.05
9.12
8.87
8.69
8
8.56
8.74
8.45
8.72
9
8.45
8.14
8.24
8.53
10
8.48
8.97
8.64
8.45
11
8.89
8.69
9.03
9.15
12
9.24
9.34
9.09
9.41
13
9.25
9.42
9.36
9.65
14
8.75
9.21
8.83
8.42
15
8.47
8.68
8.49
8.68
16
9.01
9.24
9.36
9.48
17
9.22
8.76
8.94
8.86
18
9.14
9.54
9.36
9.51
19
8.50
8.97
8.65
8.72
20
8.27
8.34
8.47
8.41
Solution
To specify the control limits, initially, we have to calculate each sample’s mean and standard deviation (ˉXi and Si). After that, we have to calculate the mean of the sample means and the mean of the sample standard deviations:
̿X=∑20i=1ˉXi20=117.1520=8.86
ˉS=∑20i=1Si20=3.6420=0.18
These calculations are shown in detail in Table 22.E.4.
Table 22.E.4
Calculating ̿X and ˉS
Sample
Measurements
m1
m2
m3
m4
ˉXi
Si
1
8.62
8.12
8.44
8.33
8.38
0.21
2
8.10
8.27
8.65
8.48
8.38
0.24
3
8.64
8.59
8.87
8.96
8.77
0.18
4
9.01
8.87
9.22
9.15
9.06
0.16
5
9.14
9.08
8.87
8.74
8.96
0.19
6
9.24
9.41
9.37
9.52
9.39
0.12
7
9.05
9.12
8.87
8.69
8.93
0.19
8
8.56
8.74
8.45
8.72
8.62
0.14
9
8.45
8.14
8.24
8.53
8.34
0.18
10
8.48
8.97
8.64
8.45
8.64
0.24
11
8.89
8.69
9.03
9.15
8.94
0.20
12
9.24
9.34
9.09
9.41
9.27
0.14
13
9.25
9.42
9.36
9.65
9.42
0.17
14
8.75
9.21
8.83
8.42
8.80
0.32
15
8.47
8.68
8.49
8.68
8.58
0.12
16
9.01
9.24
9.36
9.48
9.27
0.20
17
9.22
8.76
8.94
8.86
8.95
0.20
18
9.14
9.54
9.36
9.51
9.39
0.18
19
8.5
8.97
8.65
8.72
8.71
0.20
20
8.27
8.34
8.47
8.41
8.37
0.09
Sum
177.15
3.64
Mean
8.86
0.18
From Table O in the Appendix, we can determine the values of constants A3 = 1.628, B3 = 0, and B4 = 2.266 of the control limits for ˉX and S, considering n = 4.
Therefore, the control limits for ˉX by using Expression (22.23) can be written as:
UCL=̿X+A3ˉS=8.8574+1.628×0.1822=9.1539
CL=̿X=8.8574
LCL=̿X−A3ˉS=8.8574−1.628×0.1822=8.5608
On the other hand, the control limits for S by using Expression (22.24) are:
UCL=B4ˉS=2.266×0.1822=0.4128
CL=ˉS=0.1822
LCL=B3ˉS=0
ˉX and S control charts will be generated by using SPSS and are not available on Stata.
Solution by Using SPSS Software
The data in Example 22.2 are available in the file Example_22.2.sav and can be seen in Fig. 22.10.
Similar to Example 22.1, we must click on Analyze → Quality Control → Control Charts..., select, in Variables Charts, the option X-bar, R, s and define the variables we are interested in. However, in Charts, we must select the options X-bar using standard deviation and Display s chart, as shown in Fig. 22.11.
Figs. 22.12 and 22.13 show the control charts for ˉX and S, respectively, which were obtained from SPSS software.
The S charts indicate that the process variation is in control. The same is not true in relation to the process mean. From the ˉX control charts, we can see that there are several samples outside the control limits, which suggests that the process is not in statistical control, that is, the process mean has changed.
22.4 Control Charts for Attributes
The Shewhart charts presented in the previous section are used to monitor process quality characteristics represented by quantitative variables. However, in several different cases, process quality is represented by a qualitative variable, usually with two categories (a binary variable): conforming and nonconforming items.
22.4.1 P Chart (Defective Fraction)
In many cases, the quality characteristic to be monitored is the proportion of defective items (p). If this proportion has increased, we must investigate the special causes for this variation and adjust the process. The proportions control chart is called p chart.
Consider the random variable D that represents the number of defective units in n observations. The proportion of defective items is given by p = D/n. As studied in Section 6.6.3 in Chapter 6, D follows a binomial distribution with parameters n and p, that is, D ~ b(n, p). The mean and the variance of D are given by:
E(D)=n⋅p
(22.25)
Var(D)=n⋅p⋅(1−p)
(22.26)
As the sample size increases, the binomial probability distribution becomes more similar to a normal distribution. The notation ˆp represents an estimate of the real value of p. Thus, the probability distribution of ˆp is normal with the mean and variance defined by:
E(ˆp)=p
(22.27)
Var(ˆp)=p⋅(1−p)n
(22.28)
When the proportion of nonconforming items (p) is known, 3σ control limits for p are established:
UCL=p+3√p⋅(1−p)nCL=pLCL=p−3√p⋅(1−p)n
(22.29)
when p is unknown, its value must be estimated from the data observed, considering a period in which the process is in control. These values are used to monitor future data. Analogous to the ˉX control charts, to calibrate the data and calculate the control limits for p, m samples are collected, each one of them containing n observations of the quality characteristic. If there are Di nonconforming units in sample i, the fraction of nonconforming items in the i-th sample is given by:
ˆpi=Din,i=1,…,m
(22.30)
The average proportion of defective items in these m samples (ˉp) is given by:
ˉp=∑mi=1ˆpim=∑mi=1Dim∙n
(22.31)
The ˉp statistic is an estimate of p, so, the control limits of 22.29 become:
UCL=ˉp+3√ˉp⋅(1−ˉp)nCL=ˉpLCL=ˉp−3√ˉp⋅(1−ˉp)n
(22.32)
In some cases, depending on the values of p and n, the lower control limit can be negative (LCL < 0). In these cases, we have to use LCL = 0 and assume that the control charts only have upper limits (Montgomery, 2013).
Example 22.3
Steel sheets with higher mechanical resistance are being used to manufacture several car parts, such as, wheels, bumpers, and other body parts. In a certain process, we tried to verify if the steel sheets produced met the quality characteristics required. In order to do that, 25 samples were collected, each one of them with 60 observations, and the number of defective steel sheets for each sample was verified, as shown in Table 22.E.5. The time interval between the samples or subgroups is 2 hours. Check and see if the process is in statistical control.
Table 22.E.5
Data on the Number of Defective Steel Sheets in Example 22.3
Sample Number
Number of Steel Sheets
Number of Defective Items
Proportion of Defective Items
1
60
6
0.100
2
60
7
0.117
3
60
5
0.083
4
60
3
0.050
5
60
7
0.117
6
60
8
0.133
7
60
6
0.100
8
60
5
0.083
9
60
5
0.083
10
60
10
0.167
11
60
8
0.133
12
60
7
0.117
13
60
9
0.150
14
60
11
0.183
15
60
9
0.150
16
60
4
0.067
17
60
8
0.133
18
60
6
0.100
19
60
7
0.117
20
60
8
0.133
21
60
8
0.133
22
60
11
0.183
23
60
10
0.167
24
60
4
0.067
25
60
6
0.100
Total
1,500
178
Solution
We have m = 25 samples and n = 60 observations for each sample.
The proportion of defective sheets for each sample is presented in Table 22.E.5. Therefore, the average proportion of defective steel sheets for these 25 samples (ˉp) is calculated as:
The data in Example 22.3 are available in the file Example_22.3.dta. The first variable, called sample, represents each one of the 25 samples being analyzed. The second column refers to the variable rejects, which computes the total number of defective parts for each sample. Finally, the variable ssize represents the number of steel sheets in each sample that, in this case, is 60. Hence, the command to be typed to construct the p chart on Stata is:
The data in Example 22.3 are available in the file Example_22.3.sav. The first column represents the sample or subgroup under analysis. The total number of defective parts for each sample is listed in sequence order in the second column, called rejects, as shown in Fig. 22.15. The third column, called ssize, is optional, since in the cases in which the sample sizes are constant, its respective value can be defined on the SPSS screen, as shown in Fig. 22.18.
So, we must click on Analyze → Quality Control → Control Charts..., define the option p, np in Attribute Charts and the option Cases are subgroups in Data Organization, select the variables of interest, and click on p (Proportion nonconforming) in Chart, as shown in Figs. 22.16, 22.17, and 22.18. Also in Fig. 22.18, in Sample Size, we must select the option Constant and define the value 60. Another alternative is to select the option Variable and insert the variable ssize, as shown in Fig. 22.19. By clicking on OK, we obtain the p chart on SPSS, as shown in Fig. 22.20.
We can verify through Fig. 22.20 that the process is in statistical control, since there are no points outside the control limits.
22.4.2 np Chart (Number of Defective Products)
Instead of using the proportion of defective items, the control chart can be based on the number of defective products(D = np), being called np control chart (np chart). Different from the p chart, this chart requires that the samples have the same size. Thus, the interpretation of the np chart is simpler when compared to the p chart.
When p is known, the control limits for np can be specified as:
UCL=np+3√np(1−p)CL=npLCL=np−3√np(1−p)
(22.33)
Otherwise, we use ˉp as an estimate of p:
UCL=nˉp+3√nˉp(1−ˉp)CL=npˉpLCL=nˉp−3√nˉp(1−ˉp)
(22.34)
Analogous to the p chart, the lower control limit for the np chart can also be negative. In these cases, we have to use LCL = 0.
Example 22.4
From the data in Example 22.3, construct the np chart and check if the process is in control.
Solution
We have n = 60 and ˉp=0.1187, as calculated in the previous example.
Stata does not offer the np chart. Therefore, Example 22.4 will only be solved on SPSS.
Solution by Using SPSS
Open the file Example_22.3.sav. Constructing the np chart follows the same logic as the p chart. Once again, click on Analyze → Quality Control → Control Charts..., define the option p, np in Attribute Charts and the option Cases are subgroups in Data Organization. Once again, select the variables of interest, the sample size and, this time, click on the option np (Number of nonconforming) in Chart, as shown in Fig. 22.21. By clicking on OK, we obtain the np chart on SPSS, as shown in Fig. 22.22.
Through Fig. 22.22, we can confirm that the process is in statistical control, since there are no points outside the control limits.
22.4.3 C Chart (Total Number of Defects per Unit)
In many situations, in addition to classifying the product as conforming or nonconforming, we are also interested in counting the number of defects per unit inspected. Thus, while the p chart controls the number of defective units, the c chart assesses the number of defects per unit inspected. As examples of application, we can mention the number of stains on a piece of clothing, the number of scratches on a piece of glass, the number of defects per steel sheet, etc. This chart requires that the samples observed have a constant size.
As presented in Section 5.3.7 in Chapter 5, consider a random variable X that represents the number of defects (k) in a certain unit of time, area, etc. Random variable X follows the Poisson distribution with parameter λ ≥ 0, called X ~ Poisson(λ), and its probability function is given by:
P(X=k)=e−λλkk!,k=0,1,2,…
(22.35)
In the Poisson distribution, the mean and the variance of X are represented by parameter λ, that is, E(X) = Var(X) = λ. Therefore, the c chart with 3σ control limits can be specified as:
UCL=λ+3√λCL=λLCL=λ−3√λ
(22.36)
If the standard deviation is unknown, we have to use ˉλ as an estimate of λ, which represents the average number of defects observed in the m samples in the units inspected. Each sample consists of n inspection units and λi represents the number of defects in the i-th sample, such that:
ˉλ=1m∑mi=1λi
(22.37)
And the control limits of 22.36 are rewritten as:
UCL=ˉλ+3√ˉλCL=ˉλLCL=ˉλ−3√ˉλ
(22.38)
If the lower control limit is negative, we use LCL = = 0.
Example 22.5
An electrical appliance company wants to control the quantity of small, nonapparent defects in a certain coffee maker. For a sample with 30 coffee makers, the number of defects per coffee maker was computed, as shown in Table 22.E.6. Construct the c chart for these data.
Table 22.E.6
Number of Defects per Coffee Maker
Coffee Maker Number
Defects per Coffee Maker
Coffee Maker Number
Defects per Coffee Maker
1
2
16
0
2
0
17
6
3
5
18
2
4
6
19
4
5
7
20
8
6
3
21
3
7
0
22
4
8
1
23
9
9
4
24
11
10
2
25
4
11
5
26
6
12
7
27
5
13
8
28
3
14
6
29
1
15
4
30
3
Solution
For this example, each sample consists of a single inspection unit (n = 1). The average number of defects observed in the 30 samples is given by:
To construct the c chart on Stata, we have to use the following command:
cchart defect_var unit_var [, cchart_options]
The data in Example 22.5 are available in the file Example_22.5.dta. The first variable, called sample, represents each one of the 30 samples being analyzed. The second column refers to the variable defects, which computes the total number of defects per coffee maker. Hence, the command to be typed to construct the c chart on Stata is:
Open the file Example_22.5.sav. Constructing the c chart follows the same logic as the p and np charts. Once again, click on Analyze → Quality Control → Control Charts...; however, this time, define the option c, u in Attribute Charts and the option Cases are subgroups in Data Organization, as shown in Fig. 22.24. Once again, select the variables of interest, the sample size and click on the option c (Number of nonconformities) in Chart, as shown in Fig. 22.25. By clicking on OK, we obtain the c chart on SPSS, as shown in Fig. 22.26.
Through Fig. 22.25, we can see that it is not necessary to select the variable sample in Subgroups Labeled by, since the sample size is constant and was specified as 30 in Sample Size. Fig. 22.26 shows that there is one point above the upper control limit, indicating that the process is not in statistical control.
22.4.4 U Chart (Average Number of Defects per Unit)
This chart is an alternative to the c chart when the samples do not have the same size. It can also be used when the sample is made up of only one unit; however, it has several components that must be inspected as, for example, an engine.
When the inspection of the product uses 100% of its production, the sample size per period usually varies, making it difficult to interpret the c chart. In this case, the u chart is an alternative.
To construct the u chart, we have to select m samples. Consider λi the number of defects and ni the number of units inspected in the i-th sample. For each sample i, the number of defects per unit inspected is given by:
ui=λini
(22.39)
The average number of defects per unit inspected is given by:
ˉu=∑mi=1λi∑mi=1ni
(22.40)
In the case of samples with constant sizes, the average number of defects per unit could also be calculated as ∑mi=1ui/m.
The parameters of the u control charts can be specified as:
UCL=ˉu+3√ˉuniCL=ˉuLCL=ˉu−3√ˉuni
(22.41)
If the lower control limit is negative, we have to use LCL = 0.
Example 22.6
A toy company wishes to control the number of small defects in 100% of a type of scooter it produces. Each day, they select the amount of scooters produced and compute the number of defects per sample, as shown in Table 22.E.7. Construct the u control chart to monitor the process.
Table 22.E.7
Number of Defects per Scooter
Sample i
Sample Size (ni)
Defects per Sample (λi)
ui = λi/ni
1
200
240
1.20
2
250
300
1.20
3
200
220
1.10
4
250
260
1.04
5
300
360
1.20
6
300
360
1.20
7
200
270
1.35
8
250
300
1.20
9
300
300
1.00
10
300
330
1.10
11
250
280
1.12
12
200
260
1.30
13
250
320
1.28
14
300
342
1.14
15
300
310
1.03
16
250
310
1.24
17
250
370
1.48
18
300
460
1.53
19
250
270
1.08
20
200
290
1.45
Sum
5100
6152
Solution
By using Expression (22.40), the average number of defects per scooter is:
ˉu=61525100=1.206
Since the samples are not the same size, the control limits must be calculated for each sample by using Expression (22.41), as shown in Table 22.E.8.
Table 22.E.8
Calculating the Control Limits for Example 22.6
Sample i
Sample Size (ni)
UCL = ˉu+3√ˉuni
LCL = ˉu−3√ˉuni
1
200
1.439
0.973
2
250
1.415
0.998
3
200
1.439
0.973
4
250
1.415
0.998
5
300
1.397
1.016
6
300
1.397
1.016
7
200
1.439
0.973
8
250
1.415
0.998
9
300
1.397
1.016
10
300
1.397
1.016
11
250
1.415
0.998
12
200
1.439
0.973
13
250
1.415
0.998
14
300
1.397
1.016
15
300
1.397
1.016
16
250
1.415
0.998
17
250
1.415
0.998
18
300
1.397
1.016
19
250
1.415
0.998
20
200
1.439
0.973
The u chart will be generated by using SPSS and it is not available on Stata.
Solution on SPSS
Open the file Example_22.6.sav. Constructing the u chart follows the same logic as the c chart. Once again, click on Analyze → Quality Control → Control Charts..., choose the option c, u in Attribute Charts one more time, and the option Cases are subgroups in Data Organization, as shown in Fig. 22.24. Select the variables of interest and click on the option u (Nonconformities per unit) in Chart, as shown in Fig. 22.27. Notice that, different from the c chart, we must select the option Variable in Sample Size and insert the variable sample_size. By clicking on OK, we obtain the u chart on SPSS, as shown in Fig. 22.28.
Fig. 22.28 suggests that the number of defects per scooter in sample 9 is below the lower control limit, while in samples 17, 18, and 20, the numbers are above the upper limits, indicating that the process is not in statistical control.
22.5 Process Capability
The control charts described in Sections 22.3 and 22.4 are used to verify process adjustment and stability, indicating the presence or absence of special causes. This section discusses the capability of a process to produce conforming items, according to the specifications of the project.
The capability of a process can be defined as its inherent capacity to produce identical items, for a long period of time and under certain conditions.
Based on Montgomery (2013) and Gonçalez and Werner (2009), to measure process capability, we will study the main indexes: Cp, Cpk, Cpm, and Cpmk. These indexes compare the output of the real process to the specification limits for the quality characteristic analyzed, demonstrating if the process is manufacturing products within the specification range. To use these indexes, it is necessary for the process to be in statistical control.
22.5.1 Cp Index
The Cp index relates the allowed variability in the process (specified in the project) to the natural variability of the process, and it is calculated as:
Cp=UCL−LCL6σ
(22.42)
where:
UCL: Upper Control Limit;
LCL: Lower Control Limit;
σ: process standard deviation.
In practice, the standard deviation of a process σ is almost always unknown, so, it must be estimated. For a random sample of the process X1, X2, …, Xn, σ can be estimated from the standard deviation of the sample (S). Conversely, when the control charts for variables are used in capability studies, σ can be estimated from ˉR/d2 or ˉS. The values of d2 can be found in Table O in the Appendix.
One of the limitations of the Cp index is that it only considers the process variability, ignoring its centralization (mean), which can result in incorrect conclusions as regards the process capability, since the process is not always centered on the mean.
As a general rule, the larger the Cp index, the lower the probability that the quality characteristic will be outside the specifications, reducing the probability of having defective products, as long as the mean is centered on the nominal value of the specification. According to Montgomery (2013), the evaluation of the Cp index can be interpreted as:
22.5.2 Cpk Index
While the Cp index compares the total variation allowed by the specification to the total variation of the process, without any measurement regarding the process mean, the Cpk index calculates the distance of the process mean (μ) from each one of the specification limits and chooses the smallest. If the process mean coincides with the nominal value of the specification, we have Cp = Cpk. The calculation of Cpk is given by:
Cpk=min(UCL−μ3σ,μ−LCL3σ)
(22.43)
where:
UCL: Upper Control Limit;
LCL: Lower Control Limit;
μ: process mean;
σ: process standard deviation.
In practice, the process mean μ and the standard deviation σ are almost always unknown, so, they must be estimated. For a random sample of the process X1, X2, …, Xn, μ and σ can be estimated from ˉX and S, respectively. Conversely, when the control charts for variables are used, μ can be estimated from ̿X and σ from ˉR/d2 or ˉS.
Interpreting the Cpk index can be done in a similar way as the Cp index, as presented in Table 22.1.
Table 22.1
Interpreting the Cp Index According to the Reference Intervals
Value of Cp
Nonconforming Items
Interpretation
Cp < 1
Above 2700
Incapable process
1 ≤ Cp ≤ 1.33
From 64 to 2700
Acceptable process
Cp > 1.33
Below 64
Capable process
Source: Gonçalez, P.U., Werner, L., 2009. Comparação dos índices de capacidade do processo para distribuições não normais. Gestão Produção 16 (1), 121–132.
Usually, if Cp = Cpk, the process is centered on the specifications means, and when Cpk < Cp, the process is not centered on the mean (Montgomery, 2013).
22.5.3 Cpm and Cpmk Indexes
Cpm and Cpmk are alternatives to Cp and Cpk, respectively, because, besides the variability allowed in the process, they consider the distance of the process mean from the nominal value of the specification. Cpm can be calculated as:
Cpm=UCL−LCL6τ=UCL−LCL6√σ2+(μ−T)2
(22.44)
where:
UCL: Upper Control Limit;
LCL: Lower Control Limit;
μ: process mean;
σ: process standard deviation;
T: nominal value of the specification.
Analogous to the Cp index, an increase in the process variability increases the denominator of the Cpm index and, consequently, decreases its value. In addition to this, the larger the distance of the process mean from the nominal value of the specification, the smaller the Cpm will be.
While Cpm considers in its numerator only the variability allowed to the process, Cpmk considers the smallest distance between the process mean and the specification limits, analogous to indexes Cp and Cpk, respectively. The calculation of Cpmk is given by:
Indexes Cpm and Cpmk coincide with indexes Cp and Cpk, respectively, when μ = T, and diminish as μ gets farther away from T.
Analogously, for a random sample of the process X1, X2, …, Xn, the mean μ and the standard deviation σ of indexes Cpm and Cpmk can be estimated from ˉX and S, respectively. When the control charts for variables are used, μ can be estimated from ̿X and σ from ˉR/d2 or ˉS.
Example 22.7
For the data in Example 22.1, determine the percentage of nonconforming items, calculate indexes Cp, Cpk, Cpm, and Cpmk, and interpret the results for the following specification limits and nominal values:
a)LCL = 13 mm, UCL = 16 mm and T = 14.5.
b)LCL = 12 mm, UCL = 15 mm and T = 13.5.
Solution
To construct the ˉX and R control charts in Example 22.1, the mean of the sample means and the mean of the sample ranges were calculated:
̿X=14.5417
ˉR=0.9872
Thus, to calculate the indexes, we will use ̿X and ˉR/d2 as estimators of μ and σ, respectively. Through Table O in the Appendix, we obtain the value of constant d2 = 2.326 for n = 5.
a)LCL = 13 mm, UCL = 16 mm and T = 14.5.
Based on the data found in Table 22.E.1, we can see that there are no items outside the specifications limits.
Indexes Cp, Cpk, Cpm, and Cpmk can be calculated as:
From the estimated mean of the process and the specification limits, we notice that the process is centered on the specifications mean. This can also be proven from the indexes calculated, since Cp ≅ Cpk and Cpm ≅ Cpmk. We can also see that Cp ≅ Cpm and Cpk ≅ Cpmk, since the process mean is much closer to the nominal value of the specification (μ ≅ T).
Since 1 ≤ Cp ≤ 1.33, the process is classified as acceptable. The same interpretation is valid for the other indexes.
b)LCL = 12 mm, UCL = 15 mm, and T = 13.5.
Based on the data found in Table 22.E.1, we can see that 22.4% of the items are outside the specifications limits (above the upper specification limit). The calculations of the indexes are:
Different from the previous case, the process is not centered on the specifications mean. This can also be proven from the calculated indexes, since Cpk < Cp and Cpmk < Cpm. Since the Cp index only considers the process variability, its value did not change, leading to incorrect interpretations.
We can also see that Cpm < Cp and Cpmk < Cpk, since the process mean differs from the nominal value of the specification (μ ≠ T).
The process is classified as incapable.
Solution Through SPSS Software
The data are available in the file Example_22.1.sav. Initially, we must follow the same steps for constructing the ˉX and R control charts presented in Example 22.1. Once again, click on Analyze → Quality Control → Control Charts..., define the option X-bar, R, s in Variables Charts and the option Cases are subgroups in Data Organization, select the variables of interest and click on the options X-bar using range and Display R chart (optional) in Charts, as shown in Figs. 22.5, 22.6, and 22.7. On Statistics..., define the specification limits: Upper, Lower and Target, select the desired Process Capability Indices (CP, CpK, and CpM). In addition, select the option Estimate using R-bar in Capability Sigma, as shown in Figs. 22.29 and 22.30. For case (a), the following specification limits were used: Upper (16), Lower (13), and Target (14.5), in accordance with Fig. 22.29. On the other hand, for case (b), the specification limits are: Upper (15), Lower (12), and Target (13.5), as shown in Fig. 22.30. To conclude, click on Continue and OK. Notice that SPSS does not provide the Cpkm index. The results for each case can be seen in Figs. 22.31 and 22.32.
We will not present the calculation of the capability indexes on Stata for this example. Since Stata only uses the standard deviation S as an estimator of σ, it does not offer the option ˉR/d2.
Example 22.8
Regarding Example 22.2, the process specifications are 8.82 ± 0.66. Determine the percentage of items that do not meet the specifications of the process. Obtain and interpret the indexes Cp, Cpk, Cpm, and Cpmk.
Solution
Based on Table 22.E.3, we can see that 7 of the 80 observations (8.75%) are outside the specifications limits.
To construct the ˉX and S control charts in Example 22.2, the mean of the sample means and the mean of the sample standard deviation were calculated:
̿X=8.8574
ˉS=0.1822
that will be the estimators of μ and σ, respectively, to calculate the indexes Cp, Cpk, Cpm, and Cpmk.
We have UCL = 8.82 + 0.66 = 9.48 and LCL = 8.82 - 0.66 = 8.16. Therefore, indexes Cp, Cpk, Cpm, and Cpmk can be calculated as:
Indexes Cp and Cpk, in addition to indexes Cpm and Cpmk, are relatively near, indicating that the process mean is relatively close to the center of the specification limits. We can also see that Cp ≅ Cpm and Cpk ≅ Cpmk, since the process mean is much closer to the specification target value (μ ≅ T). Since 1 ≤ Cp ≤ 1.33, the process is classified as acceptable. The same interpretation is valid for the other indexes.
Example 22.8 will be solved on Stata, since it uses the standard deviation S as an estimator of σ to calculate the capability indexes. However, it only provides the calculation of indexes Cp and Cpk. Even though SPSS also offers the estimation option using the ˉS, its results are different when compared to the indexes above and to the results obtained on Stata.
Solution by Using Stata Software
To calculate indexes Cp and Cpk on Stata, we have to use the following command:
pciest mean sd, f(#) s(#)
where mean and sd are the estimates of μ and σ, respectively. On the other hand, f(#) and s(#) correspond to the lower and upper specification limits, respectively.
It is not necessary to open the file Example_22.2.dta to execute the command; however, we need to specify the function values. The command to be typed is, therefore:
Statistical Process Control (SPC) is made up of a set of tools whose main objective is to measure, monitor, control, and improve process quality. Control charts are an important SPC tool that monitor process variability throughout time.
Control charts can be divided into two major groups: control charts for variables, in which the quality characteristic is measured in a quantitative scale, and control charts for attributes, in which the quality characteristic is measured in a qualitative scale. Choosing the control chart must consider the size of the observations, how often the observations are collected, and the types of data collected in the process.
Despite the most common applications of control charts being in factories, more specifically in the control of processes, control charts are also being applied to monitor several businesses, including the control of sales forecasts, risks, financial planning, etc. (Carvalho, 2012).
22.7 Exercises
1)When producing ethanol from sugarcane, the quality characteristic to be evaluated is the percentage of sucrose in the sugarcane juice, whose specification limits vary between 15 and 18%. Hence, 20 samples were collected, each one of them with 4 observations, as shown in Table 22.2. The data are also available in the files Sucrose.sav and Sucrose.dta. The time interval between the samples is 45 minutes. We would like you to:
Table 22.2
Measurements of Sucrose in the Samples (%)
Sample
Measurements
m1
m2
m3
m4
1
16.25
16.96
15.27
15.36
2
15.22
15.68
14.78
15.43
3
16.32
16.20
16.88
16.74
4
15.54
16.31
16.87
16.12
5
16.57
16.93
17.14
17.50
6
17.66
17.87
17.98
18.11
7
17.14
17.64
17.85
17.02
8
16.32
16.64
15.11
15.54
9
15.22
16.24
16.54
15.67
10
16.01
16.47
16.69
17.22
11
17.25
17.44
17.69
17.98
12
15.24
15.98
16.51
17.12
13
15.69
16.87
16.51
15.02
14
15.39
14.88
15.94
16.12
15
15.27
15.69
16.33
15.87
16
16.88
17.17
17.68
18.12
17
17.25
17.09
17.36
16.47
18
16.85
17.31
17.26
17.84
19
17.12
17.39
17.83
16.14
20
15.19
15.24
15.87
16.68
a)Determine the control limits for the mean and for the range, and check if the process is in control.
b)Calculate indexes Cp, Cpk, Cpm, and Cpkm and interpret the results.
2)Once again consider the data from the previous exercise. We would like you to:
a)Determine the control limits for the mean and for the standard deviation, and check if the process is in control.
b)Recalculate indexes Cp and Cpk using ˉS as an estimator of σ, and interpret the results.
3)When producing beer, we use cereal grains and yeast as raw materials. The quality characteristic analyzed is the width of the yeast whose specification limits vary between 5 and 7 μm. Table 22.3 shows the data from 20 samples, each one of them with 4 observations. The data are also available in the files Yeast.sav and Yeast.dta. We would like you to:
Table 22.3
Width of the Yeast in μm
Sample
Measurements
m1
m2
m3
m4
1
5.12
5.64
5.87
6.11
2
6.44
6.98
7.14
6.24
3
6.51
6.87
6.10
5.87
4
5.54
5.68
5.98
5.14
5
5.14
5.87
5.66
6.24
6
6.32
6.57
6.98
6.17
7
5.54
5.14
5.98
4.98
8
5.12
5.67
5.99
6.20
9
6.13
6.88
6.94
7.01
10
5.56
6.12
5.66
6.25
11
6.59
5.25
5.75
6.44
12
5.88
5.74
5.96
6.34
13
6.14
6.87
6.93
5.87
14
5.50
5.64
5.78
6.50
15
5.66
5.98
6.24
6.32
16
6.54
6.98
7.13
5.89
17
5.21
5.11
5.66
5.74
18
5.74
5.89
5.66
6.31
19
5.89
5.99
6.47
6.25
20
6.11
6.28
6.55
6.87
a)Determine the control limits by using the ˉX and R charts, and interpret the results.
b)Calculate indexes Cp, Cpk, Cpm, and Cpkm and interpret the results.
4)Once again consider the data from the previous exercise. We would like you to:
a)Determine the control limits by using the ˉX and S charts, and interpret the results.
b)Recalculate indexes Cp and Cpk using ˉS as an estimator of σ, and interpret the results.
5)The data shown in Table 22.4 refer to the number of defective products in each one of the 25 samples collected, size 50. The time interval between the samples is 2 hours. Calculate the control limits and check if the process is in statistical control.
Table 22.4
Number of Defective Products in Each Sample
Sample Number
Number of Defective Items
1
4
2
6
3
3
4
7
5
3
6
2
7
1
8
4
9
5
10
3
11
2
12
6
13
2
14
4
15
2
16
3
17
4
18
6
19
5
20
3
21
2
22
1
23
1
24
2
25
4
6)From the data in the previous example, construct the np chart and check if the process is in control.
7)A toy company wishes to control the number of small defects in a certain type of bicycle. For a sample with 40 bicycles, the number of defects per bicycle was computed, as shown in Table 22.5. Construct the most suitable control chart and check if the process is in control.
Table 22.5
Number of Defects per Bicycle
Bicycle
Defects per Bicycle
Bicycle
Defects per Bicycle
1
8
21
6
2
6
22
7
3
4
23
6
4
5
24
5
5
7
25
8
6
0
26
7
7
6
27
4
8
4
28
3
9
7
29
6
10
5
30
9
11
9
31
2
12
0
32
0
13
7
33
1
14
5
34
7
15
6
35
5
16
3
36
4
17
8
37
6
18
5
38
8
19
6
39
3
20
5
40
4
8)An electrical appliance company wants to control the quantity of small defects in all of its production of a certain vacuum cleaner. Every hour, the amount of vacuum cleaners produced is selected and the number of defects per sample is computed, as shown in Table 22.6. Construct the most suitable control chart and check if the process is in control.