New Models of Acceptance Sampling Plans

Acceptance sampling is a procedure used for sentencing incoming batches. Sampling plan consist of a sample size and a decision making rule. The sample size is the number of items to sample or the number of measurements to take. The decision making rule involves the acceptance threshold and a description of how to use the sample result to accept or reject the lot. Acceptance sampling plans are also practical tools for quality control applications, which involve quality contracting on product orders between the vendor and the buyer. Those sampling plans provide the vendor and the buyer rules for lot sentencing while meeting their preset requirements on product quality. Scientific sampling plans are the primary tools for quality and performance management in industry today. In an industrial plant, sampling plans are used to decide either to accept or reject a received batch of items. With attribute sampling plans, these accept/reject decisions are based on a count of the number of defec‐ tive items. The sample size is assumed constant in traditional sampling plans.


Introduction
Acceptance sampling is a procedure used for sentencing incoming batches. Sampling plan consist of a sample size and a decision making rule. The sample size is the number of items to sample or the number of measurements to take. The decision making rule involves the acceptance threshold and a description of how to use the sample result to accept or reject the lot. Acceptance sampling plans are also practical tools for quality control applications, which involve quality contracting on product orders between the vendor and the buyer. Those sampling plans provide the vendor and the buyer rules for lot sentencing while meeting their preset requirements on product quality. Scientific sampling plans are the primary tools for quality and performance management in industry today. In an industrial plant, sampling plans are used to decide either to accept or reject a received batch of items. With attribute sampling plans, these accept/reject decisions are based on a count of the number of defective items. The sample size is assumed constant in traditional sampling plans.
In this section, several new decision making policies for the acceptance sampling problem are introduced. The objective of these models is to find constant control thresholds for lot sentencing problem.
The single stage acceptance sampling plan based on the control threshold policy is presented in section 2, the acceptance sampling policy based on number of successive conforming items is presented in section 3, and acceptance sampling policy using the minimum angle method is presented in sections 4. Acceptance sampling policy based on cumulative sum of conforming Items run lengths comes in section 5 and acceptance sampling policy based on Bayesian inference comes in section 6. Finally the chapter is concluded in section 7.

Single Stage Acceptance Sampling Plan based on the Control Threshold Policy [1]
We suppose a batch of size n is received which its proportion of the defectives items is equal to p. For a batch of sizen, random variable Y is defined as the number of inspected items and z is defined as the number of items classified as 'defective' after inspection. The number of inspected items has an upper threshold equal tom. For Y = 1, 2, ..., m inspected items (m ≤ n) the batch will be rejected if x ≤ zwhere x is the upper control level for batch acceptance. In the other words, when the number of defective items in the inspected items gets more than the control threshold x then decision making process stops and the batch is rejected.
The probability distribution function of Y is determined by the following equations, In Eq. (1), Y = mindicates that all items are inspected therefore, the number of defective items has been less than xor x th defective item has been m th inspected item. For the casex ≤ Y m, x th defective item has been Y th inspected item thus, the probability distribution function of Y follows a negative binomial distribution. The expected mean of the number of inspected items is determined as follows: m is a negative binomial distribution thus using the approximation method of estimating negative binomial probabilities with Poisson distribution [2], following is concluded, where λ = x 1 − p p is the parameter of Poisson distribution. In order to improve the accuracy of this approximation, mand xshould be sufficiently large numbers. Using the above approximation method, following is concluded, Now, let P x denotes the probability of rejecting the batch. The batch is rejected if the number of defective items is more than or equal to x thus the value of P x is determined by the following equation, In order to calculate the total cost, including the cost of rejecting the batch, the cost of inspection and the cost of defective items, assume R is the cost of rejecting the batch, cis the inspection cost of one item and c ' is the cost of one defective item, so the total cost, C x , is determined by conditioning C x on two events of rejecting or accepting the batch, thus the objective function is written as follows: Reject the batch Reject the batch Accept the batch Accept the batch Thus we have, In Eq. (7), cE Y x is the total cost of inspection and npc ' is the total cost of defective items.
The optimal value of xis determined by minimizing the value of objective functionC x . Using the optimization methods, it is concluded that, To evaluate above equation, following equality is considered, Since m is a sufficiently large number thus the value of m is approximately equal to zero therefore it is concluded that, To ensure that x minimizes the objective function (7), it is necessary to find the value of x that satisfies following inequalities: Hence, Since with increasing the value of x the value of binomial distribution with parameters m and p decreases thus according to the properties of binomial distribution, it is concluded that x > (m + 1)p therefore, the optimal value of xis determined using the following formula, Also The objective function, C x , should be minimized regarding two constraints on Type-I and Type-II errors associated with the acceptance sampling plans. Type-I error is the probability of rejecting the batch when the nonconformity proportion of the batch is acceptable.
Type-II error is the probability of accepting the batch when the nonconforming proportion of the batch is not acceptable. Then, in one hand, if p = δ 1 , the probability of rejecting the batch should be less thanα. On the other hand, in case wherep = δ 2 , the probability of accepting the batch should be less thanβ where δ 1 is the AQL (Accepted Quality Level ) and δ 2 is the LQL (Limiting Quality Level) andα is the probability of Type-I error and β is the probability of Type-II error in making a decision, therefore, the optimal value of xis determined using the following formula, 1 ; 16) is positive for all values of xsox = 0. In this case, if one defective item is found in an inspected sample then the batch would be rejected. In this case, the rejection cost R is less than the total cost of inspecting m items and the cost of defective items, hence rejecting the batch would be the optimal decision. However, in practice the rejection cost R is usually big enough so that, we overlooked that case.

Acceptance Sampling Policy Based on Number of Successive Conforming Items [3]
In a typical acceptance-sampling plan, when the number of conforming items between successive nonconforming items is more than an upper control threshold, the batch is accepted, and when it is less than a lower control threshold, the batch is rejected otherwise, the inspection process continues. This initiates the idea of employing a Markovian approach to model the acceptance-sampling problem. As a result, in this method, a new acceptance-sampling policy using Markovian models is proposed, in which determining the control thresholds are aimed. The notations required to model the problem at hand are given as: Consider an incoming batch of N items with a proportion of nonconformities p, of which items are randomly selected for inspection and based on the number of conforming items between two successive nonconforming items, the batch is accepted, rejected, or the inspection continues. The expected total cost associated with this inspection policy can be expressed using Eq. (17).
Let Y i be the number of conforming items between the successive (i − 1) th and i th nonconforming items, U the upper and L the lower control thresholds.
items continues. The states involved in this process can be defined as follows.
State 1: Y i falls within two control thresholds L, i.e.,L < Y i < U , thus the inspection process continues.
State 2: Y i is more than or equal the upper control threshold, i.e.,Y i ≥ U , hence the batch is accepted.
State 3: Y i is less than or equal the lower control threshold, i.e.,Y i ≤ L , hence the batch is rejected.
The transition probabilities among the states can be obtained as follows.
Probability of inspecting more items= p 11 As it can be seen, the matrix P is an absorbing Markov chain with states 2 and 3 being absorbing and state 1 being transient.
To analyze the above absorbing Markov chain, the transition probability matrix should be rearranged in the following form: Rearranging the P matrix yields the following matrix: Then, the fundamental matrix M can be obtained as follows [4], Where I is the identity matrix and m 11 denotes the expected long-run number of times the transient state 1 is occupied before absorption occurs (i.e., accepted or rejected), given that the initial state is 1. The long-run absorption probability matrix, F , is calculated as follows [4], The elements of the F matrix, f 12 , f 13 , denote the probabilities of the batch being accepted or rejected, respectively.
The expected cost can be obtained using Eq. (17) containing the batch acceptance, rejection, and inspection costs. The expected acceptance cost is the cost of nonconforming items (Npc) multiplied by the probability of the batch being accepted (i.e., f 12 ). The expected rejection cost is the rejection cost (R) multiplied by the probability of the batch being rejected (i.e., f 13 ).
Moreover, m 11 is the expected long-run number of times the transient state 1 is occupied before absorption occurs. Knowing that in each visit to transient state, the average number of inspections is 1 p (the mean of the geometric distribution), the expected inspection cost is given by Therefore, the expected cost for acceptance-sampling policy can be expressed as a function of f 12 , f 13 and m 11 as follows: Substituting for f 12 andm 11 , the expected cost equation can be rewritten as: Eq. (25) can be solved numerically using search algorithms to find L and U that minimize the expected total cost. The objective function, E (TC), should be minimized regarding two constraints on Type-I and Type-II errors associated with the acceptance sampling plans. Type-I error is the probability of rejecting the batch when the nonconformity proportion of the batch is acceptable. Type-II error is the probability of accepting the batch when the nonconforming proportion of the batch is not acceptable. Then, in one hand, ifp = AQL , the probability of rejecting the batch should be less thanα. On the other hand, in case wherep = LQL , the probability of accepting the batch should be less thanβ where α and βare the probabilities of Type-I and Type-II errors, hence, The optimum values of L and U among a set of alternative values are determined solving the model given in (25), numerically, where the probabilities are obtained using the geometric distribution.

Acceptance Sampling Policy Using the Minimum Angle Method based on Number of Successive Conforming Items [5]
The practical performance of any sampling plan is determined through its operating characteristic curve. When producer and consumer are negotiating for designing sampling plans, it is important especially to minimize the consumer risk. In order to minimize the consumer's risk, the ideal OC curve could be made to pass as closely through AQL , 1 − α , AQL , β . One approach to minimize the consumers risks for ideal condition is proposed with minimization of angle ϕ between the lines joining the points AQL , 1 − α , AQL , β and AQL , 1 − α , LQL , β . Therefore in this case, the value of performance criteria in minimum angle method will be [6], where Pr a (LQL ), Pr a (AQL )is the probability of accepting the batch when the proportion of defective items in the batch is respectivelyLQL , AQL . Assume A is the point AQL , 1 − α , Bis the point AQL , β and C is the point LQL , β thus the smaller value ofTan(ϕ), the angle ϕ approaching zero, and the chord AC approachingAB, the ideal condition.
The values of Pr a (LQL ), Pr a (AQL ) are determined as follows, Since the values of LQL , AQL are constant andLQL AQL therefore the objective function is determined as follows, Another performance measure of acceptance sampling plans is the expected number of inspected items. Since sampling and inspecting usually has cost, therefore designs that minimizes this measure and satisfy the first and second type error inequalities are considered to be optimal sampling plans. Since the proportion of defective items is not known in the start of process, in order to consider this property in designing the acceptance sampling plans, we try to minimize the expected number of inspected items for acceptable and not acceptable lots simultaneously. Therefore the optimal acceptance sampling plan should have three properties, first it should have a minimized value in the objective function of the minimum angle method that is resulted from the ideal OC curve and also it should minimize the expected number of inspected items either in the decisions of rejecting or accepting the lot. Therefore the second objective function is defined as the expected number of items inspected. The value of this objective function is determined based on the value ofm 11 Now one approach to optimize the objective functions simultaneously is to define control thresholds for objective functions Z , W and then trying to minimize the value of objective functionV . For example if parameters Z 1 , W 1 are defined as the upper control thresholds for Z , W then the optimization problem can be defined as follows, Optimal values of L , U can be determined by solving above nonlinear optimization problem using search procedures or other optimization tools.

Acceptance Sampling Policy Based on Cumulative Sum of Conforming Items Run Lengths [7]
In an acceptance-sampling plan, assume Y i is the number of conforming items between the successive (i − 1) th and i th defective items. Decision making is based on the value of S i that is defined as, The proposed acceptance sampling policy is defined as follows,

process of inspecting the items continues
where U is the upper control threshold and L is the lower control threshold.
In each stage of the data gathering process, the index of different states of the Markov model, j , is defined as: In other word, the acceptance-sampling plan can be expressed by a Markov model, in which the transition probability matrix among the states of the batch can be expressed as: where, p jk is probability of going from state jto state kin a single step and Y i+1 denotes the number of conforming items between the successive defective items and Pr(Y i+1 = r) = (1 − p) r p r = 0, 1, 2, ... where pdenotes the proportion of defective items in the batch.
The values of p jk are determined based on the relations among the states, for example where U + 2 > j > 1, L ≥ j − 2, k = 1 then according to the definition of j, it is concluded that j = Y i + 2 and transition probability of going form state jto state k = 1is equal to the probability of rejecting the batch that is evaluated as follows, In the other case where, U + 2 > j > 1, U + 2 > k > 1, U > j + k − 4 > L , based on the definition of j, we have j = Y i + 2 thus it is concluded that In the other case where, U + 2 > j > 1, k = U + 2, then according to the definition of j, we have j = Y i + 2 thus it is concluded that, In the other case where, U + 2 > j > 1, U + 2 > k > 1, j + k − 4 ≥ U , then according to the definition of j, we have j = Y i + 2 thus it is concluded that, As a result, when L = 1and U = 3 for example, the transition probability matrix among the states of the system can be expressed as: And it can be seen the matrix P is an absorbing Markov chain with states 1 and 5 being absorbing and states 2, 3, and 4 being transient.
Analyzing the above absorbing Markov chain requires to rearrange the single-step probability matrix in the following form: whereAis the identity matrix representing the probability of staying in a state that is defined as follows Ois the probability matrix of escaping an absorbing state (always zero) that is defined as follows Qis a square matrix containing the transition probabilities of going from a non-absorbing state to another non-absorbing state that is defined as follows And Ris the Matrix containing all probabilities of going from a non-absorbing state to an absorbing state (i.e., accepted or rejected batch) that is defined as follows Rearranging the P matrix in the latter form yields the following: Bowling et. al. [4] proposed an absorbing Markov chain model for determining the optimal process means. According to their method, matrix M that is the fundamental matrix containing the expected number of transitions from a non-absorbing state to another non-absorbing state before absorption occurs can be obtained by the following equation, For the above numerical example, i.e., when L = 1andU = 3, the fundamental matrix M can be obtained as: where I is the identity matrix.
Since m jj represents the expected number of the times in the long-run the transient state jis occupied before absorption occurs (i.e., before accepted or rejected), and matrix F is the absorption probability matrix containing the long run probabilities of the transition from a non-absorbing state to an absorbing state. The long-run absorption probability matrix, F , can be calculated as follows: Again when L = 1andU = 3, the elements of F ( f jk ; j = 2, 3, 4 ; k = 1, 5) represent the probabilities of the batch being accepted and rejected, respectively, given that the initial state is j = 2, 3, 4. In this case, the probability of accepting the batch is obtained as: Probability of accepting the batch= ∑ j=2 ∞ Pr(Accepting the batch | the initial state is j) × Pr(the initial state is j) Also the expected number of inspected items will be determined as follows, This new acceptance-sampling plan should satisfy two constraints of the first and the second types of errors. The probability of Type-I error shows the probability of rejecting the batch when the defective proportion of the batch is acceptable. The probability of Type-II error is the probability of accepting the batch when the defective proportion of the batch is not acceptable. Then on the one hand ifp = AQL , the probability of rejecting the batch will be less than α and on the other hand, in case wherep = LQL , the probability of accepting the batch will be less thanβ where α and βare the probabilities of Type-I and Type-II errors. Hence, p = AQL → Probability of accepting the batch ≥ 1 − α p = LQL → Probability of accepting the batch ≤ β (50) From the inequalities in (50), the proper values of the thresholds L and U are determined and among the feasible ones, we select one that has the least value for expected number of inspected items that is obtained using Eq. (49).

A New Acceptance Sampling Design Using Bayesian Modelling and Backwards Induction [8]
In this research, a new selection approach on the choices between accepting and rejecting a batch based on Bayesian modelling and backwards induction is proposed. The Bayesian modelling is utilized to model the uncertainty involved in the probability distribution of the nonconforming proportion of the items and the backwards induction method is employed to determine the sample size. Moreover, when the decision on accepting or rejecting a batch cannot be made, we assume additional observations can be gathered with a cost to update the probability distribution of the nonconforming proportion of the batch. In other words, a mathematical model is developed in this research to design optimal single sampling plans. This model finds the optimum sampling design whereas its optimality is resulted by using the decision tree approach. As a result, the main contribution of the method is to model the acceptance-sampling problem as a cost optimization model so that the optimal solution can be achieved via using the decision tree approach. In this approach, the required probabilities of decision tree are determined employing the Bayesian Inference. To do this, the probability distribution function of nonconforming proportion of items is first determined by Bayesian inference using a non-informative prior distribution. Then, the required probabilities are determined by applying Bayesian inference in the backward induction method of the decision tree approach. Since this model is completely designed based on the Bayesian inference and no approximation is needed, it can be viewed as a new tool to be used by practitioners in real case problems to design an economically optimal acceptance-sampling plan. However, the main limitation of the proposed methodology is that it can only be applied to items not requiring very low fractions of nonconformities.

Notations
The following notations are used throughout the paper.

Problem Definition
Consider a batch of size N with an unknown percentage of nonconforming p and assume m items are randomly selected for inspection. Based on the outcome of the inspection process in terms of the observed number of nonconforming items, the decision-maker desires to accept the batch, reject it, or to perform more inspections by taking more samples. As Raiffa & Schlaifer [9] stated "the problem is how the decision maker chose eand then, having observedz, choose esuch that u(e, z, a, p) is minimized. Although the decision maker has full control over his choice of eanda, he has neither control over the choices of znorp. However, we can assume he is able to assign probability distribution function over these choices." They formulated this problem in the framework of the decision tree approach, the one that is partially adapted in this research as well.

Bayesian Modelling
For a nonconforming proportion p, referring to Jeffrey's prior (Nair et al. [10]), we first take a Beta prior distribution with parameters v 0 = 0.5 and u 0 = 0.5 to model the absolute uncertainty. Then, the posterior probability density function of p using a sample of v + u inspected items is where vis the number of nonconforming items and u is the number of conforming items in the sample. Moreover, to allow more flexibility in representing prior uncertainty it is convenient to define a discrete distribution by discretization of the Beta density (Mazzuchi,& Soyer [11]). In other words, we define the prior distribution for p l as Moreover, the probability of finding j nonconforming items in a sample of i inspected items, i.e., Pr{( j, i) | p = p 1 }, can be obtained using a binomial distribution with parameters (i, p = p l ) as: Hence, the probability Pr{ p = p 1 , z = z j | e = e i } can be calculated as follows Thus, In other words, applying the Bayesian rule, the probability Pr{p = p l | z = z j , e = e i } can be obtained by In the next Section, a backward induction approach is taken to determine the optimal sample size.

Backward Induction
The analysis continues by working backwards from the terminal decisions of the decision tree to the base of the tree, instead of starting by asking which experiment ethe decision maker should select when he does not know the outcomes of the random events. This method of working back from the outermost branches of the decision tree to the initial starting point is often called "backwards induction" [9]. As a result, the steps involved in the solution algorithm of the problem at hand using the backwards induction becomes u * (e i , z j , a k ) = ∑ l=1 m (u * (e i , z j , a k , p 1 )Pr{p = p 1 | z = z j , e = e i }) 4. Since the objective is to minimize the expected cost, the cost of having history (e, z) and the choice of decision (accepting or rejecting) can be determined by u * (e i , z j ) = min a k u * (e i , z j , a k ) 5. The conditional probability Pr{z = z j | e = e i } is determined using Eq. (56). 7. Now the minimum of the values u * (e i ) would be the optimal decision, which leads to an optimal sample size.
u * = min e u * (e i ) = min e E z|e min a E p|z u(e i , z j , a k , p 1 ) (61)

Conclusion
Acceptance sampling plans have been widely used in industry to determine whether a specific batch of manufactured or purchased items satisfy a pre-specified quality. In this chapter, new models for determining optimal acceptance sampling plans have been presented. The relationship between the cost model and a decision theory model with probabilistic utilities has been investigated. However, the acceptance sampling plan, which are derived from the optimization of these models, may differ substantially from the plans that other economic approaches suggest but optimization of these models are simple and efficient, with negligible computational requirements. In next sections, a new methodology based on Markov chain was developed to design proper lot acceptance sampling plans. In the proposed procedure, the sum of two successive numbers of nonconforming items was monitored using two lower and upper thresholds, where the proper values of these thresholds could be determined numerically using a Markovian approach based on the two points on OC curve. In last section, based on the Bayesian modelling and the backwards induction method of the decision-tree approach, a sampling plan is developed to deal with the lot-sentencing problem; aiming to determine an optimal sample size to provide desired levels of protection for customers as well as manufacturers. A logical analysis of the choices between accepting and rejecting a batch is made when the distribution function of nonconforming proportion could be updated by taking additional observations and using Bayesian modelling.