9
Lot acceptance and compliance testing based on the sample mean and minimum/maximum Chunsheng Ma a, , John Robinson b a Department of Mathematics and Statistics, Wichita State University, Wichita, KS 67260-0033, USA b School of Mathematics and Statistics, The University of Sydney, NSW 2006, Australia article info Article history: Received 3 October 2008 Received in revised form 31 January 2011 Accepted 2 February 2011 Available online 15 February 2011 Keywords: Acceptance testing Joint distribution Saddlepoint approximation abstract A dual acceptance criterion in terms of the sample mean and an extremum (minimum or maximum) has been used in many inspection procedures in diverse industries. An approximation is given in Vangel (Technometrics, 2002, pp. 242–248) for the joint distribution of the sample mean and an extremum when the population is normally distributed. In this paper we obtain a simple expression that depends on the distribu- tion of the sample mean and the truncated sample mean. This expression allows us to evaluate the joint distribution exactly, in two cases, or approximately, in more general cases, making the dual acceptance criterion easier to calculate in practice. We present a saddlepoint approximation for the joint tail probability, with the application to the dual acceptance criterion under the assumption of normality. & 2011 Elsevier B.V. All rights reserved. 1. Introduction In order to decide whether a lot should be accepted, an inspection procedure used in industry is to compare a sample mean and minimum (or maximum) to reference values and to formulate a so-called dual acceptance criterion (Croarkin and Yang, 1982). One particular prominent example is the ‘‘Category B’’ sampling plan for checking the net contents of packaged goods (e.g., Brickenkamp et al., 1988; Croarkin and Yang, 1982). Such an inspection procedure is also applied in the aerospace industry, where means and minima of strength samples are employed by some manufacturers to determine if incoming batches of composite materials are acceptable (e.g., Vangel, 2002). Croarkin and Yang (1982) present examples of sampling procedures that specify acceptance criteria involving the sample mean and a proportion of defectives in the sample and, for the case of a normal distribution, Vangel (2002) proposes that we base criteria for lot acceptance on the correlated sample mean and an extremum rather than on the independent normal mean and standard deviation. One purpose of this paper is to derive a simple form for the joint distribution of an extremum and the sample mean, which can be used to calculate the joint distribution exactly or approximately. A representation for the joint distribution of an extremum and the sample mean is given in the Theorem of Section 2, with the proof in Appendix A. In particular, formula (1) shows that it suffices to calculate the distribution of the sample mean and a truncated mean, in order to obtain the joint distribution of the sample mean and minimum. Examples 1 and 2 illustrate the exact calculation for a uniform population and an exponential population, respectively. Saddlepoint methods often provide approximations for densities and probabilities which are very accurate in numerical work and in theoretical calculations (Jensen, 1995; Kolassa, 2006). Section 3 provides an approximation for the joint distribution of the sample mean and minimum, by using the Barndorff-Nielsen (1991) version (cf. Jensen, 1992) or the Lugannani and Rice (1980) formula for the saddlepoint approximation to the distribution function of the truncated mean. This saddlepoint Contents lists available at ScienceDirect journal homepage: www.elsevier.com/locate/jspi Journal of Statistical Planning and Inference 0378-3758/$ - see front matter & 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.jspi.2011.02.003 Corresponding author. E-mail addresses: [email protected] (C. Ma), [email protected] (J. Robinson). Journal of Statistical Planning and Inference 141 (2011) 2440–2448

Lot acceptance and compliance testing based on the sample mean and minimum/maximum

Embed Size (px)

Citation preview

Page 1: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

Contents lists available at ScienceDirect

Journal of Statistical Planning and Inference

Journal of Statistical Planning and Inference 141 (2011) 2440–2448

0378-37

doi:10.1

� Cor

E-m

journal homepage: www.elsevier.com/locate/jspi

Lot acceptance and compliance testing based on the sample meanand minimum/maximum

Chunsheng Ma a,�, John Robinson b

a Department of Mathematics and Statistics, Wichita State University, Wichita, KS 67260-0033, USAb School of Mathematics and Statistics, The University of Sydney, NSW 2006, Australia

a r t i c l e i n f o

Article history:

Received 3 October 2008

Received in revised form

31 January 2011

Accepted 2 February 2011Available online 15 February 2011

Keywords:

Acceptance testing

Joint distribution

Saddlepoint approximation

58/$ - see front matter & 2011 Elsevier B.V. A

016/j.jspi.2011.02.003

responding author.

ail addresses: [email protected] (C. Ma)

a b s t r a c t

A dual acceptance criterion in terms of the sample mean and an extremum (minimum

or maximum) has been used in many inspection procedures in diverse industries. An

approximation is given in Vangel (Technometrics, 2002, pp. 242–248) for the joint

distribution of the sample mean and an extremum when the population is normally

distributed. In this paper we obtain a simple expression that depends on the distribu-

tion of the sample mean and the truncated sample mean. This expression allows us to

evaluate the joint distribution exactly, in two cases, or approximately, in more general

cases, making the dual acceptance criterion easier to calculate in practice. We present a

saddlepoint approximation for the joint tail probability, with the application to the dual

acceptance criterion under the assumption of normality.

& 2011 Elsevier B.V. All rights reserved.

1. Introduction

In order to decide whether a lot should be accepted, an inspection procedure used in industry is to compare a samplemean and minimum (or maximum) to reference values and to formulate a so-called dual acceptance criterion (Croarkinand Yang, 1982). One particular prominent example is the ‘‘Category B’’ sampling plan for checking the net contents ofpackaged goods (e.g., Brickenkamp et al., 1988; Croarkin and Yang, 1982). Such an inspection procedure is also applied inthe aerospace industry, where means and minima of strength samples are employed by some manufacturers to determineif incoming batches of composite materials are acceptable (e.g., Vangel, 2002). Croarkin and Yang (1982) present examplesof sampling procedures that specify acceptance criteria involving the sample mean and a proportion of defectives in thesample and, for the case of a normal distribution, Vangel (2002) proposes that we base criteria for lot acceptance on thecorrelated sample mean and an extremum rather than on the independent normal mean and standard deviation. Onepurpose of this paper is to derive a simple form for the joint distribution of an extremum and the sample mean, which canbe used to calculate the joint distribution exactly or approximately.

A representation for the joint distribution of an extremum and the sample mean is given in the Theorem of Section 2,with the proof in Appendix A. In particular, formula (1) shows that it suffices to calculate the distribution of the samplemean and a truncated mean, in order to obtain the joint distribution of the sample mean and minimum. Examples 1 and 2illustrate the exact calculation for a uniform population and an exponential population, respectively. Saddlepoint methodsoften provide approximations for densities and probabilities which are very accurate in numerical work and in theoreticalcalculations (Jensen, 1995; Kolassa, 2006). Section 3 provides an approximation for the joint distribution of the samplemean and minimum, by using the Barndorff-Nielsen (1991) version (cf. Jensen, 1992) or the Lugannani and Rice (1980)formula for the saddlepoint approximation to the distribution function of the truncated mean. This saddlepoint

ll rights reserved.

, [email protected] (J. Robinson).

Page 2: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–2448 2441

approximation is easier to calculate than that of Vangel (2002) under the assumption of normality since no numericalintegration is required and the two methods should provide similar accuracy when a highly accurate numerical integrationis performed since both would have relative error of order 1/n.

In Section 4 we come back to the mean–extremum dual acceptance criterion giving two examples, one assuming thegamma distribution and the other the normal which gives a comparison to the results of Vangel (2002). The code for thesenormal cases written in the R software (R Development Core Team, 2006) is given in Appendix B.

2. Joint distribution function of the sample mean and an extremum

Consider a univariate population that possesses the cumulative distribution function F(x). Let X1, . . . ,Xn be a simplerandom sample from the population, and denote the sample order statistics by Xð1ÞrXð2Þr � � �rXðnÞ. It is well-known thatthe sample minimum X(1) and maximum X(n) have the distribution functions

FXð1Þ ðxÞ ¼ PðXð1ÞrxÞ ¼ 1�f1�FðxÞgn

and

FXðnÞ ðxÞ ¼ PðXðnÞrxÞ ¼ FnðxÞ, x 2 R,

respectively. In what follows, we assume that F(x) has the density f(x), although our results can be extended to the discrete case.The next theorem presents a simple representation for the joint cumulative distribution function of the sample

minimum X(1) (maximum X(n)) and the sample mean X .

Theorem. Suppose that X1, . . . ,Xn are independent and identically distributed random variables with distribution function FðxÞ

and density function f ðxÞ. Then

(i)

The joint cumulative distribution function of ðXð1Þ,X Þ is

FXð1Þ ,Xðx,yÞ ¼

FX ðyÞ�f1�FðxÞgnP1

n

Xn

j ¼ 1

Uj,xry

0@

1A, if xoy and FðxÞo1,

FX ðyÞ, otherwise,

8>>><>>>:

ð1Þ

where U1,x, . . . ,Un,x are independent and identically distributed random variables with density function

fU1,xðuÞ ¼

f ðuÞ

1�FðxÞ, if uZx and FðxÞo1,

0, otherwise:

8><>: ð2Þ

(ii)

The joint cumulative distribution function of ðXðnÞ,X Þ is

FXðnÞ ,Xðx,yÞ ¼

FnðxÞ, if xry,

FnðxÞP1

n

Xn

j ¼ 1

Vj,xry

0@

1A, if x4y and FðxÞ40,

0, if x4y and FðxÞ ¼ 0,

8>>>>><>>>>>:

ð3Þ

where V1,x, . . . ,Vn,x are independent and identically distributed random variables with density function

fV1,xðvÞ ¼

f ðvÞ

FðxÞ, if vox and FðxÞ40,

0, if vZx:

8><>:

Corollary.

(i)

PðX ryjXð1ÞZxÞ ¼ P

1

n

Xn

j ¼ 1

Uj,xry

0@

1A, for FðxÞo1:

0 1

(ii)

PðX ryjXðnÞrxÞ ¼ P1

n

Xn

j ¼ 1

Vj,xry@ A, for FðxÞ40:

To evaluate FXð1Þ ,Xðx,yÞ, one just needs to calculate the distributions of two sample means, the original one and a

truncated one, based on formula (1). For FXðnÞ ,Xðx,yÞ, it suffices to work on a truncated sample mean. Next we will

concentrate on the distribution of ðXð1Þ,X Þ. Similarly one can deal with the distribution of ðXðnÞ,X Þ.

Page 3: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–24482442

Example 1. Consider independent random variables X1, . . . ,Xn that are uniformly distributed on the interval ½y1,y2� withdensity

f ðxÞ ¼

1

y2�y1, if x 2 ½y1,y2�,

0, otherwise:

8<:

Since F(x)=1 (xZy2), U1,x is well-defined only for xoy2. When y1rxoy2, U1,x is uniformly distributed on ½x,y2� withdensity

fU1,xðuÞ ¼

1

y2�x, if u 2 ½x,y2�,

0, if uox,

8<:

and when xoy1,U1,x has the same distribution as X1. It follows from formula (1) that the joint distribution function ofðXð1Þ,X Þ is

FXð1Þ ,Xðx,yÞ ¼

FX ðyÞ�y2�x

y2�y1

� �n

P1

n

Xn

j ¼ 1

Uj,xry

0@

1A, if xoy and y1rxry2,

0, if xoy and xoy1,

FX ðyÞ, elsewhere,

8>>>>><>>>>>:

whose evaluation is just based on the mean of uniform random variables.

Example 2. Suppose that X1, . . . ,Xn is a simple random sample from an exponential population with density

f ðxÞ ¼lexpf�ðx�yÞlg, if x4y,

0, otherwise,

(

where l is a positive scale parameter and y is a location parameter. Obviously, FðxÞo1 if and only if x4y. For a fixedx4y, (2) becomes

fU1,xðuÞ ¼

le�lðu�xÞ, if uZx,

0, if uox,

(

so that U1,x has the same distribution as X1þx�y. In other words, ðU1,x, . . . ,Un,xÞ and ðX1þx�y, . . . ,Xnþx�yÞ have the samedistribution. Consequently,

P1

n

Xn

j ¼ 1

Uj,xry

0@

1A¼ P

1

n

Xn

j ¼ 1

ðXjþx�yÞry

0@

1A¼ FX ðy�xþyÞ, if yZx4y,

0, otherwise:

(

It follows from formula (1) that the joint distribution function of ðXð1Þ,X Þ is

FXð1Þ ,Xðx,yÞ ¼

FX ðyÞ�expf�nlðx�yÞgFX ðy�xþyÞ, if yoxoy,

FXðyÞ, elsewhere,

(

which can be easily evaluated in terms of the distribution of X that has a gamma distribution with density

fX ðtÞ ¼

ðl=nÞn

GðnÞðt�yÞn�1expf�lðt�yÞ=ng, t4y,

0, otherwise:

8><>:

3. Saddlepoint approximation

In this section we derive the saddlepoint approximation for the joint distribution of ðXð1Þ,X Þ, for which it suffices toobtain the saddlepoint approximation for the distribution of the truncated mean 1=n

Pnj ¼ 1 Uj,x, for FðxÞo1. Similarly, one

can obtain the saddlepoint approximation for the joint distribution of ðXðnÞ,X Þ.Under the assumption FðxÞo1, the cumulative generating function of U1,x is

KxðtÞ ¼ lnfEexpðtU1,xÞg ¼ ln

Z 1x

etu f ðuÞ

1�FðxÞdu,

which is assumed to exist. Its first and second derivatives with respect to t are

K 0xðtÞ ¼

Z 1x

uetu�KxðtÞf ðuÞ

1�FðxÞdu

Page 4: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–2448 2443

and

K 00xðtÞ ¼

Z 1x

u2etu�KxðtÞf ðuÞ

1�FðxÞdu�fK 0xðtÞg

2:

When xoy, denote by tx(y) the solution of the saddlepoint equation K 0xðtÞ ¼ y, and write

LxðyÞ ¼ txðyÞy�KxðtxðyÞÞ:

Then the Barndorff–Nielsen version of the saddlepoint approximation for the distribution function of the truncated mean1=n

Pnj ¼ 1 Uj,x is

P1

n

Xn

j ¼ 1

Uj,xry

0@

1A¼Fð

ffiffiffinp

wyxðyÞÞð1þOðn�1ÞÞ, ð4Þ

where FðxÞ is the standard normal distribution function,

wyxðyÞ ¼wxðyÞþ1

nwxðyÞln

vxðyÞ

wxðyÞ,

wxðyÞ ¼ signðtxðyÞÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi2LxðyÞ

p,

and

vxðyÞ ¼ txðyÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiK 00xðtxðyÞÞ

p:

Alternatively, one could use the approximation of Lugannani and Rice (1980) to the same relative error as this (see, forexample, Theorem 5.1.1 of Jensen, 1995, or Theorem 5.3.1 of Kolassa, 2006).

From (1) and (4) we obtain the saddlepoint approximation for the joint distribution function of ðXð1Þ,X Þ,

FXð1Þ ,Xðx,yÞ ¼

FXðyÞ�f1�FðxÞgnFð

ffiffiffinp

wyxðyÞÞð1þOðn�1ÞÞ, if xoy and FðxÞo1,

FX ðyÞ, otherwise:

(ð5Þ

Of course, one may also employ the saddlepoint approximation of X in (5).Next we give two examples to illustrate the accuracy of saddlepoint approximations, although for the exponential case

the exact calculation for the joint distribution is available.

Example 3. For a gamma population with the density

f ðxÞ ¼lb

GðbÞxb�1expð�lxÞ, x40,

where b and l are positive parameters, the corresponding truncated density (2) is

fU1,xðuÞ ¼

lb

Gðb,lxÞub�1expð�luÞ, u4x40,

0, otherwise,

8><>:

where Gðb,tÞ ¼R1

t ub�1e�u du,tZ0 is the so-called incomplete gamma function. The cumulative generating function of U1,x

exists in the interval ð�1,lÞ and

KxðtÞ ¼ blnl�blnðl�tÞþ lnGðb,ðl�tÞxÞ�lnGðb,lxÞ, tol:

It is easy to check that

K 0xðtÞ ¼b

l�tþðl�tÞb�1xbexpf�ðl�tÞxg

Gðb,ðl�tÞxÞ, tol

and

K 00xðtÞ ¼b

ðl�tÞ2þfðl�tÞx�bþ1gðl�tÞb�2xbexpð�ðl�tÞxÞ

Gðb,ðl�tÞxÞ� K 0xðtÞ�

bl�t

� �2

¼b

ðl�tÞ2þ x�

b�1

l�t

� �K 0xðtÞ�

bl�t

� �� K 0xðtÞ�

bl�t

� �2

, tol:

In the particular case b¼ 1, the gamma distribution reduces to an exponential distribution,

KxðtÞ ¼ txþ lnl�lnðl�tÞ, tol:

For yoxoy, the saddlepoint is txðyÞ ¼ l�ðy�xÞ�1: Thus,

LxðyÞ ¼ txðyÞðxþyÞ�lnl�logðy�xÞ,

Page 5: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

Table 1

Comparison between the saddlepoint approximation (5) and the exact value of FXð1Þ ,Xðx,yÞ for an exponential case (l¼ 1, y¼ 0, n¼ 5).

x y Exact value Saddlepoint approx. Relative error

0.09 0.13 0.000564 0.000564 5.04356�10�4

0.17 0.23 0.006512 0.006511 2.52435�10�4

0.27 3.49 0.740726 0.740726 5.34596�10�4

0.56 0.67 0.246553 0.246391 6.59796�10�4

1.20 2.80 0.995963 0.995958 1.14253�10�3

2.30 3.90 0.999966 0.999965 2.72270�10�3

3.60 4.70 0.999999 0.999999 4.321642�10�3

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–24482444

K00

x ðtxðyÞÞ ¼ ðy�xÞ2,

and

vxðyÞ ¼ txðyÞðy�xÞ ¼ lðy�xÞ�1:

Table 1 compares the exact joint distribution FXð1Þ ,Xðx,yÞ with the saddlepoint approximation (5), when the underlying

distribution is exponential with l¼ 1. The saddlepoint approximation has remarkably small relative error.

Example 4. Assume that X1, . . . ,Xn are independent, standard normal random variables. The distribution function of U1,x is

PðU1,xruÞ ¼

FðuÞ�FðxÞ1�FðxÞ

, uZx,

0, uox,

8<:

with the cumulative generating function

KxðtÞ ¼t2

2þ lnð1�Fðx�tÞÞ�lnð1�FðxÞÞ:

For xoy, the saddlepoint tx(y) satisfies the saddlepoint equation

fðx�txðyÞÞ

1�Fðx�txðyÞÞ¼ y�txðyÞ, ð6Þ

which implies that tx(y) must be less than y. Also

K00

x ðtxðyÞÞ ¼ 1þðx�txðyÞÞfðx�txðyÞÞ

1�Fðx�txðyÞÞ�

fðx�txðyÞÞ

1�Fðx�txðyÞÞ

� �2

¼ 1þfx�txðyÞgfy�txðyÞg�fy�txðyÞg2,

and

LxðyÞ ¼ txðyÞy�txðyÞ

2

2þ lnf1�Fðx�txðyÞÞg�lnf1�FðxÞg

" #¼ txðyÞy�

txðyÞ2

2þ ln

fðx�txðyÞÞ

y�txðyÞ�lnf1�FðxÞg

" #

¼ lnffiffiffiffiffiffi2ppþ

x2

2þðy�xÞtxðyÞþ lnðy�txðyÞÞþ lnf1�FðxÞg:

Table 2 gives a comparison of the saddlepoint approximation of (5) and a Monte Carlo simulation based on 500,000samples of size 5. The relative errors remain small well into the tails of the distribution for the saddlepoint approximation.

Starting from a saddlepoint approximation of the joint density of ðXð1Þ,X Þ and then taking its double integral, Vangel(2002) obtained a saddlepoint approximation for FXð1Þ ,X

ðx,yÞ ðxoyÞ. His formula (1) has a form involving two numericalintegrations and the solution of the saddlepoint equation. The saddlepoint approximation (5) of F

Xð1Þ ,Xðx,yÞ ðxoyÞ has a

somewhat simpler form, and the calculation involves solution of the saddlepoint equation (6) that can be handled usingthe Newton–Raphson method because the saddlepoint equation has a unique solution.

The accuracy of this method is marginally better than that of Vangel (2002). For example, if n=3, x=�2.5, andy=�1.20404, the saddlepoint equation (6) has a solution close to �1.486765. The value of the saddlepoint approxima-tion (5) is 0.005309, while Vangel (2002) reported that a 1,000,000-replicate simulation for FXð1Þ ,X

ð�2:5,�1:20404Þ is0.005421. His saddlepoint approximation is 0.005226. However, the methods are effectively equivalent in this case.

4. An acceptance criterion based on the mean and minimum

In this section we study the acceptance criterion based on the mean and an extremum for a population with mean m,variance s2, and distribution function F(x). The large sample case was investigated by Croarkin and Yang (1982), and thesmall sample case was considered by Vangel (2002) for a normal population.

Page 6: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

Table 2Comparison between a Monte Carlo approximation on 500,000 of F

Xð1Þ ,Xðx,yÞ from a standard normal distribution with the saddlepoint approximation (5)

(n=5).

x y Monte Carlo Saddlepoint approx. Relative error

�4 0 0.000152 0.000142 0.07042

�3 0 0.006508 0.006241 0.04278

�2 0 0.095192 0.094786 0.00429

�2 �1 0.009196 0.008940 0.02866

�1 � .5 0.129116 0.129140 0.00018

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–2448 2445

Following Croarkin and Yang (1982) and Vangel (2002), for a given a 2 ð0,1Þ, we would accept a lot if

Xð1ÞZm�k1s and X Zm�k2s,

or, alternatively, reject a lot if either Xð1Þrm�k1s or X rm�k2s, where the constants k1 and k2 are determined by

PðXð1Þrm�k1s or X rm�k2sÞ ¼ a: ð7Þ

This decision rule is more conservative than a single decision rule based on the sample minimum or the sample mean,because (1) and (7) imply that

PðXð1Þrm�k1sÞra and PðX rm�k2sÞra:

Notice that if k1rk2, (7) reduces to

PðXð1Þrm�k1sÞ ¼ a:

Hence, it seems reasonable here to require k14k2. Since the pair (k1, k2) satisfying (7) forms a contour in the plane, itneeds an additional constraint to determine (k1, k2) uniquely. One such a constraint is

PðXð1Þrm�k1sÞ ¼ PðX rm�k2sÞ ð8Þ

or, equivalently,

1�f1�Fðm�k1sÞgn ¼ FX ðm�k2sÞ:

Eq. (7) is the same as

FXð1Þ ðm�k1sÞþFXðm�k2sÞ�F

Xð1Þ ,Xðm�k1s,m�k2sÞ ¼ a

or, equivalently, according to formula (1),

f1�Fðm�k1sÞgn 1�P1

n

Xn

j ¼ 1

Uj,m�k1srm�k2s

0@

1A

8<:

9=;¼ 1�a: ð9Þ

Solving Eqs. (8) and (9) simultaneously and numerically, one obtains k1 and k2. To get a numerical approximation, we cansubstitute Pð1=n

Pnj ¼ 1 Uj,m�k1srm�k2sÞ in (9) by the saddlepoint approximation (4).

Example 3 (continued). For the exponential case, the dual acceptance rule was extensively studied in Section 5.4 ofCroarkin and Yang (1982), where numerical integration was applied to the acceptance probability (5.4.8). However, thiscan be easily done using formula (1), as we have seen in Section 2.

For a gamma population with parameters b and l, the mean and variance are given by m¼ b=l and s2 ¼ b=l2,

respectively. Recall that X follows a gamma distribution with shape parameter nb and rate parameter nl; that is,

FXðxÞ ¼ 1�Gðnb,nlxÞ, xZ0:

Thus, Eq. (8) becomes

1�Gnðb,b�k1

ffiffiffib

pÞ ¼ 1�Gðnb,nb�k2n

ffiffiffib

or

Gnðb,b�k1

ffiffiffib

pÞ ¼Gðnb,nb�k2n

ffiffiffib

pÞ: ð10Þ

Using the notation of Example 3 and substituting the saddlepoint approximation (4) in (9), we obtain

Gnðb,b�k1

ffiffiffib

pÞ 1�F

ffiffiffinp

wybl�1

�k1

ffiffiffibp

l�1

bl�

ffiffiffib

pk2

l

! !ð1þOðn�1ÞÞ

( )¼ 1�a: ð11Þ

Page 7: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–24482446

In the particular case where b¼ 1, Eqs. (10) and (11) are

expf�ð1�k1Þng ¼Gðn,n�k2nÞ,

expf�ð1�k1ÞngGðn,ðk1�k2ÞnÞ ¼ 1�a,

(

which do not depend on the parameter l. More generally, it can be seen that neither Eq. (10) nor (11) depend on the

parameter l.

For a given a 2 ð0,1Þ, approximations for the constants k1 and k2 can be obtained numerically by solving Eqs. (10)

and (11) simultaneously.

Example 5. Consider a normal population with mean m, variance s2, and distribution function FðxÞ ¼Fðx�m=sÞ. It followsfrom Eq. (8) that

1�f1�Fð�k1Þgn ¼Fð�

ffiffiffinp

k2Þ,

and thus

k2 ¼�n�1=2F�1½1�f1�Fð�k1Þg

n�:

Eq. (9) becomes

f1�Fð�k1Þgn 1�P

1

n

Xn

j ¼ 1

Uj,�k1r�n�1=2F�1

½1�f1�Fð�k1Þgn�

0@

1A

8<:

9=;¼ 1�a, ð12Þ

where U1,x, . . . ,Un,x are independent and identically distributed random variables with a truncated normal distributiondefined in Example 4. Clearly, Eq. (12) does not involve the parameter m or s2. To find k1 from (12), we use the saddlepointapproximation (4) for the truncated normal mean as described in Example 4, and obtain

f1�Fð�k1Þgnf1�Fð

ffiffiffinp

wyxð�n�1=2F�1½1�f1�Fð�k1Þg

n�ÞÞð1þOðn�1ÞÞg ¼ 1�a:

The calculations here are simpler than those of Vangel (2002). Table 3 lists the critical value of (k1, k2) for a given samplesize n and an a 2 ð0,1Þ. These can be compared to Tables 1 and 2 of Vangel (2002) showing similar results. Appendix Bcontains R code for solving k1 and k2 once n and a are given, which can be simply performed using the statistical softwareS-Plus or R, thus avoiding the use of tables.

Table 3

Values (k1, k2) for lot acceptance based on X(1) and X (described in Example 4).

n a

0.10 0.05 0.025 0.01 0.005

2 1.81645, 1.05365 2.13767, 1.30696 2.41985, 1.52588 2.75170, 1.77971 2.97976, 1.95221

3 2.02317, 0.88244 2.32272, 1.08599 2.58795, 1.26201 2.90222, 1.46629 3.11956, 1.60528

4 2.15522, 0.77384 2.44134, 0.94829 2.69616, 1.09927 2.99958, 1.27468 3.21032, 1.39416

5 2.25149, 0.69750 2.52829, 0.85237 2.77570, 0.98651 3.07149, 1.14251 3.27758, 1.24886

6 2.32683, 0.64011 2.59654, 0.78068 2.83837, 0.90254 3.12838, 1.04436 3.33095, 1.14112

7 2.38849, 0.59496 2.65256, 0.72451 2.88997, 0.83689 3.17537, 0.96778 3.37513, 1.05714

8 2.44053, 0.55823 2.69997, 0.67896 2.93374, 0.78376 3.21533, 0.90589 3.41278, 0.98932

9 2.48546, 0.52759 2.74100, 0.64106 2.97169, 0.73961 3.25008, 0.85453 3.44556, 0.93306

10 2.52493, 0.50152 2.77712, 0.60888 3.00515, 0.70217 3.28077, 0.81101 3.47456, 0.88542

11 2.56008, 0.47899 2.80934, 0.58112 3.03505, 0.66990 3.30825, 0.77353 3.50055, 0.84440

12 2.59173, 0.45925 2.83839, 0.55684 3.06206, 0.64171 3.33311, 0.74080 3.52408, 0.80860

13 2.62049, 0.44179 2.86484, 0.53538 3.08667, 0.61680 3.35579, 0.71191 3.54557, 0.77699

14 2.64683, 0.42618 2.88909, 0.51623 3.10926, 0.59459 3.37663, 0.68615 3.56534, 0.74882

15 2.67111, 0.41213 2.91147, 0.49899 3.13013, 0.57461 3.39591, 0.66300 3.58364, 0.72351

16 2.69362, 0.39939 2.93224, 0.48338 3.14951, 0.55653 3.41384, 0.64204 3.60067, 0.70060

17 2.71459, 0.38777 2.95161, 0.46915 3.16761, 0.54005 3.43059, 0.62295 3.61659, 0.67974

18 2.73421, 0.37711 2.96975, 0.45612 3.18457, 0.52495 3.44630, 0.605473 3.63153, 0.66064

19 2.75263, 0.36729 2.98680, 0.44411 3.20052, 0.51106 3.46109, 0.58939 3.64560, 0.64306

20 2.77000, 0.35820 3.00288, 0.43300 3.21558, 0.49821 3.47507, 0.57452 3.65890, 0.62681

30 2.90358, 0.29364 3.12702, 0.35431 3.33213, 0.40729 3.58355, 0.46938 3.76233, 0.51198

40 2.99475, 0.25487 3.21215, 0.30720 3.41239, 0.35295 3.65856, 0.40662 3.83405, 0.44347

50 3.06363, 0.22830 3.27668, 0.27498 3.47338, 0.31582 3.71573, 0.36376 3.88879, 0.39669

Page 8: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–2448 2447

Acknowledgments

Ma’s research was partly supported by US Department of Energy under Grant DE-SC0005359 and partly by the KansasNSF EPSCoR under Grant EPS0903806, and Robinson’s research was partly supported by a Discovery Grant (DP0453173)from the Australian Research Council.

Appendix A. Proof of the theorem

(i) Expressing the event fXð1Þrx,X ryg as the difference of the event fX ryg and the event fXð1Þ4x,X ryg, we obtain

FXð1Þ ,Xðx,yÞ ¼ PðXð1Þrx,X ryÞ ¼ PðX ryÞ�PðXð1Þ4x,X ryÞ ¼ FX ðyÞ�PðXð1Þ4x,X ryÞ:

Notice that X(1) is not more than X . Hence, when xZy, PðXð1Þ4x,X ryÞ ¼ 0, and thus

FXð1Þ ,Xðx,yÞ ¼ FX ðyÞ:

When xoy and F(x)=1, we have

PðXð1Þ4x,X ryÞrPðXð1Þ4xÞ ¼ f1�FðxÞgn ¼ 0

and

FXð1Þ ,Xðx,yÞ ¼ FX ðyÞ:

When xoy and FðxÞo1, we will show that

PðXð1Þ4x,X ryÞ ¼ f1�FðxÞgnP1

n

Xn

j ¼ 1

Uj,xry

0@

1A, ðA:1Þ

so that (1) follows. This is true, since the left-hand side of (A.1) is

PðXð1Þ4x,X ryÞ ¼ PðX14x, . . . ,Xn4x,X1þ � � � þXnrnyÞ ¼

Zu1 4x,...,un 4x,u1þ���þun rny

f ðu1Þ � � � f ðunÞ du1 � � � dun,

and the right-hand side of (A.1) is

f1�FðxÞgnP1

n

Xn

j ¼ 1

Uj,xry

0@

1A¼ f1�FðxÞgn

Zu1þ���þun rny

fU1,xðu1Þ � � � fUn,x

ðunÞ du1 � � � dun

¼ f1�FðxÞgnZ

u1 4x,...,un 4x,u1þ���þun rny

f ðu1Þ

1�FðxÞ� � �

f ðunÞ

1�FðxÞdu1 � � � dun

¼

Zu1 4x,...,un 4x,u1þ���þun rny

f ðu1Þ � � � f ðunÞdu1 � � � dun:

(ii) Since XðnÞ is always larger than X , when xry, the event fXðnÞrx,X ryg is the same as the event fXðnÞrxg, and thus

PðXðnÞrx,X ryÞ ¼ PðXðnÞrxÞ ¼ FnðxÞ:

When x4y and FðxÞ40,

PðXðnÞrx,X ryÞ ¼

Zv1 rx,...,vn rx,v1þ���þvn rny

f ðv1Þ � � � f ðvnÞ dv1 � � �dvn

¼ FnðxÞ

Zv1 rx,...,vn rx,v1þ���þvn rny

f ðv1Þ

FðxÞ� � �

f ðvnÞ

FðxÞdv1 � � � dvn

¼ FnðxÞ

Zv1þ���þvn rny

fV1,xðv1Þ � � � fVn,x

ðvnÞdv1 � � �dvn ¼ FnðxÞP1

n

Xn

j ¼ 1

Vj,xry

0@

1A:

When x4y and FðxÞ ¼ 0,

PðXðnÞrx,X ryÞrPðXðnÞrxÞ ¼ FnðxÞ ¼ 0:

Appendix B. R functions for the normal case

The following R code can be used to calculate the saddlepoint approximation of the joint distribution FXð1Þ ,Xðx,yÞ for the

normal case, as demonstrated in Example 4.

Q=function(n,x,y){

K=function(x,t){t^2/2+log(1�pnorm(x�t))�log(1�pnorm(x))};

Kp=function(x,t){t+dnorm(x�t)/(1�pnorm(x�t))};

Page 9: Lot acceptance and compliance testing based on the sample mean and minimum/maximum

C. Ma, J. Robinson / Journal of Statistical Planning and Inference 141 (2011) 2440–24482448

Kpp=function(x,t){

1+(x�t)ndnorm(x�t)/(1�pnorm(x�t))�(dnorm(x�t)/(1�pnorm(x�t)))^2};

txy=function(x,y){t=y;for(i in 1:20)t=t+(y�Kp(x,t))/Kpp(x,t);t};

Lxy=txy(x,y)ny�K(x,txy(x,y))

wxy=sqrt(2nLxy)

psi=wxynsign(txy(x,y))/(txy(x,y)nsqrt(Kpp(x,txy(x,y))))

wdag=wxy�log(psi)/(nnwxy)

sptp=pnorm(ynsqrt(n))�(1�pnorm(x))^nnpnorm(sqrt(n)nwdagnsign(txy(x,y)))

qxy=2n(1�(1�pnorm(x))^n)�sptp

qxy}

The next R code inverts Q to get k1, k2 as a function of a for given n, as described in Example 4.

k12=function(n,a){

xx=function(n,y){qnorm(1�(1�pnorm(sqrt(n)ny))^(1/n))}

q=function(n,y){Q(n,xx(n,y),y)}

y=�.01

for (i in 1:20){

y=y+(a�q(n,y))/((q(n,y+.000001)�q(n,y�.000001))/.000002)}

list(alpha=Q(n,xx(n,y),y),k1=�xx(n,y),k2=�y)}

References

Barndorff-Nielsen, O.E., 1991. Modified signed log likelihood ratio. Biometrika 78, 557–563.Brickenkamp, C.E., Hasko, S., Natrella, M.G., 1988. Checking the Net Contents of Packaged Good, third ed. In: NBS Handbook 133. National Bureau of

Standards, Gaithersburg, MD.Croarkin, M.C., Yang, G.L., 1982. Acceptance probabilities for a sampling procedure based on the mean and an order statistic. Journal of Research, National

Bureau of Standards 87, 485–511.Jensen, J.L., 1992. The modified signed likelihood statistic and saddlepoint approximations. Biometrika 79, 693–703.Jensen, J.L., 1995. Saddlepoint approximations. In: Oxford Statistical Science Series, vol. 16. Oxford University Press.Kolassa, J.E., 2006. Series approximation methods in statistics, third ed. In: Lecture Notes in Statistics, vol. 88. Springer, New York.Lugannani, R., Rice, S., 1980. Saddle point approximation for the distribution of the sum of independent random variables. Advances in Applied

Probability 12, 475–490.R Development Core Team, 2006. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN

3-900051-07-0, URL /http://www.R-project.orgS.Vangel, M.G., 2002. Lot acceptance and compliance testing using the sample mean and an extremum. Technometrics 44, 242–249.