Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Functions

AOQ2 Function

computes average outgoing quality for a double-sampling plan.

Syntax

AOQ2(replacement,N,a1,r1,a2,n1,n2,p)

where

replacementhas the value 'REP' or 'NOREP', respectively, depending on whether nonconforming items are replaced with conforming items.
Nis the lot size, where N\geq2.
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 and n_{1}+n_{2}\leq N.
n2is the size of the second sample, where n_{2}\geq1 and n_{1}+n_{2}\leq N.
pis the proportion of nonconforming items produced by the process, where 0<p<1.

Description

The AOQ2 function returns the average outgoing quality for a Type B double-sampling plan in which nonconforming items are replaced with conforming items (replacement is 'REP') or not replaced (replacement is 'NOREP'). For details on Type B double-sampling plans, see "Types of Sampling Plans".

For replacement, the average outgoing quality is

AOQ = [(pPa1(N-n1) + pPa2(N-n1-n2) )/N]

and for no replacement, the average outgoing quality is

AOQ = [( pPa1(N-n1) )/(N-n1p )] + [( pPa2(N-n1-n2) )/(N-n1p-n2p )]

where, in both situations,

P_{a_{1}} & = & \sum_{d=0}^{a_{1}} f(d| n) \ & = & {probability of acceptance fo...
 ...d| n_{1})F(a_{2}-d| n_{2}) \ & = & {probability of acceptance for second sample}

and

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 0.0148099904. The second set of statements results in a value of 0.0144743043.

   data;
      aoq=aoq2('norep',120,0,2,1,13,13,0.18);
      put aoq;
   run;


   data;
      aoq=aoq2('rep',120,0,2,1,13,13,0.18);
      put aoq;
   run;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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