Functions


PROBACC2 Function

Subsections:

computes the acceptance probability for a double-sampling plan.

Syntax

PROBACC2$(a_1,r_1,a_2,n_1,n_2,D,N)$

PROBACC2$(a_1,r_1,a_2,n_1,n_2,p)$

where

$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} > 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$.

D

is the number of nonconforming items in the lot, where $0\leq D\leq N$.

N

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

p

is the proportion of nonconforming items produced by the process, where 0 < p < 1.

Description

The PROBACC2 function returns the acceptance probability for a double-sampling plan of Type A if you specify the parameters D and N, and it returns the acceptance probability for a double-sampling plan of Type B if you specify the parameter p. For details on Type A and Type B double-sampling plans, see Types of Sampling Plans.

For either type of sampling plan, the acceptance probability is calculated as

\[ P_{a_1} + P_{a_2} \]

where

\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*}

These probabilities are determined from either the hypergeometric distribution (Type A sampling) or the binomial distribution (Type B sampling).

Examples

The first set of statements results in a value of 0.2396723824. The second set of statements results in a value of 0.0921738126.

data;
   prob=probacc2(1,4,3,50,100,10,200);
   put prob;
run;

data;
   prob=probacc2(0,2,1,13,13,0.18);
   put prob;
run;