Graduate Lectures and Problems in Quality Control and Engineering Statistics:

advertisement
Graduate Lectures and Problems in Quality
Control and Engineering Statistics:
Theory and Methods
To Accompany
Statistical Quality Assurance Methods for Engineers
by
Vardeman and Jobe
Stephen B. Vardeman
V2.0: January 2001
c Stephen Vardeman 2001. Permission to copy for educational
°
purposes granted by the author, subject to the requirement that
this title page be a¢xed to each copy (full or partial) produced.
2
Contents
1 Measurement and Statistics
1.1 Theory for Range-Based Estimation of Variances . . . . . . . . .
1.2 Theory for Sample-Variance-Based Estimation of Variances . . .
1.3 Sample Variances and Gage R&R . . . . . . . . . . . . . . . . . .
1.4 ANOVA and Gage R&R . . . . . . . . . . . . . . . . . . . . . . .
1.5 Con…dence Intervals for Gage R&R Studies . . . . . . . . . . . .
1.6 Calibration and Regression Analysis . . . . . . . . . . . . . . . .
1.7 Crude Gaging and Statistics . . . . . . . . . . . . . . . . . . . . .
1.7.1 Distributions of Sample Means and Ranges from Integer
Observations . . . . . . . . . . . . . . . . . . . . . . . . .
1.7.2 Estimation Based on Integer-Rounded Normal Data . . .
1
1
3
4
5
7
10
11
12
13
2 Process Monitoring
21
2.1 Some Theory for Stationary Discrete Time Finite State Markov
Chains With a Single Absorbing State . . . . . . . . . . . . . . . 21
2.2 Some Applications of Markov Chains to the Analysis of Process
Monitoring Schemes . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Integral Equations and Run Length Properties of Process Monitoring Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3 An Introduction to Discrete Stochastic Control Theory/Minimum
Variance Control
37
3.1 General Exposition . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4 Process Characterization and Capability Analysis
4.1 General Comments on Assessing and Dissecting “Overall Variation”
4.2 More on Analysis Under the Hierarchical Random E¤ects Model
4.3 Finite Population Sampling and Balanced Hierarchical Structures
45
45
47
50
5 Sampling Inspection
53
5.1 More on Fraction Nonconforming Acceptance Sampling . . . . . 53
5.2 Imperfect Inspection and Acceptance Sampling . . . . . . . . . . 58
3
4
CONTENTS
5.3
Some Details Concerning the Economic Analysis of Sampling Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6 Problems
1
Measurement and Statistics . . . .
2
Process Monitoring . . . . . . . . .
3
Engineering Control and Stochastic
4
Process Characterization . . . . . .
5
Sampling Inspection . . . . . . . .
A Useful Probabilistic Approximation
. . . . . . . . . .
. . . . . . . . . .
Control Theory
. . . . . . . . . .
. . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
63
69
. 69
. 74
. 93
. 101
. 115
127
Chapter 1
Measurement and Statistics
V&J §2.2 presents an introduction to the topic of measurement and the relevance
of the subject of statistics to the measurement enterprise. This chapter expands
somewhat on the topics presented in V&J and raises some additional issues.
Note that V&J equation (2.1) and the discussion on page 19 of V&J are
central to the role of statistics in describing measurements in engineering and
quality assurance. Much of Stat 531 concerns “process variation.” The discussion on and around page 19 points out that variation in measurements from a
process will include both components of “real” process variation and measurement variation.
1.1
Theory for Range-Based Estimation of Variances
Suppose that X1 ; X2 ; : : : ; Xn are iid Normal (¹,¾2 ) random variables and let
R = max Xi ¡ min Xi
= max(Xi ¡ ¹) ¡ min(Xi ¡ ¹)
µ
µ
¶
µ
¶¶
Xi ¡ ¹
Xi ¡ ¹
= ¾ max
¡ min
¾
¾
= ¾ (max Zi ¡ min Zi )
where Zi = (Xi ¡ ¹)=¾. Then Z1 ; Z2 ; : : : ; Zn are iid standard normal random
variables. So for purposes of studying the distribution of the range of iid normal
variables, it su¢ces to study the standard normal case. (One can derive “general
¾” facts from the “¾ = 1” facts by multiplying by ¾.)
Consider …rst the matter of the …nding the mean of the range of n iid standard normal variables, Z1 ; : : : ; Zn . Let
U = min Zi ;
V = max Zi
1
and W = V ¡ U :
2
CHAPTER 1. MEASUREMENT AND STATISTICS
Then
EW = EV ¡ EU
and
¡EU = ¡E min Zi = E(¡ min Zi ) = E max(¡Zi ) ;
where the n variables ¡Z1 ; ¡Z2 ; : : : ; ¡Zn are iid standard normal. Thus
EW = EV ¡ EU = 2EV :
Then, (as is standard in the theory of order statistics) note that
V · t , all n values Zi are · t :
So with © the standard normal cdf,
P [V · t] = ©n (t)
and thus a pdf for V is
f (v) = nÁ(v)©n¡1 (v) :
So
EV =
Z
1
¡1
¡
¢
v nÁ(v)©n¡1 (v) dv ;
and the evaluation of this integral becomes a (very small) problem in numerical
analysis. The value of this integral clearly depends upon n. It is standard to
invent a constant (whose dependence upon n we will display explicitly)
:
d2 (n) = EW = 2EV
that is tabled in Table A.1 of V&J. With this notation, clearly
ER = ¾d2 (n) ;
(and the range-based formulas in Section 2.2 of V&J are based on this simple
fact).
To …nd more properties of W (and hence R) requires appeal to a well-known
order statistics result giving the joint density of two order statistics. The joint
density of U and V is
½
n(n ¡ 1)Á(u)Á(v) (©(v) ¡ ©(u))n¡2 for v > u
f (u; v) =
0
otherwise :
A transformation then easily shows that the joint density of U and W = V ¡ U
is
½
n(n ¡ 1)Á(u)Á(u + w) (©(u + w) ¡ ©(u))n¡2 for w > 0
g(u; w) =
0
otherwise :
1.2. THEORY FOR SAMPLE-VARIANCE-BASED ESTIMATION OF VARIANCES3
Then, for example, the cdf of W is
Z tZ
P [W · t] =
0
1
g(u; w)dudw ;
¡1
and the mean of W 2 is
2
EW =
Z
0
1Z 1
w2 g(u; w)dudw :
¡1
Note that upon computing EW and EW 2 , one can compute both the variance
of W
Var W = EW 2 ¡ (EW )2
p
and the standard deviation of W , Var W . It is common to give this standard
deviation the name d3 (n) (where we continue to make the dependence on n
explicit and again this
constant is tabled in Table A.1 of V&J). Clearly, having
: p
computed d3 (n) = Var W , one then has
p
Var R = ¾d3 (n) :
1.2
Theory for Sample-Variance-Based Estimation of Variances
Continue to suppose that X1 ; X2 ; : : : ; Xn are iid Normal (¹; ¾2 ) random variables and take
n
1 X
:
¹ 2:
s2 =
(Xi ¡ X)
n ¡ 1 i=1
Standard probability theory says that
(n ¡ 1)s2
» Â2n¡1 :
¾2
Now if U » Â2º it is the case that EU = º and Var U = 2º. It is thus immediate
that
¶ µ 2 ¶ µ
¶
µ 2 ¶µ
(n ¡ 1)s2
¾
(n ¡ 1)s2
¾
2
Es = E
=
E
= ¾2
n¡1
¾2
n¡1
¾2
and
Var s2 = Var
so that
µµ
¾2
n¡1
¶µ
(n ¡ 1)s2
¾2
¶¶
=
p
Var s2 = ¾ 2
µ
r
¾2
n¡1
¶2
2
:
n¡1
Var
µ
(n ¡ 1)s2
¾2
¶
=
2¾4
n¡1
4
CHAPTER 1. MEASUREMENT AND STATISTICS
Knowing that (n ¡ 1)s2 =¾2 » Â2n¡1 also makes it easy enough to develop
p
properties of s = s2 . For example, if
8
³ x´
1
<
( n¡1
2 )¡1 exp
x
for x > 0
¡
n¡1
2
f (x) =
2(n¡1)=2 ¡( 2 )
:
0
otherwise
is the Â2n¡1 probability density, then
r
r
Z 1
p
¾2
(n ¡ 1)s2
¾
p
Es = E
=
xf(x)dx = ¾c4 (n) ;
2
n¡1
¾
n¡1 0
for
:
c4 (n) =
R1p
0
xf (x)dx
p
n¡1
another constant (depending upon n) tabled in Table A.1 of V&J. Further, the
standard deviation of s is
q
q
q
p
2
2
Var s = Es ¡ (Es) = ¾2 ¡ (¾c4 (n))2 = ¾ 1 ¡ c24 (n) = ¾c5 (n)
for
:
c5 (n) =
q
1 ¡ c24 (n)
yet another constant tabled in Table A.1.
The fact that sums of independent Â2 random variables are again Â2 (with
degrees of freedom equal to the sum of the component degrees of freedom) and
the kinds of relationships in this section provide means of combining various
kinds of sample variances to get “pooled” estimators of variances (and variance
components) and …nding the means and variances of these estimators. For example, if one pools in the usual way the sample variances from r normal samples
of size m to get a single pooled sample variance, s2pooled , r(m ¡ 1)s2p ooled =¾ 2 is
Â2 with degrees of freedom º = r(m ¡ 1). That is, all of the above can be
applied by thinking of s2p ooled as a sample variance based on a sample of size
“n”= r(m ¡ 1) + 1.
1.3
Sample Variances and Gage R&R
The methods of gage R&R analysis presented in V&J §2.2.2 are based on ranges
(and the facts in §1.1 above). They are presented in V&J not because of their
e¢ciency, but because of their computational simplicity. Better (and analogous) methods can be based on the facts in §1.2 above. For example, under the
two-way random e¤ects model (2.4) of V&J, if one pools I £ J “cell” sample
variances s2ij to get s2p ooled , all of the previous paragraph applies and gives methods of estimating the repeatability variance component ¾2 (or the repeatability
standard deviation ¾) and calculating means and variances of estimators based
on s2p ooled .
1.4. ANOVA AND GAGE R&R
5
Or, consider the problem of estimating ¾reproducibility de…ned in display (2.5)
of V&J. With y¹ij as de…ned on page 24 of V&J, note that for …xed i, the
J random variables y¹ij ¡ ®i have the same sample variance as the J random
variables y¹ij , namely
1 X
:
s2i =
(¹
yij ¡ y¹i: )2 :
J ¡1 j
But for …xed i the J random variables y¹ij ¡ ®i are iid normal with mean ¹ and
2
variance ¾¯2 + ¾®¯
+ ¾ 2 =m, so that
2
Es2i = ¾¯2 + ¾®¯
+ ¾ 2 =m :
So
1X 2
s
I i i
2
is a plausible estimator of ¾¯2 + ¾®¯
+ ¾ 2 =m. Hence
1 X 2 s2p ooled
s ¡
;
I i i
m
or better yet
Ã
1 X 2 s2pooled
max 0;
s ¡
I i i
m
!
(1.1)
2
is a plausible estimator of ¾reproducibility
.
1.4
ANOVA and Gage R&R
Under the two-way random e¤ects model (2.4) of V&J, with balanced data, it
is well-known that the ANOVA mean squares
X
1
(yijk ¡ y¹:: )2 ;
M SE =
IJ(m ¡ 1)
i;j;k
X
m
M SAB =
(¹
yij ¡ y¹i: ¡ y¹:j + y¹:: )2 ;
(I ¡ 1)(J ¡ 1) i;j
mJ X
(¹
yi: ¡ y¹:: )2 ; and
I ¡1 i
mI X
(¹
y:j ¡ y¹:: )2 ;
M SB =
J ¡1 i
M SA =
are independent random variables, that
EMSE = ¾2 ;
2
EM SAB = ¾2 + m¾®¯
;
2
EM SA = ¾2 + m¾®¯
+ mJ¾®2 ;
EMSB = ¾
2
2
+ m¾®¯
+ mI¾¯2
;
and
6
CHAPTER 1. MEASUREMENT AND STATISTICS
Table 1.1: Two-way Balanced Data Random E¤ects Analysis ANOVA Table
ANOVA Table
Source
SS
df
MS
EM S
2
Parts
SSA
I ¡1
MSA
¾ 2 + m¾®¯
+ mJ¾®2
2
2
Operators
SSB
J ¡1
M SB
¾ + m¾®¯ + mI¾¯2
2
Parts£Operators SSAB (I ¡ 1)(J ¡ 1) M SAB ¾ 2 + m¾®¯
2
Error
SSE
(m ¡ 1)IJ
MSE
¾
Total
SST ot
mIJ ¡ 1
and that the quantities
(m ¡ 1)IJM SE (I ¡ 1)(J ¡ 1)M SAB (I ¡ 1)MSA
(J ¡ 1)M SB
;
;
and
EM SE
EM SAB
EMSA
EMSB
are Â2 random variables with respective degrees of freedom
(m ¡ 1)IJ ; (I ¡ 1)(J ¡ 1) ; (I ¡ 1) and (J ¡ 1) :
These facts about sums of squares and mean squares for the two-way random
e¤ects model are often summarized in the usual (two-way random e¤ects model)
ANOVA table, Table 1.1. (The sums of squares are simply the mean squares
multiplied by the degrees of freedom. More on the interpretation of such tables
can be found in places like §8-4 of V.)
As a matter of fact, the ANOVA error mean square is exactly s2pooled from
§1.3 above. Further, the expected mean squares suggest ways of producing sensible estimators of other parametric functions of interest in gage R&R contexts
(see V&J page 27 in this regard). For example, note that
2
¾reproducibility
=
1
1
1
1
EM SB + (1 ¡ )EMSAB ¡ EM SE ;
mI
m
I
m
which suggests the ANOVA-based estimator
µ
¶
1
1
1
1
2
¾
breproducibility
= max 0;
M SB + (1 ¡ )MSAB ¡ MSE :
mI
m
I
m
(1.2)
What may or may not be well known is that this estimator (1.2) is exactly the
2
estimator of ¾reproducibility
in display (1.1).
Since many common estimators of quantities of interest in gage R&R studies
are functions of mean squares, it is useful to have at least some crude standard
errors for them. These can be derived from “delta method”/“propagation of
error”/Taylor series argument provided in the appendix to these notes. For
example, if M Si i = 1; : : : ; k are independent random variables, (ºi MSi =EMSi )
with a Â2ºi distribution, consider a function of k real variables f (x1 ; : : : ; xk ) and
the random variable
U = f (M S1 ; M S2 ; :::; MSk ) :
1.5. CONFIDENCE INTERVALS FOR GAGE R&R STUDIES
7
Propagation of error arguments produce the approximation
Ã
!2
Ã
!2
¯
¯
k
k
X
X
2(EM Si )2
@f ¯¯
@f ¯¯
Var U ¼
Var
M
S
=
;
i
@xi ¯EMS1 ;EMS2 ;:::;EMSk
@xi ¯EMS1 ;EMS2 ;:::;EMSk
ºi
i=1
i=1
and upon substituting mean squares for their expected values, one has a standard error for U , namely
v
!2
u k Ã
p
u X @f ¯¯
(MSi )2
t
¯
d
:
(1.3)
Var U = 2
¯
@xi MS1 ;MS2 ;:::;MSk
ºi
i=1
In the special case where the function of the mean squares of interest is linear
in them, say
k
X
U=
ci M Si ;
i=1
the standard error specializes to
v
u k
p
u X c2 (M Si )2
i
d
Var U = t2
;
ºi
i=1
2
which provides at least a crude method of producing standard errors for ¾
breproducibility
2
and ¾
boverall
. Such standard errors are useful in giving some indication of the
precision with which the quantities of interest in a gage R&R study have been
estimated.
1.5
Con…dence Intervals for Gage R&R Studies
The parametric functions of interest in gage R&R studies (indeed in all random
e¤ects analyses) are functions of variance components, or equivalently, functions
of expected mean squares. It is thus possible to apply theory for estimating such
quantities to the problem of assessing precision of estimation in a gage study.
As a …rst (and very crude) example of this, note that taking the point of view of
§1.4 above, where U = f (MS1 ; M S2 ; : : : ; MSk ) is a sensible
p point estimator of
d U is the standard
an interesting function of the variance components and Var
error (1.3), simple approximate two-sided 95% con…dence limits can be made as
p
dU :
U § 1:96 Var
These limits have the virtue of being amenable to “hand” calculation from the
ANOVA sums of squares, but they are not likely to be reliable (in terms of
holding their nominal/asymptotic coverage probability) for I,J or m small.
Linear models experts have done substantial research aimed at …nding reliable con…dence interval formulas for important functions of expected mean
8
CHAPTER 1. MEASUREMENT AND STATISTICS
squares. For example, the book Con…dence Intervals on Variance Components
by Burdick and Graybill gives results (on the so-called “modi…ed large sample
method”) that can be used to make con…dence intervals on various important
functions of variance components. The following is some material taken from
Sections 3.2 and 3.3 of the Burdick and Graybill book.
Suppose that M S1 ; M S2 ; : : : ; M Sk are k independent mean squares. (The
MSi are of the form SSi =ºi , where SSi =EMSi = ºi M Si =EM Si has a Â2ºi
distribution.) For 1 · p < k and positive constants c1 ; c2 ; : : : ; ck suppose that
the quantity
µ = c1 EM S1 + ¢ ¢ ¢ + cp EM Sp ¡ cp+1 EMSp+1 ¡ ¢ ¢ ¢ ¡ ck EMSk
(1.4)
is of interest. Let
µb = c1 MS1 + ¢ ¢ ¢ + cp M Sp ¡ cp+1 M Sp+1 ¡ ¢ ¢ ¢ ¡ ck MSk :
Approximate con…dence limits on µ in display (1.4) are of the form
q
q
L = µb ¡ VL and/or U = µb + VU ;
for VL and VU de…ned below.
Let F®:df1 ;df2 be the upper ® point of the F distribution with df1 and df2
degrees of freedom. (It is then the case that F®:df1 ;df2 = (F1¡®:df2 ;df1 )¡1 .) Also,
let Â2®:df be the upper ® point of the Â2df distribution. With this notation
VL =
p
X
k
X
c2i M Si2 G2i +
i=1
i=p+1
p
p¡1 X
p
k
X
X
X
c2i M Si2 Hi2 +
ci cj M Si M Sj Gij +
ci cj M Si M Sj G¤ij ;
i=1 j=p+1
for
Gi = 1 ¡
Hi =
Gij =
i=1 j>i
ºi
;
Â2®:ºi
ºi
¡1 ;
Â21¡®:ºi
2
¡ Hj2
(F®:ºi ;ºj ¡ 1)2 ¡ G2i F®:º
i ;ºj
;
F®:ºi ;ºj
and
G¤ij
8
>
< 0
1
=
>
: p¡1
õ
! if p = 1
¶2
ºi + ºj
(ºi + ºj )2 G2i ºi G2j ºj
1¡
¡
¡
otherwise :
®:ºi +ºj
ºi ºj
ºj
ºi
On the other hand,
VU =
p
X
i=1
c2i M Si2 Hi2 +
k
X
i=p+1
p
k
k¡1
k
X
X
X X
¤
;
c2i M Si2 G2i +
ci cj MSi MSj Hij +
ci cj MSi M Sj Hij
i=1 j=p+1
i=p+1 j>i
1.5. CONFIDENCE INTERVALS FOR GAGE R&R STUDIES
9
for Gi and Hi as de…ned above, and
Hij =
2
(1 ¡ F1¡®:ºi ;ºj )2 ¡ Hi2 F1¡®:º
¡ G2j
i ;ºj
F1¡®:ºi ;ºj
;
and
8
0
>
>
<
0Ã
1 if k = p + 1
!2
2
¤
(ºi + ºj )2 G2i ºi Gj ºj A
1
Hij
=
@ 1 ¡ ºi + ºj
otherwise :
¡
¡
>
2
>
: k¡p¡1
®:ºi +ºj
ºi ºj
ºj
ºi
One uses (L; 1) or (¡1; U) for con…dence level (1 ¡ ®) and the interval (L; U )
for con…dence level (1 ¡ 2®). (Using these formulas for “hand” calculation is
(obviously) no picnic. The C program written by Brandon Paris (available o¤
the Stat 531 Web page) makes these calculations painless.)
A problem similar to the estimation of quantity (1.4) is that of estimating
µ = c1 EM S1 + ¢ ¢ ¢ + cp EM Sp
(1.5)
for p ¸ 1 and positive constants c1 ; c2 ; : : : ; cp . In this case let
µb = c1 MS1 + ¢ ¢ ¢ + cp M Sp ;
and continue the Gi and Hi notation from above. Then approximate con…dence
limits on µ given in display (1.5) are of the form
v
v
u p
u p
uX
uX
2
2
2
t
b
b
L=µ¡
ci M Si Gi and/or U = µ + t
c2i M Si2 Hi2 :
i=1
i=1
One uses (L; 1) or (¡1; U) for con…dence level (1 ¡ ®) and the interval (L; U )
for con…dence level (1 ¡ 2®).
The Fortran program written by Andy Chiang (available o¤ the Stat 531
Web page) applies Burdick and Graybill-like material and the standard errors
(1.3) to the estimation of many parametric functions of relevance in gage R&R
studies.
Chiang’s 2000 Ph.D. dissertation work (to appear in Technometrics in August 2001) has provided an entirely di¤erent method of interval estimation of
functions of variance components that is a uniform improvement over the “modi…ed large sample” methods presented by Burdick and Graybill. His approach
is related to “improper Bayes” methods with so called “Je¤reys priors.” Andy
has provided software for implementing his methods that, as time permits, will
be posted on the Stat 531 Web page. He can be contacted (for preprints of his
work) at stackl@nus.edu.sg at the National University of Singapore.
10
1.6
CHAPTER 1. MEASUREMENT AND STATISTICS
Calibration and Regression Analysis
The estimation of standard deviations and variance components is a contribution of the subject of statistics to the quanti…cation of measurement system
precision. The subject also has contributions to make in the matter of improving measurement accuracy. Calibration is the business of bringing a local
measurement system in line with a standard measurement system. One takes
measurements y with a gage or system of interest on test items with “known”
values x (available because they were previously measured using a “gold standard” measurement device). The data collected are then used to create a conversion scheme for translating local measurements to approximate gold standard
measurements, thereby hopefully improving local accuracy. In this short section we note that usual regression methodology has implications in this kind of
enterprise.
The usual polynomial regression model says that n observed random values
yi are related to …xed values xi via
yi = ¯0 + ¯1 xi + ¯2 x2i + ¢ ¢ ¢ + ¯k xki + "i
(1.6)
for iid Normal (0; ¾2 ) random variables "i . The parameters ¯ and ¾ are the
usual objects of inference in this model. In the calibration context with x a
gold standard value, ¾ quanti…es precision for the local measurement system.
Often (at least over a limited range of x) 1) a low order polynomial does a good
job of describing the observed x-y relationship between local and gold standard
measurements and 2) the usual (least squares) …tted relationship
y^ = g(x) = b0 + bx + b2 x2 + ¢ ¢ ¢ + bk xk
has an inverse g ¡1 (y). When such is the case, given a measurement yn+1 from
the local measurement system, it is plausible to estimate that a corresponding
measurement from the gold standard system would be x
^n+1 = g¡1 (yn+1 ). A
reasonable question is then “How good is this estimate?”. That is, the matter
of con…dence interval estimation of xn+1 is important.
One general method for producing such con…dence sets for xn+1 is based on
the usual “prediction interval” methodology associated with the model (1.6).
That is, for a given x, it is standard (see, e.g. §9-2 of V or §9.2.4 of V&J#2) to
produce a prediction interval of the form
q
y))2
y^ § t s2 + (std error(^
for an additional corresponding y. And those intervals have the property that
for all choices of x; ¾; ¯0 ; ¯1 ; ¯2 ; :::; ¯k
Px;¾;¯0 ;¯1 ;¯2 ;:::;¯k [y is in the prediction interval at x]
= desired con…dence level
= 1 ¡ P [a tn¡k¡1 random variable exceeds jtj] .
1.7. CRUDE GAGING AND STATISTICS
11
But rewording only slightly, the event
“y is in the prediction interval at x”
is the same as the event
“x produces a prediction interval including y.”
So a con…dence set for xn+1 based on the observed value yn+1 is
fxj the prediction interval corresponding to x includes yn+1 g .
(1.7)
Conceptually, one simply makes prediction limits around the …tted relationship
y^ = g(x) = b0 + bx + b2 x2 + ¢ ¢ ¢ + bk xk and then upon observing a new y sees
what x’s are consistent with that observation. This produces a con…dence set
with the desired con…dence level.
The only real di¢culties with the above general prescription are 1) the lack of
simple
p explicit formulas and 2) the fact that when ¾ is large (so that the regression MSE tends to be large) or the …tted relationship is very nonlinear, the
method can produce (completely rational but) unpleasant-looking con…dence
sets. The …rst “problem” is really of limited consequence in a time when standard statistical software will automatically produce plots of prediction limits
associated with low order regressions. And the second matter is really inherent
in the problem.
For the (simplest) linear version of this “inverse prediction” problem, there
is an approximate con…dence method in common use that doesn’t have the
de…ciencies of the method (1.7). It is derived from a Taylor series argument and
has its own problems, but is nevertheless worth recording here for completeness
sake. That is, under the k = 1 version of the model (1.6), commonly used
approximate con…dence limits for xn+1 are (for x
^n+1 = (yn+1 ¡ b0 )=b1 and
x
¹ the sample mean of the gold standard measurements from the calibration
experiment)
s
p
M SE
1
(^
xn+1 ¡ x
¹)2
x
^n+1 § t
1 + + Pn
.
jb1 j
n
¹)2
i=1 (xi ¡ x
1.7
Crude Gaging and Statistics
All real-world measurement is “to the nearest something.” Often one may ignore
this fact, treat measured values as if they were “exact” and experience no real
di¢culty when using standard statistical methods (that are really based on an
assumption that data are exact). However, sometimes in industrial applications
gaging is “crude” enough that standard (e.g. “normal theory”) formulas give
nonsensical results. This section brie‡y considers what can be done to appropriately model and draw inferences from crudely gaged data. The assumption
throughout is that what are available are integer data, obtained by coding raw
observations via
raw observation ¡ some reference value
integer observation =
smallest unit of measurement
12
CHAPTER 1. MEASUREMENT AND STATISTICS
(the “smallest unit of measurement” is “the nearest something” above).
1.7.1
Distributions of Sample Means and Ranges from Integer Observations
To begin with something simple, note …rst that in situations where only a few
di¤erent coded values are ever observed, rather than trying to model observations with some continuous distribution (like a normal one) it may well make
sense to simply employ a discrete pmf, say f, to describe any single measurement. In fact, suppose that a single (crudely gaged) observation Y has a pmf
f(y) such that
f (y) = 0 unless y = 1; 2; :::; M :
Then if Y1 ; Y2 ; : : : ; Yn are iid with this marginal discrete distribution, one can
easily approximate the distribution of a function of these variables via simulation
(using common statistical packages). And for two of the most common statistics
used in QC settings (the sample mean and range) one can even work out exact
probability distributions using computationally feasible and very elementary
methods.
To …nd the probability distribution of Y¹ in this context, one can build up
the probability distributions of sums of iid Yi ’s recursively by “adding probabilities on diagonals in two-way joint probability tables.” For example the n = 2
distribution of Y¹ can be obtained by making out a two-way table of joint probabilities for Y1 and Y2 and adding on diagonals to get probabilities for Y1 + Y2 .
Then making a two-way table of joint probabilities for (Y1 + Y2 ) and Y3 one
can add on diagonals and …nd a joint distribution for Y1 + Y2 + Y3 . Or noting
that the distribution of Y3 + Y4 is the same as that for Y1 + Y2 , it is possible to
make a two-way table of joint probabilities for (Y1 + Y2 ) and (Y3 + Y4 ), add on
diagonals and …nd the distribution of Y1 + Y2 + Y3 + Y4 . And so on. (Clearly,
after …nding the distribution for a sum, one simply divides possible values by n
to get the corresponding distribution of Y¹ .)
To …nd the probability distribution of R = max Yi ¡min Yi (for Yi ’s as above)
a feasible computational scheme is as follows. Let
Skj =
½ Pj
0
x=k
f(y) = P [k · Y · j] if k · j
otherwise
and compute and store these for 1 · k; j · M . Then de…ne
Mkj = P [min Yi = k and max Yi = j] :
Now the event fmin Yi = k and max Yi = jg is the event fall observations are
between k and j inclusiveg less the event fthe minimum is greater than k or the
maximum is less than jg. Thus, it is straightforward to see that
Mkj = (Skj )n ¡ (Sk+1;j )n ¡ (Sk;j¡1 )n + (Sk+1;j¡1 )n
1.7. CRUDE GAGING AND STATISTICS
13
and one may compute and store these values. Finally, note that
P [R = r] =
M¡r
X
Mk;k+r :
k=1
These “algorithms” are good for any distribution f on the integers 1; 2; : : : ; M .
Karen (Jensen) Hulting’s “DIST” program (available o¤ the Stat 531 Web page)
automates the calculations of the distributions of Y¹ and R for certain f ’s related to “integer rounding of normal observations.” (More on this rounding idea
directly.)
1.7.2
Estimation Based on Integer-Rounded Normal Data
The problem of drawing inferences from crudely gaged data is one that has a
history of at least 100 years (if one takes a view that crude gaging essentially
“rounds” “exact” values). Sheppard in the late 1800’s noted that if one rounds
a continuous variable to integers, the variability in the distribution is typically
increased. He thus suggested not using the sample standard deviation (s) of
rounded values but instead employing what is known as Sheppard’s correction
to arrive at
r
1
(n ¡ 1)s2
¡
(1.8)
n
12
as a suitable estimate of “standard deviation” for integer-rounded data.
The notion of “interval-censoring” of fundamentally continuous observations
provides a natural framework for the application of modern statistical theory to
the analysis of crudely gaged data. For univariate X with continuous cdf F (xjµ)
depending upon some (possibly vector) parameter µ, consider X ¤ derived from
X by rounding to the nearest integer. Then the pmf of X ¤ is, say,
½
F (x¤ + :5jµ) ¡ F (x¤ ¡ :5jµ) for x¤ an integer
:
¤
g(x jµ) =
0
otherwise :
Rather than doing inference based on the unobservable variables X1 ; X2 ; : : : ; Xn
that are iid F (xjµ), one might consider inference based on X1¤ ; X2¤ ; : : : ; Xn¤ that
are iid with pmf g(x¤ jµ).
The normal version of this scenario (the integer-rounded normal data model)
makes use of
8 µ ¤
¶
µ ¤
¶
x + :5 ¡ ¹
x ¡ :5 ¡ ¹
<
©
¡©
for x¤ an integer
:
g(x¤ j¹; ¾) =
¾
¾
:
0
otherwise ;
and the balance of this section will consider the use of this speci…c important
model. So suppose that X1¤ ; X2¤ ; : : : ; Xn¤ are iid integer-valued random observations (generated from underlying normal observations by rounding). For an
observed vector of integers (x¤1 ; x¤2 ; : : : ; x¤n ) it is useful to consider the so-called
14
CHAPTER 1. MEASUREMENT AND STATISTICS
“likelihood function” that treats the (joint) probability assigned to the vector
(x¤1 ; x¤2 ; : : : ; x¤n ) as a function of the parameters,
µ ¤
¶¶
Y µ µ x¤ + :5 ¡ ¹ ¶
xi ¡ :5 ¡ ¹
: Y
i
L(¹; ¾) =
g(x¤i j¹; ¾) =
©
¡©
:
¾
¾
i
i
The log of this function of ¹ and ¾ is (naturally enough) called the loglikelihood
and will be denoted as
:
L(¹; ¾) = ln L(¹; ¾) :
A sensible estimator of the parameter vector (¹; ¾) is “the point (b
¹; ¾
b) maximizing the loglikelihood.” This prescription for estimation is only partially
complete, depending upon the nature of the sample x¤1 ; x¤2 ; : : : ; x¤n . There are
three cases to consider, namely:
1. When the sample range of x¤1 ; x¤2 ; : : : ; xn is at least 2, L(¹; ¾) is wellbehaved (nice and “mound-shaped”) and numerical maximization or just
looking at contour plots will quickly allow one to maximize the loglikelihood. (It is worth noting that in this circumstance, usually ¾
b is close to
the “Sheppard corrected” value in display (1.8).)
2. When the sample range of x¤1 ; x¤2 ; : : : ; xn is 1, strictly speaking L(¹; ¾)
fails to achieve a maximum. However, with
:
m = #[x¤i = min x¤i ] ;
(¹; ¾) pairs with ¾ small and
¹ ¼ min x¤i + :5 ¡ ¾©¡1
will have
³m´
n
L(¹; ¾) ¼ sup L(¹; ¾) = m ln m + (n ¡ m) ln(n ¡ m) ¡ n ln n :
¹;¾
That is, in this case one ought to “estimate” that ¾ is small and the
relationship between ¹ and ¾ is such that a fraction m=n of the underlying
normal distribution is to the left of min x¤i + :5, while a fraction 1 ¡ m=n
is to the right.
3. When the sample range of x¤1 ; x¤2 ; : : : ; xn is 0, strictly speaking L(¹; ¾)
fails to achieve a maximum. However,
sup L(¹; ¾) = 0
¹;¾
and for any ¹ 2 (x¤1 ¡ :5; x¤1 + :5), L(¹; ¾) ! 0 as ¾ ! 0. That is, in this
case one ought to “estimate” that ¾ is small and ¹ 2 (x¤1 ¡ :5; x¤1 + :5).
1.7. CRUDE GAGING AND STATISTICS
15
Beyond the making of point estimates, the loglikelihood function can provide
approximate con…dence sets for the parameters ¹ and/or ¾. Standard “large
sample” statistical theory says that (for large n and Â2®:º the upper ® point of
the Â2º distribution):
1. An approximate (1¡®) level con…dence set for the parameter vector (¹; ¾)
is
1
(1.9)
f(¹; ¾)jL(¹; ¾) > sup L(¹; ¾) ¡ Â2®:2 g :
2
¹;¾
2. An approximate (1 ¡ ®) level con…dence set for the parameter ¹ is
1
f¹j sup L(¹; ¾) > sup L(¹; ¾) ¡ Â2®:1 g :
2
¾
¹;¾
(1.10)
3. An approximate (1 ¡ ®) level con…dence set for the parameter ¾ is
1
f¾j sup L(¹; ¾) > sup L(¹; ¾) ¡ Â2®:1 g :
2
¹
¹;¾
(1.11)
Several comments and a fuller discussion are in order regarding these con…dence sets. In the …rst place, Karen (Jensen) Hulting’s CONEST program
(available o¤ the Stat 531 Web page) is useful in …nding sup L(¹; ¾) and pro¹;¾
ducing rough contour plots of the (joint) sets for (¹; ¾) in display (1.9). Second,
it is common to call the function of ¹ de…ned by
L¤ (¹) = sup L(¹; ¾)
¾
the “pro…le loglikelihood” function for ¹ and the function of ¾
L¤¤ (¾) = sup L(¹; ¾)
¹
the “pro…le loglikelihood” function for ¾. Note that display (1.10) then says that
the con…dence set should consist of those ¹’s for which the pro…le loglikelihood
is not too much smaller than the maximum achievable. And something entirely
analogous holds for the sets in (1.11). Johnson Lee (in 2001 Ph.D. dissertation
work) has carefully studied these con…dence interval estimation problems and
determined that some modi…cation of methods (1.10) and (1.11) is necessary in
order to provide guaranteed coverage probabilities for small sample sizes. (It
is also very important to realize that contrary to naive expectations, not even
a large sample size will make the usual t-intervals for ¹ and Â2 -intervals for ¾
hold their nominal con…dence levels in the event that ¾ is small, i.e. that the
rounding or crudeness of the gaging is important. Ignoring the rounding when
it is important can produce actual con…dence levels near 0 for methods with
large nominal con…dence levels.)
16
CHAPTER 1. MEASUREMENT AND STATISTICS
Table 1.2: ¢ for 0-Range Samples Based on Very Small n
®
n
:05
:10
:20
2 3:084 1:547 :785
3
:776
:562
4
:517
Intervals for a Normal Mean Based on Integer-Rounded Data
Speci…cally regarding the sets for ¹ in display (1.10), Lee (in work to appear in
the Journal of Quality Technology) has shown that one must replace the value
Â2®:1 with something larger in order to get small n actual con…dence levels not
too far from nominal for “most” (¹; ¾). In fact, the choice
à 2
!
t ® :(n¡1)
2
c(n; ®) = n ln
+1
n¡1
(for t ®2 :(n¡1) the upper ®2 point of the t distribution with º = n ¡ 1 degrees of
freedom) is appropriate.
After replacing Â2®:1 with c(n; ®) in display (1.10) there remains the numerical analysis problem of actually …nding the interval prescribed by the display.
The nature of the numerical analysis required depends upon the sample range
encountered in the crudely gaged data. Provided the range is at least 2, L¤ (¹)
is well-behaved (continuous and “mound-shaped”) and even simple trial and
error with Karen (Jensen) Hulting’s CONEST program will quickly produce
the necessary interval. When the range is 0 or 1, L¤ (¹) has respectively 2 or 1
discontinuities and the numerical analysis is a bit trickier. Lee has recorded the
results of the numerical analysis for small sample sizes and ® = :05; :10 and :20
(con…dence levels respectively 95%; 90% and 80%).
When a sample of size n produces range 0 with, say, all observations equal
to x¤ , the intuition that one ought to estimate ¹ 2 (x¤ ¡ :5; x¤ + :5) is sound
unless n is very small. If n and ® are as recorded in Table 1.2 then display
(1.10) (modi…ed by the use of c(n; ®) in place of Â2®:1 ) leads to the interval
(x¤ ¡ ¢; x¤ + ¢). (Otherwise it leads to (x¤ ¡ :5; x¤ + :5) for these ®.)
In the case that a sample of size n produces range 1 with, say, all observations
x¤ or x¤ + 1, the interval prescribed by display (1.10) (with c(n; ®) used in place
of Â2®:1 ) can be thought of as having the form (x¤ + :5 ¡ ¢L ; x¤ + :5 + ¢U ) where
¢L and ¢U depend upon
nx¤ = #[observations x¤ ] and nx¤ +1 = #[observations x¤ + 1] .
(1.12)
When nx¤ ¸ nx¤ +1 , it is the case that ¢L ¸ ¢U . And when nx¤ · nx¤ +1 ,
correspondingly ¢L · ¢U . Let
m = maxfnx¤ ; nx¤ +1 g
(1.13)
1.7. CRUDE GAGING AND STATISTICS
17
Table 1.3: (¢1 ;¢2 ) for Range 1 Samples Based on Small n
®
n m
:05
:10
:20
2
1
(6:147; 6:147) (3:053; 3:053) (1:485; 1:485)
3
2
(1:552; 1:219) (1:104; 0:771) (0:765; 0:433)
4
3
(1:025; 0:526) (0:082; 0:323) (0:639; 0:149)
2
(0:880; 0:880) (0:646; 0:646) (0:441; 0:441)
5
4
(0:853; 0:257) (0:721; 0:132) (0:592; 0:024)
3
(0:748; 0:548) (0:592; 0:339) (0:443; 0:248)
6
5
(0:772; 0:116) (0:673; 0:032) (0:569; 0:000)
4
(0:680; 0:349) (0:562; 0:235) (0:444; 0:126)
3
(0:543; 0:543) (0:420; 0:420) (0:299; 0:299)
7
6
(0:726; 0:035) (0:645; 0:000) (0:556; 0:000)
5
(0:640; 0:218) (0:545; 0:130) (0:446; 0:046)
4
(0:534; 0:393) (0:432; 0:293) (0:329; 0:193)
8
7
(0:698; 0:000) (0:626; 0:000) (0:547; 0:000)
6
(0:616; 0:129) (0:534; 0:058) (0:446; 0:000)
5
(0:527; 0:281) (0:439; 0:197) (0:347; 0:113)
4
(0:416; 0:416) (0:327; 0:327) (0:236; 0:236)
9
8
(0:677; 0:000) (0:613; 0:000) (0:541; 0:000)
7
(0:599; 0:065) (0:526; 0:010) (0:448; 0:000)
6
(0:521; 0:196) (0:443; 0:124) (0:361; 0:054)
5
(0:429; 0:321) (0:350; 0:242) (0:267; 0:163)
10 9
(0:662; 0:000) (0:604; 0:000) (0:537; 0:000)
8
(0:587; 0:020) (0:521; 0:000) (0:450; 0:000)
7
(0:515; 0:129) (0:446; 0:069) (0:371; 0:012)
6
(0:437; 0:242) (0:365; 0:174) (0:289; 0:105)
5
(0:346; 0:346) (0:275; 0:275) (0:200; 0:200)
and correspondingly take
¢1 = maxf¢L ; ¢U g and ¢2 = minf¢L ; ¢U g .
Table 1.3 then gives values for ¢1 and ¢2 for n · 10 and ® = :05; :10 and :2.
Intervals for a Normal Standard Deviation Based on Integer-Rounded
Data
Speci…cally regarding the sets for ¾ in display (1.11), Lee found that in order
to get small n actual con…dence levels not too far from nominal, one must not
only replace the value Â2®:1 with something larger, but must make an additional
adjustment for samples with ranges 0 and 1.
Consider …rst replacing Â2®:1 in display (1.11) with a (larger) value d(n; ®)
given in Table 1.4. Lee found that for those (¹; ¾) with moderate to large ¾,
18
CHAPTER 1. MEASUREMENT AND STATISTICS
Table 1.4: d(n; ®) for Use
®
n
:05
2 10:47
3
7:26
4
6:15
5
5:58
6
5:24
7
5:01
8
4:84
9
4:72
10
4:62
15
4:34
20
4:21
30
4:08
1
3:84
in Estimating ¾
:10
7:71
5:23
4:39
3:97
3:71
3:54
3:42
3:33
3:26
3:06
2:97
2:88
2:71
making this d(n; ®) for Â2®:1 substitution is enough to produce an actual con…dence level approximating the nominal one. However, even this modi…cation
is not adequate to produce an acceptable coverage probability for (¹; ¾) with
small ¾.
For samples with range 0 or 1, formula (1.11) prescribes intervals of the form
(0; U). And reasoning that when ¾ is small, samples will typically have range
0 or 1, Lee was able to …nd (larger) replacements for the limit U prescribed by
(1.11) so that the resulting estimation method has actual con…dence level not
much below the nominal level for any (¹; ¾) (with ¾ large or small).
That is if a 0-range sample is observed, estimate ¾ by
(0; ¤0 )
where ¤0 is taken from Table 1.5. If a range 1 sample is observed consisting,
say, of values x¤ and x¤ + 1, and nx¤ ; nx¤ +1 and m are as in displays (1.12) and
(1.13), estimate ¾ using
(0; ¤1;m )
where ¤1;m is taken from Table 1.6.
The use of these values ¤0 for range 0 samples, and ¤1;m for range 1 samples,
and the values d(n; ®) in place of Â2®:1 in display (1.11) …nally produces a reliable
method of con…dence interval estimation for ¾ when normal data are integerrounded.
1.7. CRUDE GAGING AND STATISTICS
Table 1.5: ¤0 for Use in Estimating ¾
®
n
:05
:10
2 5:635
2:807
3 1:325
0:916
4 0:822
0:653
5 0:666
0:558
6 0:586
0:502
7 0:533
0:464
8 0:495
0:435
9 0:466
0:413
10 0:443
0:396
11 0:425
0:381
12 0:409
0:369
13 0:396
0:358
14 0:384
0:349
15 0:374
0:341
19
20
CHAPTER 1. MEASUREMENT AND STATISTICS
n
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Table 1.6: ¤1;m for Use in Estimating ¾ (m in Parentheses)
®
:05
:10
16:914(1)
8:439(1)
3:535(2)
2:462(2)
1:699(3)
2:034(2)
1:303(3)
1:571(2)
1:143(4)
1:516(3)
0:921(4)
1:231(3)
0:897(5)
1:153(4)
1:285(3)
0:752(5)
0:960(4)
1:054(3)
0:768(6)
0:944(5)
1:106(4)
0:660(6)
0:800(5)
0:949(4)
0:687(7)
0:819(6)
0:952(5)
0:599(7)
0:707(6)
0:825(5)
1:009(4)
0:880(4)
0:629(8)
0:736(7)
0:837(6)
0:555(8)
0:644(7)
0:726(6)
0:941(5)
0:831(5)
0:585(9)
0:677(8)
0:747(7)
0:520(9)
0:597(8)
0:654(7)
0:851(6)
0:890(5)
0:753(6)
0:793(5)
0:550(10)
0:630(9)
0:690(8)
0:493(10)
0:560(9)
0:609(8)
0:775(7)
0:851(6)
0:685(7)
0:763(6)
0:522(11) 0:593(10)
0:646(9)
0:470(11) 0:531(10)
0:573(9)
0:708(8)
0:789(7)
0:818(6)
0:626(8)
0:707(7)
0:738(6)
0:499(12) 0:563(11) 0:610(10)
0:452(12) 0:506(11) 0:544(10)
0:658(9)
0:733(8)
0:791(7)
0:587(9)
0:655(8)
0:716(7)
0:479(13) 0:537(12) 0:580(11)
0:436(13) 0:485(12) 0:520(11)
0:622(10)
0:681(9)
0:745(8)
0:558(10)
0:607(9)
0:674(8)
0:768(7)
0:698(7)
0:463(14) 0:515(13) 0:555(12)
0:422(14) 0:468(13) 0:499(12)
0:593(11) 0:639(10)
0:701(9)
0:534(11) 0:574(10)
0:632(9)
0:748(8)
0:682(8)
Download