ATI2 Function

computes the average total inspection for a double-sampling plan.

Syntax

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

where

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 ATI2 function returns the average total inspection for a Type B double-sampling plan. For details on Type B double-sampling plans, see Types of Sampling Plans.

The average total inspection is

\[ \mbox{ATI}=n_1P_{a_1}+(n_1+n_2)P_{a_2}+N(1-P_{a_1}-P_{a_2})  \]

where

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

and

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

Examples

The following statements result in a value of 110.35046381:

data;
   ati=ati2(120,0,2,1,13,13,0.18);
   put ati;
run;