Functions


AOQ2 Function

Subsections:

computes average outgoing quality for a double-sampling plan.

Syntax

AOQ2(replacement,$N,a_{1},r_{1},a_{2},n_{1},n_{2},p$)

where

replacement

has the value 'REP' or 'NOREP', respectively, depending on whether nonconforming items are replaced with conforming items.

N

is the lot size, where $N\geq 2$.

$a_{1}$

is the acceptance number for the first sample, where $a_{1}\geq 0$.

$r_{1}$

is the rejection number for the first sample, where $r_{1}>a_{1}+1$.

$a_{2}$

is the acceptance number for the second sample, where $a_{2}\geq a_{1}$.

$n_{1}$

is the size of the first sample, where $n_{1}\geq 1$ and $n_{1}+n_{2}\leq N$.

$n_{2}$

is the size of the second sample, where $n_{2}\geq 1$ and $n_{1}+n_{2}\leq N$.

p

is 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

\[  \mr{AOQ}=\frac{pP_{a_{1}}(N-n_{1}) + pP_{a_{2}}(N-n_{1}-n_{2}) }{N}  \]

and for no replacement, the average outgoing quality is

\[  \mr{AOQ}=\frac{ pP_{a_{1}}(N-n_{1}) }{N-n_{1}p } + \frac{ pP_{a_{2}}(N-n_{1}-n_{2}) }{N-n_{1}p-n_{2}p }  \]

where, in both situations,

\begin{eqnarray*}  P_{a_{1}} &  = &  \sum _{d=0}^{a_{1}} f(d|n) \\ &  = &  \mbox{probability of acceptance for first sample} \\ P_{a_{2}} &  = &  \sum _{d=a_{1}+1}^{r_{1}-1} f(d|n_{1})F(a_{2}-d|n_{2}) \\ &  = &  \mbox{probability of acceptance for second sample} \end{eqnarray*}

and

\begin{eqnarray*}  f(d|n) & = &  (\stackrel{n}{_ d})p^{d}(1-p)^{n-d} \\ & = &  \mbox{binomial probability that the number of nonconforming items }\\ & &  \mbox{in a sample of size }n\mbox{ is exactly } d \\ F(a|n) & = &  \sum _{d=0}^{a}f(d|n) \\ & = &  \mbox{probability that the number of nonconforming items is less} \\ & &  \mbox{than or equal to } a \end{eqnarray*}

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;