Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Functions

ASN2 Function

computes the average sample number for a double-sampling plan.

Syntax

ASN2(mode,a1,r1,a2,n1,n2,p)

where

modeidentifies whether sampling is under full inspection (mode is 'FULL') or semicurtailed inspection (mode is 'SEMI').
a1is the acceptance number for the first sample, where a_{1}\geq0.
r1is the rejection number for the first sample, where r1>a1+1.
a2is the acceptance number for the second sample, where a_{2}\geq a_{1}.
n1is the size of the first sample, where n_{1}\geq1.
n2is the size of the second sample, where n_{2}\geq1.
pis the proportion of nonconforming items produced by the process, where 0<p<1.

Description

The ASN2 function returns the average sample number for a Type B double-sampling plan under full inspection (mode is 'FULL') or semicurtailed inspection (mode is 'SEMI'). For details on Type B double-sampling plans, see "Types of Sampling Plans".

For full inspection, the average sample number is

{ASN}=n_{1}+n_{2}[F(r_{1}-1| n_{1})-
 F(a_{1}| n_{1})]

and for semicurtailed inspection, the average sample number is

{ASN}=n_{1}+ \sum_{d=a_{1}+1}^{r_{1}-1} f(d| n_{1})
 ( n_{2}F(a_{2}-d| n_{2}) + \frac{r_{2}-d}p
[1- F(r_{2}-d| n_{2}+1)] )

where

f(d| n) &= & (\stackrel{n}{_d})p^d(1-p)^{n-d} \ &= & {binomial probability that ...
 ...lity that the number of nonconforming
 items is less} \ & & {than or equal to a}

Examples

The first set of statements results in a value of 15.811418112. The second set of statements results in a value of 14.110408695.

   data;
      asn=asn2('full',0,2,1,13,13,0.18);
      put asn;
   run;


   data;
      asn=asn2('semi',0,2,1,13,13,0.18);
      put asn;
   run;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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