Professional Documents
Culture Documents
Email: W.Zhang@bath.ac.uk
1
Useful references:
2
(3) D. R. Anderson, Sweeney, D. J. and Williams, T. A., An
3
Part 1: Quality Control
4
1.1: Introduction
5
(1) ACCEPTANCE SAMPLING:
batches.
batch.
6
(2) PROCESS CONTROL:
7
1.1.1: What is quality?
8
1. Quality implies fitness for use.
9
The quality is defined as the proportion of defectives in a batche
of goods.
10
1.1.2: Variability compromises quality
11
e.g. A screw might be too small/large to fit the corre-
sponding bolt.
12
There is a need to identify items which exhibit too much variation
13
1.1.3: Inspection versus Prevention
high standard.
It was argued that the marginal cost of each item was small, so
When poorly made parts are passed down the production line,
by the inspectors.
15
It may be cheaper to try to prevent defects at each stage of
checking the quality of their own work. This has the added
16
1.2: Acceptance sampling
17
Acceptance sampling is used when the cost of inspecting each
item is too costly or may destroy the item, for example with
chocolate bars.
18
When a batch is rejected by a sampling scheme, it may be re-
19
Acceptance sampling techniques are divided into two classes
or ‘defective’.
scale.
20
A light bulb either works or it doesn’t (qualitative).
21
Sampling by variable is usually more informative, but is also more
costly.
22
We shall concentrate upon sampling by attribute and look at
sequential sampling.
23
1.2.1: Single sampling scheme
24
The single sampling scheme is
25
Suppose that the entire batch consists of N items of which k are
defective.
quality of the batch. The higher the value of p, the worse the
quality.
26
Suppose we draw a sample of size n and let X be the number of
! !
k N −k
d n−d
P (X = d|N, k) = ! .
N
n
27
This is the hypergeometric distribution. If N is very much larger
28
!
n
P (X = d|p) = pd(1 − p)n−d
d
Hence,
n !
n
pd(1 − p)n−d
X
P (Reject batch|p) = P (X ≥ c + 1|p) =
d
d=c+1
and
c !
n
pd(1−p)n−d
X
P (Accept batch|p) = 1−P (Reject batch|p) =
d
d=0
29
In R,
30
1.2.2: The operating characteristic curve
31
For the single sampling scheme,
c !
n
pd(1 − p)n−d
X
OC(p) =
d
d=0
In R,
postscript(”z/z.ps”)
33
When p = 0 there are no defective items in the batch and so the
34
When p = 1 then all items are defective and so the batch is
35
e.g. Suppose in a single sampling scheme that n = 10
and c = 0. Then,
!
10
OC(p) = p0(1 − p)10 = (1 − p)10.
0
36
If n = 10 and c = 1 then
!
10
OC(p) = (1 − p)10 + p1(1 − p)9 = (1 + 9p)(1 − p)9.
1
37
Thus, for a single sampling scheme, our choices of n and c affect
38
Ideally, there might be a critical value p∗ such that
and
39
That is,
1 p ≤ p∗
OC(p) =
0 p > p∗
OC(p)
6
1
-
0 p∗ p
An ideal OC-curve.
40
This OC-curve is impossible to achieve without 100% inspection.
41
An alternative would be to set
1 p ≤ p1,
OC(p) = p2 > p1
0 p≥p ,
2
leaving the region (p1, p2) in which we do not mind what hap-
pens.
42
OC(p)
6
1
B
B
B
B
B
B
B
B
B -
0 p1 p2 p
43
Unfortunately, this is also impossible without 100% inspection.
44
So, we wish to devise a sampling plan so that if p is acceptably
45
The producer and consumer should get together and decide upon
46
Definition 1 (AQL and producer’s risk)
so that OC(p1) = 1 − α.
47
Thus, the producer’s risk is the probability of rejecting a batch
48
Definition 2 (LTPD and consumer’s risk)
49
The consumer’s risk is
so that OC(p2) = β.
Thus, the consumer’s risk is the probability of accepting a batch
50
OC(p)
1
α Producer’s risk
1−α
β
β Consumer’s risk
p1 p2 1 p
52
1.2.2.1: A link to hypothesis testing
H0 : p = p1 ←→ HA : p > p1
53
Rejecting a batch in the sampling scheme is equivalent to reject-
producer’s risk, α.
54
Conversely, if we accept the batch when it should have been
55
1.2.3: Calculating the OC-curve for single sampling schemes
56
Bertie Bassett is negotiating a contract for buying batches of
57
Sweets’R’Us claim that it can produce batches with proportion
58
He calculates the producer’s risk.
! !
100 100
= 1− (0.01)0 (0.99)100 − (0.01)1 (0.99)99
0 1
= 1 − 0.3660 − 0.3697
= 0.2643.
59
The minimum defect rate Bertie would like to reject is 4%. He
! !
100 100
= (0.04)0 (0.96)100 + (0.04)1 (0.96)99
0 1
= 0.01687 + 0.07029
= 0.08716.
60
The producer may not be willing to accept such a high risk,
61
Notice that increasing c, keeping n fixed, will decrease the pro-
62
1.2.3.2: Finding n and c from given producer’s and con-
sumer’s risks
63
n and c are chosen by
f1(n, c) = P (Reject batch|p = p1 )
≤ α
f (n, c) = P (Accept batch|p = p ) ≤ β
2 2
64
Tables exist to help find solutions to these inequalities.
65
Table 3 gives the percentage points of the χ2-distribution.
χ2
p,υ can also be obtained in R by
qchisq(p, υ)
66
Table 6 gives values of the ratio
r(c) = χ2 /χ2
1−β,2(c+1) α,2(c+1).
67
Suppose Bertie is happy with a consumer’s risk of 0.05 and
68
(1) Calculate p2/p1.
In this case,
p2/p1 = 0.04/0.01 = 4.
69
(2) Use Table 6 with the given values of α and β to find the
p
r(c − 1) > 2 > r(c).
p1
70
For our example,
α = 0.05, 1 − β = 0.95.
71
(3) The possible values of n are
χ2
1−β,2(c+1)
χ2
α,2(c+1)
≤n≤ ,
2p2 2p1
χ2
1−β,2(c+1), χ2
α,2(c+1) .
72
In our case,
2(c + 1) = 2 × 7 = 14.
χ2
1−β,2(c+1) = χ2
0.95,14 = 23.68, χ2
α,2(c+1) = χ2
0.05,14 = 6.57.
23.68 6.57
≤n≤ =⇒ 296 ≤ n ≤ 328.5.
2(0.04) 2(0.01)
73
A particular solution is thus c = 6 and n = 300.
74
Notice that we can check our work. With
then
75
1.2.4: Rectifying schemes
items and to replace any defective items with good ones. Such
76
- sampling Accept -
Producer Consumer
inspection
6
Reject
?
100% inspection
and rectification
77
Thus, the consumer receives two types of batches:
(1) Those which passed the inspection and may still contain
defective items.
(2) Perfect batches that have been rectified and defective items
replaced.
78
The quality (proportion of defectives) in batches that the con-
sampling inspection.
79
Definition 3 (AOQ)
80
Thus,
= pOC(p) ≤ p.
81
Note that when p = 0,
AOQ(0) = 0 × OC(0) = 0 × 1 = 0
and when p = 1,
AOQ(1) = 1 × OC(1) = 1 × 0 = 0.
82
Definition 4 (AOQL)
the AOQ.
83
Hence, whatever the input quality, p, the consumer knows that
AOQ ≤ AOQL
84
1.2.5: Double sampling schemes
85
d1 ≤ c1 sample size n1 d1 > c2
d1 defectives
? ?
Accept Reject
c1 < d1 ≤ c2
batch batch
6 6
?
d1 + d2 ≤ c3 sample size n2 d1 + d2 > c3
d2 defectives
86
The plan is often simplified by taking
c3 = c2
87
1.2.5.1: Operating characteristic for the double sampling
scheme
88
OC(p) = P (Accept batch|p)
and
Thus,
c2
X
OC(p) = P (X1 ≤ c1|p)+ P (Accept batch|p, X1 = d1)P (X1 = d1|p).
d1 =c1 +1
90
Now, for d1 ∈ {c1 + 1, . . . , c2} the second sample is taken and
= P (X2 ≤ c3 − d1|p),
91
c2
X
OC(p) = P (X1 ≤ c1|p) + P (X2 ≤ c3 − d1|p)P (X1 = d1|p)
d1 =c1 +1
c1 !
n1
pd1 (1 − p)n1−d1 +
X
=
d1
d1 =0
c2 c3X
−d1 ! !
n2 n1
pd2 (1 − p)n2−d2 pd1 (1 − p)n1 −d1 .
X
d2 d1
d1 =c1 +1 d2 =0
92
1.2.5.2: Worked example
Suppose that
n1 = 60, n2 = 100, c1 = 0, c2 = c3 = 2.
c2
X
OC(p) = P (X1 ≤ c1|p) + P (X2 ≤ c3 − d1|p)P (X1 = d1|p)
d1 =c1 +1
93
So, if p = 0.01 then:
!
60
P (X1 = 0|p = 0.01) = (0.01)0(0.99)60 = 0.5472,
0
!
60
P (X1 = 1|p = 0.01) = (0.01)1(0.99)59 = 0.3316,
1
!
60
P (X1 = 2|p = 0.01) = (0.01)2(0.99)58 = 0.0988,
2
!
100
P (X2 = 0|p = 0.01) = (0.01)0 (0.99)100 = 0.3660,
0
!
100
P (X2 = 1|p = 0.01) = (0.01)1 (0.99)99 = 0.3697.
0
94
So,
= 0.827.
95
Similarly, for p = 0.05 we find
Thus,
= 0.053.
96
How much sampling we’d expect to do?
97
Definition 5 (ASN)
98
Hence,
99
Thus,
100
For the double sampling scheme described above,
101
1.2.6: Sequential sampling
102
Inspect observations one by one and let n denote the cumula-
samples.
103
Suppose we specify an AQL of p1, a LTPD of 100p2 (p2 > p1),
104
The sequential sampling rule we adopt, the SPRT, is as follows;
105
where
1 β 1 1−β
a = log , b = log ,
k 1−α k α
( ) ( )
1 1 − p1 p2(1 − p1)
c= log , k = log
k 1 − p2 p1(1 − p2)
106
The first n at which rejection can occur is given by
b
n ≥ b + nc =⇒ n ≥
1−c
−a
a + nc ≥ 0 =⇒ n ≥ .
c
107
d n=d
a+nc
CONTINUE
SAMPLING
ACCEPT
n
first point at which we
can accept the batch
108
1.2.6.1: Worked example
recently-manufactured computers.
109
Computers are sampled from the batch sequentially, the sampled
110
AQL = 0.1, LT P D = 20, producer’s risk α = 0.1 and β = 0.2.
111
(1) Determine the lower and upper boundaries of this SPRT and
112
( )
p (1 − p1) 0.2 × 0.9
k = log 2 = log = 0.811;
p1(1 − p2) 0.1 × 0.8
1 β 1 0.2
a = log = log = −1.855;
k 1−α k 0.9
1 1−β 1 0.8
b = log = log = 2.564;
k α k 0.1
!
1 1 − p1 1 0.9
c = log = log = 0.145.
k 1 − p2 k 0.8
113
• Acceptance region: if d ≤ −1.855 + 0.145n then accept the
batch.
• Continuation rule: if
rejected).
114
(2) What is the smallest number of observations at which the
b 2.564
n ≥ b + cn =⇒ n ≥ = = 3.
1−c 1 − 0.145
occur is 3.
115
(3) What is the smallest number of observations at which the
−a 1.855
a + cn ≥ 0 =⇒ n ≥ = = 12.770
c 0.145
116
(4) The sequential sampling procedure was applied to a batch of
numbers
out the SPRT on this data. State the outcome of the test.
117
10
0 10 20 30 40 50
–2
1.3.1: Introduction
119
(1) Inherent random variation which is characteristic of the pro-
causes of variation.
120
When only allowable causes of variation are present, the process
is said to be IN CONTROL.
121
The objectives of process control are
122
1.3.2: Control charts
The most commonly used tool for detecting changes is the CON-
123
When dealing with a quality characteristic that is a variable it is
124
Control of the process average, or mean quality level, is usually
125
Process variability can be monitored by either a control chart for
126
1.3.2.1: Basic Principles
it regularly.
127
For some variable x, we might regularly take a sample of size n.
For the x-chart we plot the sample mean x while on the R-chart
128
(1) CENTRE LINE (CL) which represents the specified target
129
(2) UPPER CONTROL LIMIT (UCL), LOWER CONTROL
130
These limits are also called the UPPER and LOWER ACTION
LIMITS.
131
sample quality
characteristic
UCL
CL
LCL
Sample number
132
Notice that this can be viewed as similar to falling outside a criti-
cal region in a hypothesis test and thus reject the null hypothesis,
133
The upper and lower control limits are typically drawn at ±3
134
Note that Chebyshev’s theorem states that, no matter what the
135
For a Normal distribution, over 99.73% of all observations fall
136
Definition 6 (General model for a control chart)
137
by:
U CL = µω + Lσω
CL = µω
LCL = µω − Lσω
line.
In order to improve sensitivity of the charts, we can add UPPER
centre line.
138
ω
UCL = µ ω+ 3σω
UWL=µ ω+ 2σω
3σ ω
2σ ω
CL = µ ω
2σ ω
3σ ω
LWL= µ ω− 2σω
LCL = µ ω− 3σω
Sample number
warning limits.
139
1.3.2.2: Control charts for X and R: µ and σ known
X ∼ N (µ, σ 2).
n
1 X
X= Xi ∼ N (µ, σ 2/n).
n i=1
140
With 3-sigma limits, the x-chart may be constructed as
σ
U CL = µ + 3 √ (1)
n
CL = µ (2)
σ
LCL = µ − 3 √ (3)
n
141
The probability of the observed statistic being within plus or
142
Thus, suppose we observe a sample x1, . . . , xn with mean
n
1 X
x= xi .
n i=1
that the observation does not come from the assumed normal
143
We now construct the R-chart for monitoring the variability of
144
To construct the R-chart using 3-sigma limits we need to find,
145
Definition 7 (Relative range)
W = R/σ
E(W ) = d2(n)
SD(W ) = d3(n).
146
d2(n) is often called Hartley’s constant.
Note that
(1) Both E(W ) and SD(W ) depend upon the size of the sample.
147
For example, if the sample size is 10 then
148
E(R) = E(σW ) = σE(W ) = σd2(n),
149
The R-chart with 3-sigma control limits is thus
CL = σd2(n) (5)
150
For a sample x1, . . . , xn we compute the observed sample range
not be equal to σ.
151
1.3.2.3: Control charts with non 3-sigma limits
152
Find the cα such that
w − µw
P > cα = α.
σw
153
If the quality characteristic follows normal distribution, for x̄-
chart, we have
X − µ
P σ > z α = α.
√n 2
qnorm(1 - α
2 , 0, 1)
154
Thus,
σ
U CL = µ + zα √
2 n
CL = µ
σ
LCL = µ − z α √
2 n
control.
155
For x-chart, if the distribution of the quality characteristic is not
156
1.3.5: x and R charts when µ, σ are unknown
157
Typically, the estimations are made from preliminary samples or
158
Suppose m samples, each containing n observations are taken
159
Let xj1, . . . , xjn denote the n observations in the jth sample,
n
1 X
xj = xji
n i=1
160
The best estimate of µ is the overall mean,
m
1 X
x= xj .
m j=1
m
1 X
r= rj .
m j=1
161
The corresponding random variables are such that
162
(1) r/d2(n) is not the only possible estimate of σ. We could use
163
Traditionally, because of the small sample sizes and its simplicity,
variance is smaller.
164
(2) If we take nj observations in the j sample then the standard
165
r
U CL = x + 3 √ = x + A2 r
d2(n) n
CL = x
r
LCL = x − 3 √ = x − A2 r
d2(n) n
√
where A2 = 3/(d2(n) n).
166
The R-chart:
r r
U CL = d2(n) + 3 d3(n) = D4r
d2(n) d2(n)
r
CL = d2(n) =r
d2(n)
r r
LCL = d2(n) − 3 d3(n) = D3r
d2(n) d2(n)
where
167
D3 and D4 are tabulated for various values of n, see “Appendix
lated as
max{0, 1 − 3(d3(n)/d2(n))}.
168
When using our m samples to create the estimates x and r it
were collected.
169
To check this, the m sample means xj j = 1, . . . , m should be
170
If any out of control points are observed, the corresponding data
171
1.3.2.4: Example
R charts.
172
25 samples, each of size five, are taken when the process is in
25
X 25
X
xj = 1850.028, rj = 0.581.
j=1 j=1
173
25
1 X 1850.028
x= xj = = 74.00;
25 j=1 25
25
1 X 0.581
r= rj = = 0.02324.
25 j=1 25
A2 = 0.577, D3 = 0, D4 = 2.115.
174
Thus, the x-chart is
CL = 74.00
175
and the R-chart is
U CL = 2.115(0.02324) = 0.04915
CL = 0.02324
LCL = 0(0.02324) = 0.
176
1.3.3: Interpretation of control charts
177
An out of control situation can also be present even if no sin-
gle point lies outside the control limits. This occurs when the
haviour.
178
We now give a number of important patterns to be aware of.
This indicates that the process mean may have drifted. This can
such as temperature.
179
(2) Shift in the process level.
Indicates that the process mean may have shifted. This could
180
(3) Cycles.
181
(4) Hugging the control limits.
182
(5) Hugging the centre line.
ability has been reduced from previously expected levels and the
183
1.3.4: Rational subgroups
184
The rational subgroups concept means that subgroups, or sam-
185
When the variation between subgroups is large relative to the
cause is present.
186
Sampling all from the same shift.
187