Last data update: 2014.03.03

R: LTPD and AOQL single sampling plans for inspection by...
LTPDvar-packageR Documentation

LTPD and AOQL single sampling plans for inspection by variables

Description

Calculation and evaluation of LTPD and AOQL plans for sampling inspection by variables when the remainder of rejected lots is inspected by attributes which minimize mean inspection cost per lot of process average quality

Introduction

Assume that measurements of a single quality characteristic X are independent, identically distributed normal random variables with parameters μ and σ^2. For the quality characteristic X either an upper specification limit U is given (the item is defective (non-conforming) if its measurement exceeds U), or a lower specification limit L is given (the item is defective if its measurement is smaller than L). It is further assumed that the unknown parameter σ is estimated using the sample standard deviation s.

The inspection procedure is as follows:

Draw a random sample of n items and compute ar{x} and s.

Accept the lot if

{{U - ar{x}} over s } ≥ k

or

{{ar{x} - L}over s} ≥ k.

The operating characteristic (see OC) is

L(p;n,k) = int_{k√ n}^∞ g(t;n-1,u_{1-p}√ n) ,dt,

where g(t;n-1,u_{1-p}√ n) is probability density function of non-central t distribution with (n-1) degrees of freedom and noncentrality parameter λ=u_{1-p}√ n.

If case that we do not use exact formula for OC and we use the normal distribution as an approximation of the non-central t distribution instead, we have

L(p;n,k) = Φ ≤ft({u_{1-p}-k over A} ight),

where

A = √{{1 over n} + {k^2 over 2(n-1)}} .

The function Φ is a standard normal distribution function and u_{1-p} is a quantile of order 1-p.

The task to be solved is determination of the sample size n and the critical value k.

LTPD plans for acceptance sampling inspection by variables

In case of acceptance sampling by attributes (each inspected item is classified as either good or defective), there exist a procedure (Dodge and Romig, 1998) for finding sampling plans which minimize the mean number of items inspected per lot of process average quality

I_s = N - (N-n)cdot L(ar{p};n,c)

under the condition which protects the consumer against the acceptance of a bad lot – the probability of accepting a submitted lot of tolerance quality p_t (consumer's risk) shall be 0.10,

L(p_t;n,c) = 0.10

(LTPD single sampling plans), where the given parameters are N, ar{p}, p_t. N is the number of items in the lot, ar{p} is the process average fraction defective, p_t is the lot tolerance fraction defective (P_t=100p_t is the lot tolerance per cent defective – denoted LTPD), n is the number of items in the sample (n<N), c is the acceptance number (the lot is rejected when the number of defective items in the sample is greater than c), L(p) is the operating characteristic (the probability of accepting a submitted lot with fraction defective p).

LTPD plans for inspection by variables and attributes have been introduced in (Klufa, 1994). Under the same protection of consumer, LTPD plan for inspection by variables and attributes is in many situations more economical with respect to inspection cost than the corresponding Dodge-Romig LTPD attribute sampling plan.

For LTPD plans for inspection by variables and attributes (all items from the sample are inspected by variables, but the remainder of rejected lots is inspected only by attributes), new parameter c_m is introduced, as the cost of inspection of one item by variables divided by the cost of inspection of one item by attributes (usually is c_m > 1). Then the mean inspection cost per lot of process average quality is I_{ms}*c_a, where c_a is the cost of inspection of one item by attributes and

I_{ms} = ncdot c_m + (N-n)cdot [1 - L(ar{p};n,k)].

(see Ims). So we search for the acceptance plan (n,k) minimizing the mean inspection cost per lot of process average quality (or equivalently minimizing I_{ms}) under the condition L(p_t;n,k) = 0.10.

Then I_{ms} may be expressed as a function of one variable n

I_{ms}(n)=ncdot c_m+(N-n)cdot α(n),

where α(n) is the producer's risk (the probability of rejecting a lot of process average quality).

Function planLTPD searches for the sample size n minimizing I_{ms}(n) and gives plan with resulting n and corresponding k as output. In planLTPD if method="napprox", approximate OC is used and the solution is obtained using procedure described in (Klufa, 1994). If method="exact" (default), the optimization procedure searches for n in interval with centre at n resulting from planLTPD(..., method = "napprox").

AOQL plans for acceptance sampling inspection by variables

Under the assumption that each inspected item is classified as either good or defective (acceptance sampling by attributes) Dodge and Romig (1998) introduced sampling plans (n, c) which minimize the mean number of items inspected per lot of process average quality, assuming that the remainder of rejected lots is inspected

I_s = N - (N-n)!cdot!L(ar p;n,c)

under the condition

max_{0<p<1} AOQ(p) = p_L,

where p_L is the average outgoing quality limit (the given parameter) and AOQ is the average outgoing quality, i. e. the mean fraction defective after inspection (assuming that each defective item found is replaced by good one) when the fraction defective before inspection was p. Sampling plans for inspection by variables, which in comparison with sampling plans for inspection by attributes in many situations bring considerable savings in inspection cost, were then introduced in (Klufa, 1997). Function planAOQL searches for plan minimizing I_{ms}(n) under the condition that AOQ does not exceed the given value p_L. In planAOQL if method="napprox", approximate OC is used and the solution is obtained using procedure described in (Klufa, 1997). If method="exact" (default), the optimization procedure searches for n in interval with centre at n resulting from planAOQL(..., method = "napprox").

Rectifying LTPD and AOQL plans minimizing I_{ms} based on EWMA statistics

Another option is to use a procedure based on EWMA statistic. The procedure is as follows: draw a random sample of n items from the lot and compute the sample mean ar{x} and the statistic T at time t as T_t=λ ar{x}+(1-λ)T_{t-1}, where λ is a smoothing constant (usually between 0 and 1). Accept the lot if

frac{U-T_t}{σ} ≥ k

or

frac{T_t-L}{σ} ≥ k.

The operating characteristic is (see e.g. (Aslam et al., 2015)) L(p,n,k)=Φ((u_{1-p}-k)A), where A=√{frac{n(2-λ)}{λ}}, where the function Φ is a standard normal distribution function and u_{1-p} is a quantile of order 1-p (the unique root of the equation Φ(u)=1-p). Similarly for the unknown σ case, when the sample standard deviation is used in place of σ - the operating characteristic is then (see e.g. Aslam et al., 2015)

L(p)=Φ(u_{1-p}c_4-k)√{frac{1}{frac{λ}{ n(2-λ)}+k^2(1-{c_4}^2) }},

where c_4=√{(2/(n-1))}frac{Γ(n/2)}{Γ((n-1)/2)}.

Author(s)

Nikola Kasprikova

Maintainer: Nikola Kasprikova <data@tulipany.cz>

References

Aslam, M., Azam, M., and Jun, C.: A new lot inspection procedure based on exponentially weighted moving average. International Journal of Systems Science 46, 1392 - 1400, 2015.

Dodge, H. F. - Romig, H. G.: Sampling Inspection Tables: Single and Double Sampling. John Wiley, 1998.

Klufa, J.: Acceptance Sampling by Variables when the Remainder of Rejected Lots is Inspected. Statistical Papers, Vol.35, 337 - 349, 1994.

Klufa, J.: Exact calculation of the Dodge-Romig LTPD single sampling plans for inspection by variables. Statistical Papers, Vol. 51(2), 297-305, 2010.

Klufa J,: Dodge-Romig AOQL single sampling plans for inspection by variables. Statistical Papers 38: 111 - 119, 1997.

See Also

planLTPD, planAOQL, OC, AOQ, Ims

Examples

# calculation of LTPD plan
zz=planLTPD(N=1000,pt=0.1,pbar=0.001);zz
plot(zz);
# create another plan
zz2=new("ACSPlan", n=16, k=2.71)
plot(zz2,xl=0.001, xu=0.15, xlabm="fraction non-conforming",
ylabm="probability of acceptance",typem="l",typeOC="exact")
plot(new("ACSPlan", n=20, k=2.58555),typeOC="ewmaSK",lam=0.95)
# calculation of AOQL plan
planAOQL(N=1000,pbar=0.005,pL=0.01, method="napprox", cm=1.5)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LTPDvar)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LTPDvar/LTPDvar-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LTPDvar-package
> ### Title: LTPD and AOQL single sampling plans for inspection by variables
> ### Aliases: LTPDvar-package LTPDvar
> ### Keywords: package
> 
> ### ** Examples
> # calculation of LTPD plan
> zz=planLTPD(N=1000,pt=0.1,pbar=0.001);zz
Warning message:
In pt(q = k * n^0.5, df = n - 1, ncp = qnorm(1 - p) * n^0.5) :
  full precision may not have been achieved in 'pnt{final}'
An object of class "ACSPlan"
Slot "n":
[1] 16

Slot "k":
[1] 1.841766

> plot(zz);
> # create another plan
> zz2=new("ACSPlan", n=16, k=2.71)
> plot(zz2,xl=0.001, xu=0.15, xlabm="fraction non-conforming",
+ ylabm="probability of acceptance",typem="l",typeOC="exact")
> plot(new("ACSPlan", n=20, k=2.58555),typeOC="ewmaSK",lam=0.95)
> # calculation of AOQL plan
> planAOQL(N=1000,pbar=0.005,pL=0.01, method="napprox", cm=1.5)
An object of class "ACSPlan"
Slot "n":
[1] 40

Slot "k":
[1] 2.041367

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>