Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Functions

Evaluating Single-Sampling Plans

You can use the base SAS functions PROBBNML and PROBHYPR to evaluate single-sampling plans. Measures of the performance of single-sampling plans include

Probability of Acceptance

Since Pa is the probability of finding c or fewer defectives in the sample, you can calculate the acceptance probability using the function PROBHYPR(N,D,n,c) for Type A sampling and the function PROBBNML(p,n,c) for Type B sampling.

For example, the following statements calculate Pa for the plan n=20, c=1 when sampling from a single lot of size N=120 that contains D=22 nonconforming items, resulting in a value of 0.0762970752:

   data;
      prob=probhypr(120,22,20,1);
      put prob;
   run;

Similarly, the following statements calculate Pa for the plan n=20, c=1 when sampling from a series of lots for which the proportion of nonconforming items is p=0.18, resulting in a value of 0.1018322793:

   data;
      prob=probbnml(0.18,20,1);
      put prob;
   run;

Other Measures of Performance

The measures ASN, AOQ, and ATI are meaningful only for Type B sampling and can be calculated using the PROBBNML function. For reference, the following equations are provided.

Average sample number: Following the notation of Schilling (1982), let F(c|n) denote the probability of finding c or fewer nonconforming items in a sample of size n. Note that F(c|n) is equivalent to PROBBNML(p,n,c). Then, depending on the mode of inspection, the average sample number can be expressed as shown in the following table:

Mode of Inspection ASN
Fulln
SemicurtailednF(c| n) + \displaystyle \frac{ (c+1)(1-F(c+1| n+1)) }p
Fully curtailed\displaystyle \frac{(n-c)F(c| n+1)}{1-p} +
 \displaystyle \frac{(c+1)(1-F(c+1| n+1))}p

Average outgoing quality can be expressed as

{AOQ}=\frac{p(N-n)F(c| n)}N

if the nonconforming items found are replaced with conforming items, and as
{AOQ}=\frac{p(N-n)F(c| n)}{N-np}

if the nonconforming items found are not replaced.

Average total inspection can be expressed as


{ATI}=n+(1-F(c| n))(N-n)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.