Ch5 Attributes Control Charts
Ch5 Attributes Control Charts
2
Summary of Control Limits for p, c and u charts
Lower Center Upper
Control Line Control
Limit (LCL) (CL) Limit (UCL)
u : standards given u 3 u / ni u u 3 u / ni
3
Overview
• Section 5.1: Control Charts for Fraction Nonconforming
– The p Chart
– Choice of Sample Size n
– Variable Sample Size p chart
– OC Curve and ARL Calculation for p chart
• Section 5.2: Control Charts for Nonconformities
– The c Chart
– The u Chart
– Demerit Systems
– OC Curve and ARL Calculation for c chart
• Section 5.3: Choice Between Attributes and Variables
Control Charts
4
Section 5.1
The p Chart
5
Setup of the p Chart
• Let D be the number of defective units in a sample of size
n, and p be the fraction nonconforming
Then D ~ Binomial (n,p), with
n x
P( D x ) p (1 p)n x for x 0,1,, n
x
with E( D) np and Var ( D) np(1 p).
• Sample Fraction nonconforming: pˆ D / n
which is an unbiased estimator for p.
• Question: Does D follow Binomial distribution during
online sampling? Assumptions??
6
Setup of the p Chart
• Distribution of the random variable p̂ can be obtained
from the binomial. The mean and variance of p̂ is
p(1 p)
E( pˆ ) p and Var ( pˆ ) .
n
• Based on the normal approximation to binomial
(need: npq 5 ), we construct the control chart for p̂ as
follows:
m nm
p (1 p )
Hence, the 3σ control limits for p̂ is given by p 3
n
Parameters of the p charts
The p chart: Standard Given The p chart : No Standard Given
p(1 ap ) p (1 p )
UCL p 3 , UCL p 3 ,
n nA
CL p, --- Equation (5.1) CL p, --- Equation (5.2)
x x
p(1 p ) p (1 p )
LCL p 3 a LCL p 3
n na
8
The p Chart – Example
Example 5.1: Frozen orange juice concentrate is packed in
6-oz cardboard cans (紙板罐). These cans are formed on a
machine by spinning them from cardboard stock and
attaching a metal bottom panel.
Nonconforming can: Possible leaking due to improper seal
on (i) the side seam (接縫) or (ii) the bottom panel
Phase 1: 30 samples were taken over 15 hours of operation
(one in every 30-minute interval). In each sample, sample
size n=50 cans were taken (Table 5.1).
Set up a control chart to improve the fraction of
nonconforming cans produced by this machine.
9
The p Chart - Example
Table 5.1 Cardboard Cans Data, Sample Size n=50
Sample Number of Sample Fraction Sample Number of Sample Fraction
Number Nonconforming Cans, Nonconforming, Number Nonconforming Cans, Nonconforming,
i Di p̂i i Di p̂i
1 12 0.24 16 8 0.16
2 15 0.30 17 10 0.20
3 8 0.16 18 5 0.10
4 10 0.20 19 13 0.26
5 4 0.08 20 11 0.22
6 7 0.14 21 20 0.40
7 16 0.32 22 18 0.36
8 9 0.18 23 24 0.48
9 14 0.28 24 15 0.30
10 10 0.20 25 9 0.18
11 5 0.10 26 12 0.24
12 6 0.12 27 7 0.14
13 17 0.34 28 13 0.26
14 12 0.24 29 9 0.18
15 22 0.44 30 6 0.12
30
D i 347 p 0.2313
i 1 10
The p Chart - Example
• Solutions: Total # of nonconforming cans:
m
i 1
Di 347
1 m 347
p
nm i 1
Di
50(30)
0.2313
11
The p Chart - Example
Solutions (Continued): From the p chart, samples 15 and 23
are above the upper control limit.
We therefore conclude that the process is out-of-control.
These points must be investigated to see whether a special
cause can be determined.
p̂
12
The p Chart - Example
Example 5.2 (Continued from Example 5.1): After the
investigation of the samples, we found that:
Sample 15: A new batch of cardboard stock was put into
production during that half-hour period, which could cause
irregular production performance.
Sample 23: Conducted by a relatively inexperienced operator
temporarily assigned to the machine – which could account
for the high fraction nonconforming.
Hence makes sense to eliminate samples 15 and 23 from the
original data set due to special causes.
Question: Setup the revised control chart based on the above.
13
The p Chart - Example
1 (347 22 24) 301
m
Solutions: Revised p D
i 1 i
0.2150
nm 50(28) 50(28)
Revised Parameters of the p chart:
p (1 p ) 0.2150(0.7850)
UCL p 3 0.2150 3 0.3893,
n 50
CL p 0.2150,
p (1 p ) 0.2150(0.7850)
LCL p 3 0.2150 3 0.0407
n 50
p̂
14
The p Chart - Example
• Solutions (Continued): From the revised p chart, sample 21
exceeds the revised UCL, we therefore conclude that the
process is out-of-control.
54
i 31
Di 133 p 0.1108
16
The p Chart - Example
Solutions: Two samples test on Binomial Proportion
Hypotheses H 0 : p1 p2 vs H1 : p1 p2
where p1 = process fraction nonconforming from the preliminary data
p2 = process fraction nonconforming in the current period
54
1 133
ˆ
p
Now, 1 p 0.2150 and ˆ
p 2
50(24) i 31
Di
1200
0.1108
p̂
p̂
17
The p Chart - Example
Solutions (Continued):
pˆ1 pˆ 2
Test statistic: Z 0 N (0,1)
pˆ1 (1 pˆ1 ) / n1 pˆ 2 (1 pˆ 2 ) / n2
0.2150 0.1108
Now, Z 0 7.32
0.2150(0.7850) 0.1108(0.8892)
50 28 50 24
18
The p Chart - Example
Example 5.4 (Continued from Example 5.3):
Adjustment of machine works well => use the samples for the
current period (numbers 31-54) to construct the stable control
limits in Phase II.
Want to setup the new p chart based on the above.
p̂
20
Choice of Sample Size n
** For process with small p, sample size n has to be large enough.
Otherwise, the change in sample fraction proportion 1/n due to
randomness is large vs the change in control limits 3 pq / n
Example 5.5: Suppose both p and n are small with p=0.01 and n=8,
then the parameters of the p chart are
p(1 p ) 0.01(0.99)
UCL p 3 0.01 3 0.1155,
n 8
CL p 0.01,
p(1 p ) 0.01(0.99)
LCL p 3 0.01 3 0.0955
n 8
Since LCL < 0, we set LCL=0
21
Choice of Sample Size n
Example 5.5 (continued): LCL=0, CL=0.01 and UCL=0.1155,
Consider the following two cases:
1. If there is no nonconforming unit in the sample, then
pˆ 0 and we conclude that the process is in-control.
2. If there is one nonconforming unit in the sample,
pˆ 1/ 8 0.1250 UCL , we conclude the process is
out-of-control.
Both of the above are not satisfactory because
1. we want to be notified when no nonconforming unit (e.g.
due to possible quality improvement/fail to identify them)
2. it is unreasonable to conclude that the process is out-of-
control by observing a nonconforming unit
22
Choice of Sample Size n
LCL=0
23
Choice of Sample Size n
To avoid the situations above, we can determine n by one of
the criteria below:
1. Impose a tolerance level on the process shift:
Let δ (>0) be the shift of fraction nonconforming, from the
true fraction nonconforming p to now p+δ.
Criterion: Want to detect the shift δ with more than 50% chance
=> True fraction nonconforming p+δ has to be right outside
the UCL (Why?). Therefore,
p(1 p )
2
3 p(1 p ) / n
3 n
2
3
n p(1 p )
24
Choice of Sample Size n
2. Positive LCL (Detection of Process Improvement)
Want to reject H0 if no nonconforming units in the sample
2
3
2
p p(1- p)
LCL p - 3 p(1- p)/n 0 n p(1 p)
3 n p
25
Choice of Sample Size n
Solutions:
(a) Shift in process fraction nonconforming δ= 0.05-0.01=0.04.
Therefore,
2 2
3 3
n p(1 p) 0.01(1 0.01) 55.6
0.04
Thus n=56 is needed to ensure there is more than 50%
chance to detect the shift in p.
(b) To ensure that LCL > 0, we need
2
3
2
3
n p(1 p ) 0.01(1 0.01) 891
p 0.01
Thus n=892 is needed to ensure that LCL > 0.
26
Variable Sample Size p chart
• If different number of units are produced in each period,
and 100% inspection of process output is conducted
(n/N criteria?), the p chart is going to have variable
sample size.
• Two approaches in constructing p chart with variable
sample size:
1. Variable-width p Chart
2. Standardized p Chart
27
Variable Sample Size p chart
1. Variable-width p Chart
Control limits based on sample size of each sample.
• Suppose the ith sample is of size ni , we can then compute
p i 1 Di
m m
n
i 1 i
p (1 p )
UCL p 3
Parameters for ni
the ith sample: CL p
p (1 p )
LCL p 3
ni
28
Standardized p Chart
2. Standardized p Chart
pˆ i p
• Standardized fraction nonconforming: Zi
p (1 p ) / ni
where p i 1 Di
m m
n.
i 1 i
2. Standardized p Chart
pˆ i p pˆ i 0.096
For the ith sample, Zi
p(1 p ) / ni 0.096(0.904) / ni
31
Example on Variable Sample Size p chart
Solutions (Continued): From the control charts, sample 11 is
outside the control limits, we therefore conclude that the
process is out-of-control.
(1) Variable-width p Chart
32
OC Curve for p chart
• Investigate the performance of a p chart due to the shift in
fraction nonconforming p
• OC Curve:
PrLCL pˆ UCL | p
Pr pˆ UCL | p Pr pˆ LCL | p
PrD n UCL | p Pr D n LCL | p
where D = Number of nonconformities
~ Binomial(n,p)
33
Example on OC curve and ARL for the p chart
Example 5.9: For a p chart of sample size n=50, the LCL and
UCL of p̂ are given by 0.0586 and 0.3414 respectively.
(a) Construct the OC curve as a function of p,
(b) compute ARL0, and
(c) compute ARL1 if p shifts to 0.30.
Solutions: (a) Given n, LCL and UCL, we can compute β as a
function of p as follows:
Pr D nUCL | p PrD nLCL | p
Pr D 50(0.3414) | p Pr D 50(0.0586) | p
Pr D 17.07 | p Pr D 2.93 | p
50 x
Pr D 17 | p Pr D 2 | p x 2 p (1 p )50 x
18
x
34
Example on OC curve and ARL for the p chart
Solutions (Continued): Output from the left
Example 5.9 (R Code) p beta
p<-seq(0.01,0.99,0.01) # grid points for p [1,] 0.1 0.8883
LCL<-0.0586 [2,] 0.2 0.9925
UCL<-0.3414 [3,] 0.3 0.7822
n<-50 [4,] 0.4 0.2369
beta<-pbinom(floor(UCL*n),n,p)-pbinom(floor(LCL*n),n,p) [5,] 0.5 0.0164
plot(p,beta,type="l") [6,] 0.6 0.0002
for (i in 1:9) [7,] 0.7 0.0000
{abline(v=i/10,lty=2) # generate the x grid lines [8,] 0.8 0.0000
abline(h=i/10,lty=2)} # generate the y grid lines [9,] 0.9 0.0000
beta<-round(beta,4)
cbind(p,beta)[seq(10,90,10),]
35
Example on OC curve and ARL for the p chart
Solutions (Continued): The chart below shows the OC curve:
p
36
Example on OC curve and ARL for the p chart
Solution (Continued): (b) To compute ARL0=1/ α, we first
need to find out the value of p for the in control process,
which is the center line of the p chart:
p̂ = (LCL+UCL)/2 = (0.0586+0.3414)/2 = 0.200
From the table in the previous page, we have
β = Pr (0.0586 < p̂ < 0.3414 | p =0.2) = 0.9925
Hence α = 1-0.9962 = 0.0075, with
ARL0 = 1/α = 1/0.0075 = 133.3
That is, when the process is in control, we still expect an
out-of-control indication in every 133 samples.
37
Example on OC curve and ARL for the p chart
Solutions (Continued):
(c) When p =0.3, then from the table in the previous page,
β = Pr (0.0586 < p̂ < 0.3414 | p =0.3) = 0.7822
Hence ARL1 = 1/(1 - β) = 1/(1 - 0.7822) = 4.59
(The above ARL1 is still large => should increase the same size
n)
38
Section 5.2
Control Charts for Nonconformities
39
Control Chart for Nonconformities
Consider the occurrence of nonconformities in an inspection
unit of product.
Suppose that nonconformities occur in the inspection unit X
follow Poisson distribution, that is,
e cc x
P( X x ) , x 0, 1, 2,
x!
with E ( X ) c, Var ( X ) c
1 m
• Standard Not Given (i.e. unknown c) - c i 1 xi
m
The c Chart : No Standard Given
UCL c 3 c , a
CL c , - Equation (5.6)
LCL c 3 c a
41
Example on the c chart
Example 5.10: Table 5.5 shows the number of defects
observed in 26 successive samples of 100 printed circuit
boards during Phase I. Set up a c chart for these data.
Table 5.5: Data on the Number of Nonconformities in Samples of 100 Printed Circuit Boards
Number of Number of
Sample Number i Sample Number i
Nonconformities xi Nonconformities xi
1 21 14 19
2 24 15 10
3 16 16 17
4 12 17 13
5 15 18 22
6 5 19 18
7 28 20 39
8 20 21 30
9 31 22 24
10 25 23 16
11 20 24 19
12 24 25 17
13 16 26 15
26
x 516
i 1 i
42
Example on the c chart
Solutions: There are 516 nonconformities over 26 samples,
=> c 516 19.85 UCL c 3 c 19.85 3 19.85 33.22
26
Parameters of the c chart: CL c 19.85
LCL c 3 c 19.85 3 19.85 6.48
Two points (samples 6 and 20) are outside the control limits.
We therefore conclude that the process is out-of-control.
43
Example on the c chart
Example 5.11 (Continued from Example 5.10): After investigation,
– Sample 6: Examined by a new inspector who did not recognize
the types of nonconformities that could have present.
– Sample 20: Temperature control problem in the wave soldering
machine caused a large number of nonconformities, which was
subsequently repaired.
Construct the revise trial control limits by excluding the special
causes above.
516 5 39 472
Solutions: Revised c 19.67
26 2 24
The revised control limits are
UCL c 3 c 19.67 3 19.67 32.97
CL c 19.67
LCL c 3 c 19.67 3 19.67 6.36 44
Example on the c chart
Example (Continued): During Phase II, 20 new samples with
100 boards each are obtained. The number of defects in each
sample is recorded in Table 5.6.
Based on the revised control limits (now the stable control
limits) from the previous page, set up a control chart to
monitor the process. Table 5.6: Additional Data for the
Control Chart for Nonconformities
Sample Number of Sample Number of
Number Nonconformities Number Nonconformities
27 16 37 18
28 18 38 21
29 12 39 16
30 15 40 22
31 24 41 19
32 21 42 12
33 28 43 14
34 20 44 9
35 25 45 16
36 19 46 21 45
Example on the c chart
Solutions: The points are plotted on the revised control
chart. Since no points are outside the control limits, and
there is no systematic pattern to the data point, we
conclude that the process is in control.
46
The u Chart
• Restriction on the c chart: Same sample size is required
(100 boards in Example 5.10, 50 cardboard cans in Example 5.2)
• u chart: Allows different inspection units in different samples.
• Construction of u Chart: Let Xi be the number of
nonconformities in the ith sample with ni inspection units, then
Xi ~ Poisson (λi=niu),
where u is the expected # of nonconformities per inspection unit
Define the average number of nonconformities per inspection
xi
unit to be ui . Then
ni
m
n
i 1 i
6 1.0 6.000 11.175 0.000
x 192 7 2.0 10.000 9.274 0.092
u i
4.683
n i 41 8
9
1.5
1.5
6.667
4.000
9.984
9.984
0.000
0.000
10 2.5 4.000 8.789 0.577
UCL and LCL for different sample 11 3.0 3.000 8.431 0.935
12 2.5 6.400 8.789 0.577
E.g. 1st sample, 13 2.0 6.000 9.274 0.092
14 2.5 4.000 8.789 0.577
u 4.683 15 1.0 6.000 11.175 0.000
UCL u 3 4.683 3 9.274 16 2.0 4.000 9.274 0.092
n1 2.0 17 2.0 2.500 9.274 0.092
18 1.0 5.000 11.175 0.000
u 4.683
LCL u 3 4.683 3 0.092 19 3.0 4.667 8.431 0.935
n1 2.0 20 2.0 4.000 9.274 0.092
50
Example on the u-Chart
Solutions: From the u-chart, sample #7 plots above the
upper control limit. We therefore conclude that the process
is out-of-control.
Investigation is required to see if there is any special causes
affecting the sample.
51
OC Curve of the c Chart
Pr X UCL | c Pr X LCL | c
where X = # of nonconformities ~ Poisson(c)
• Example: Take c=20, the 3σ control limit is
UCL c 3 c 20 3 20 33.42,
CL c 20
LCL c 3 c 20 3 20 6.58
Table 5.9 shows the calculation of OC curve using
P X 33 | c P X 6 | c
Hence α=1-0.9970=0.0030 and ARL0=1/ α =333.3
52
OC Curve of the c Chart
Suppose the mean shifts to Table 5.9: Calculation of the OC
c = 33. curve for a c chart with UCL=33
and LCL=7
Then β = 0.5461, and
c P(x≤ 33 | c) P( x≤ 6 | c) β
ARL1 = 1/(1- β)=2.203 1 1.0000 0.9999 0.0001
3 1.0000 0.9665 0.0335
Thus, on average, it will 5 1.0000 0.7622 0.2378
7 1.0000 0.4497 0.5503
take 2.203 samples (still 10 1.0000 0.1301 0.8699
consider as large!) to detect 15 1.0000 0.0076 0.9924
20 0.9973 0.0003 0.9970
the mean shifts from c=20 25 0.9520 0.0000 0.9520
to c=33. 30 0.7444 0.0000 0.7444
33 0.5461 0.0000 0.5461
35 0.4102 0.0000 0.4102
40 0.1514 0.0000 0.1514
45 0.0383 0.0000 0.0383
53
Demerit (操行,過失) Systems
• Sometimes, it is important to classify defects according to
severity. E.g. A minor defects might not be nonconforming
• Typically classify into 4 classes:
Class A Defects – Very Serious. The unit is either completely unfit for
service, or will fail in service in such a manner that cannot be easily
corrected in the field, or will cause personal injury or property damage.
Class B Defects – Serious. The unit will possibly suffer a Class A
operating failure, or will certainly cause somewhat less serious
operating problems, or will certainly have reduced life or increased
maintenance cost.
Class C Defects – Moderately Serious. The unit will possibly fail in
service, or cause trouble that is less serious than operating failure, or
possibly have reduced life or increased maintenance costs, or have a
major defect in finish, appearance, or quality of work.
Class D Defects – Minor. The unit will not fail in service but has minor
defects in finish, appearance, or quality of work.
54
Demerit Systems
Let ciA, ciB, ciC and ciD be number of Class A, B, C and D defects in
the ith sample with sample size n.
Assumption: (1) Each class of defect is independent,
(2) Occurrence of defects in each class can be well-modeled by a
Poisson distribution.
Definition: the number of demerits in the ith sample is
di 100ciA 50ciB 10ciC ciD
** where 100, 50, 10 and 1 are called the demerit weights (which
would vary for different processes).
Value of di: quantify the severity of all defects in the ith sample
Definition: The number of demerits per unit is
d i 100ciA 50ciB 10ciC ciD
ui
n n
55
Demerit Systems
Average number of class defects per unit:
1 m 1 m 1 m 1 m
uA
nm i 1
ciA , uB
nm i 1
ciB , uC
nm i 1
ciC and uD
nm i 1
ciD
n
Standard Given: The parameters of the control chart are
58
Example on Demerits System
Table 5.10: Data for Nonconformities in a Department Store Customer Survey
Sample Serious ciA Major ciB Minor ciC Total Demerits, di Demerits per Unit, ui
1 1 4 2 92 9.2
2 0 3 8 38 3.8
3 0 5 10 60 6.0
4 1 2 5 75 7.5
5 0 6 2 62 6.2
6 0 0 8 8 0.8
7 0 7 5 75 7.5
8 1 1 1 61 6.1
9 1 3 2 82 8.2
10 0 4 12 52 5.2
11 1 5 3 103 10.3
12 2 0 2 102 10.2
13 0 0 9 9 0.9
14 0 6 8 68 6.8
15 1 12 10 180 18.0
16 0 5 7 57 5.7
17 0 1 1 11 1.1
18 1 2 5 75 7.5
19 0 5 6 56 5.6
20 0 3 8 38 3.8
Total 9 74 114 1304 130.4
59
Example on Demerits System
Solutions: For the ith sample, the total number of demerits is
1 m 1 1
m
uA u
i 1 iA
c
i 1 iA
(9) 0.045
m nm 10( 20)
1 m 1 1
uB i 1 uiB
m
c
i 1 iC
(74) 0.37
m nm 10( 20)
1 m 1 1
uC i 1 uiC
m
c
i 1 iC
(139) 0.57
m nm 10( 20)
60
Example on Demerits System
Solutions (Continued):
Therfore u 50u A 10uB uC 6.52, and
502 u A 102 uB uC 502 (0.045) 102 (0.37) (0.57)
ˆ u 3.874
n 10
61
Example on Demerits System
Solutions (Continued): From the u chart, all the points are
plotted within the trial control limits, we conclude that the
process is in control.
62
Section 5.3
Choice Between Attributes and Variables Control Charts
63
Choice between Variable and Attribute Control Charts
Monitor Variable Quality Characteristics in two ways:
64
Choice between Variable and Attribute Control Charts
Advantage of the Attribute Control Chart:
• Avoid expensive and time-consuming measurements
• Several quality characteristics can be considered jointly.
66
Example: The Advantage of Variables Control Chart
Solutions: (a) The sample size on the`x chart must be large
enough for the new mean 1 to exceed the upper 3-sigma
specification limit. This implies that
3 3(2) 6
1 UCL 0 52 50 2 n9
n n n
Thus, n=9 is needed to give at least 50% probability to detect
the shift.
67
Example: The Advantage of Variables Control Chart
Solutions: (b) If a p chart is used, then we may find the
required sample size to give the same probability of
2
3
detecting the shift, that is, n p(1 p)
where δ=0.0228-0.0027=0.0201 is the magnitude of the shift.
Consequently,
2
3
n 0.0027(1 0.0027) 59.98
0.0201
or n=60 would be required for the p chart.
Unless the cost of measurements inspection is more than
seven times (n=60 vs n=9) as costly as attributes inspection,
the`x chart is less expensive to operate.
68
Summary of Control Limits for p, c and u charts
Lower Center Upper
Control Line Control
Limit (LCL) (CL) Limit (UCL)
u : standards given u 3 u / ni u u 3 u / ni
69