Optimal Sequential Sampling Plans Using Dynamic Programming Approach

In this paper we proposed a dynamic programming procedure to develop an optimal sequential sampling plan. A suitable cost model is employed for depicting the cost of sampling, accepting or rejecting the lot. This model is based on sequential approach. A sequential iterative approach is used for modeling the cost of different decisions in each stage. In addition a backward recursive algorithm is developed to solve the dynamic programming. On the other hand, the purpose of this paper is to introduce a new sequential acceptance sampling plan based on dynamic programming. At the end of this paper a numerical example is solved to show how this model works and then sensitivity analyses of main parameters of acceptance sampling model are carried out.


Introduction
Acceptance sampling is a useful tool which is used in quality control in order to design decision principles for lot acceptance problem.Depending on number of defective items in sample, the decision may be, 1. Accepting the batch 2. Rejecting the batch 3. Continuing the sampling and repeating decision process.
Therefore we expect to have less defective items in accepted batches using this approach.This method encourages mangers to use it for two reasons: 1. Improving the quality level of the batch with respect to inspection characteristics 2. Having reverse relevance between quality level and inspections required (Montgomery 2005).
We use sampling plans usually when we have destructive inspection experiments or cost of 100% inspecting is high or it takes long time.In this work a new decision making approach for accepting or rejecting a sample based on recursive inference is improved.
Recursive inference is used for determining the optimal decision.Also when none of the decisions of accepting or rejecting is optimal, it is assumed that we can have more observations and continue to the next stage.Thus a mathematical model is developed which is optimal solution because of using stochastic dynamic programming approach.
The main objective of model is to optimize cost of sampling system based on fraction of defective items.On the other hand Sequential sampling reduces the number of samples required to evaluate a population level by 40-80% in comparison with classical sampling techniques (Boivin and Vincent 1983).
Sequential sampling plans are designed to enhance the performance of sampling methods.First step of this method is to inspect an initial sample from the lot then we decide to accept, reject the lot or take another sample by analyzing the results of inspected sample.Sequential sampling plans are often applied where minimizing sample size is very important (Montgomery 2005).In such plans, item are inspected successively in different stages, until a decision is made on the lot or process thus the sample size of this method is not determined until the lot is accepted or rejected.Sequential sampling plans select the suitable decision quickly, especially when quality is particularly good or particularly.

Literature Review
The purpose of sampling plans is to provide users with evidence that the items reach the quality levels required and agreed upon.Sampling plans has been commonly conducted by quality inspection for acceptance purposes, which is based on the statistical theory.Acceptance sampling inspection is a statistical tool concerned with sampled items to make a decision about inspected products; especially to check whether items have met pre agreed quality specifications.Sampling inspection process concern with the definition of quality characteristics, sample size, acceptance criteria, and a combination of quality levels required by the producer and the consumer (Tong et al 2011).Golub (1953) presented a method for determining optimal Sampling inspection plans based on the criterion of minimizing sums of both producer's and consumer's risks when sample size is fixed.Tagaras (1998) studied the joint process control and machine maintenance problem of a Markovian deteriorating machine.He assumed that sampling and preventive maintenance were performed at fixed intervals.Kuo (2006) developed an optimal adaptive control policy for joint machine maintenance and product quality control.He included the interactions between the machine maintenance and the product sampling in the search for the best machine maintenance and quality control strategy for a Markovian deteriorating batch production system.Wortham and Wilson (1971) proposed a backward recursive technique for optimal sequential sampling plans.
Most attempts to minimize sampling cost were concentrated on reducing expected sample size and reducing inspection cost.But the costs associated with the accept-reject decisions should be considered in designing the sampling plans.The cost of each defective item in an accepted lot can be evaluated very accurately in some quality control environments.On the other hand, cost of accepting defective item can be estimated by considering its results in practical situations.Cost estimates for rejected lots are readily obtained by considering the rectification method (Wortham and Wilson 1971).
In this research, a new model for acceptance sampling problem is introduced.The objective of the model is to determine the optimal decision that minimizes the total cost including the cost of rejecting the batch, the cost of inspection and the cost of defective items.
The assumptions and notations of the proposed method are presented in section 3, the model is presented in section 4 and the solution algorithm along with numerical demonstration on the application comes in section 5, sensitivity analyses are performed in Section 6 and we discussed and conclude the results in Section 6.
The method to be reported here is based on dynamic programming and the recursive property of sequential sampling plans.This method is coded by excel 2013.Assume there is a batch with N items.A sample of n items is selected.Each defective item is replaced with a good one in sample after inspection.We although call "m" equal to the maximum number of items that can be inspected and it is determined by economic considerations.Based on inspection's output we want to make an optimal decision.The possible decisions are as follows,  Rejecting the lot  accepting the lot  Taking another sample

Sampling Plan Using Dynamic Programming
Dynamic programming is one of the most powerful methods to model the stochastic state of decision-making processes (Ross 1983).In mathematics, computer science and economics, dynamic programming is a method for solving complex problems by breaking them down into simpler sub-problems.In general, to solve a given problem, we need to solve different parts of the problem, and then combine the solutions of the subproblems to reach an overall solution.The dynamic programming approach seeks to solve each sub-problem only once.In sampling plans, in cases where we are to select between accepting and rejecting a lot, since the proportion of defective item is not known, we are in stochastic space.Since the stochastic state of the process may be dynamic and changes by collecting more data, it will be possible to use the concept of the stochastic dynamic programming to model an acceptance-sampling plan.However, before doing so, first we need to have some definitions.Consider a problem where defective items in sample are replaced by good items and all items in the rejected lots are inspected and all defective times are replaced by good items before delivery.This leads to a dynamic programming model.
Let a K (n,x) be the expected cost of accepting the lot after observing x defective items in n sampled items thus we have c s n: is accumulated number of items sampled (n) multiplied by cost of sampling and inspecting one item (c s ), so this item is total cost of inspecting the items in sample.
c r x: is accumulated number of defective items sampled (x) multiplied by cost of replacing, reworking or repairing a defective item (c r ), so this item is total cost of replacing, reworking or repairing defective items.
c a E(y|x): is expected number of defective items in the part of the lot that has not been sampled (E(y|x)) multiplied by cost of one defective item in an accepted lot (c a ), thus this item is total cost of defective items in an accepted lot.
And now let r K (n,x) be the expected cost of rejecting the lot after observing x defective items in n sampled items thus we obtain c s N: is Lot size (N) multiplied by cost of sampling and inspecting one item (c s ), so this item is total cost of inspecting the lot after rejecting the batch.
c r x: is accumulated number of defective items sampled (x) multiplied by cost of replacing, reworking or repairing a defective item (c r ), so this item is total cost of replacing, reworking or repairing defective items.
c r E(y|x): is expected number of defective items in the part of the lot that has not been sampled (E(y|x)) multiplied by cost of replacing, reworking or repairing a defective item (c r ), so this item is total cost of replacing, reworking or repairing defective items in the part of the lot that has not been sampled.
Let s K (n,x) denotes the cost of taking one more sample after observing x defective items in n sampled items.If * K (n,x) denotes the optimal cost of decision making system, thus following is concluded, It is obvious that in decision of taking one more sample, if the item was not defective then we move to state (n+1,x) which its optimal cost is equal to * K (n+1,x) and if the sampled item was defective then we move to state (n+1,x+1) which its optimal cost is equal to * K (n+1,x+1) .Since the expected value of the proportion of defective items is E(p) thus using the conditional mean formula, following result is concluded, Also it is obvious that E(p) obtained as follows,  The recursive approach of solving proposed dynamic programming model is summarized in the above Table .It is seen that the model can be easily solved using a computer program.In the next section, sensitivity analysis is performed on different parameters.

Sensitivity Analysis
A sensitivity analysis is performed on the parameters of the problem and the results are summarized in the Table (2).The results are summarized as follows,  By comparing case one and case two, it is seen that when the cost of sampling and inspecting one item   s c increases, then the optimal decision in the proposed method is to reject the lot.By comparing case one and case three, it is seen that when the cost of sampling and inspecting one item   s c decreases, then the optimal decision in the proposed method is to continue to the next decision making stage.So it is logical, because when the cost of inspecting the one item decreases then, optimal policy would be to inspect more items.


Also it is seen that when the cost of replacing, reworking or repairing a defective item   r c increases, then the optimal decision in the proposed method is to accept the lot as expected.Also when the cost of replacing, reworking or repairing a defective item   r c decreases, then the optimal decision in the proposed method is to continue to the next decision making stage.


It is seen that when the cost of accepting a nonconforming item   a c decreases, then the optimal decision in the proposed method is to accept the lot.Since decreasing cost of accepting a nonconforming item leads to decrease the cost of accepting the lot thus optimality of the acceptance decision is logical.Also it is seen that when the cost of accepting a nonconforming item   a c increases, then the optimal decision in the proposed method is to continue to the next decision making stage.

Conclusion
This paper presents a dynamic programming procedure to design an optimal sequential sampling plan.That is very important for quality control managers to have a good lot with minimum cost.Since the cost of inspecting all items is very high, it is popular that managers use sampling for this purpose.In this work, a new decision making approach for accepting or rejecting a sample based on recursive inference is improved.The objective of the model is to determine the optimal decision that minimizes the total cost including the cost of rejecting the batch, the cost of inspection and the cost of defective items.Also when none of the decisions of accepting or rejecting is optimal, it is assumed that we can have more observations and continue to the next stage.A mathematical model is developed which leads to optimal solution because of using dynamic programming approach.Also, sequential approach is used for obtaining the cost of different decisions in each stage.A numerical example is solved to elaborate the application of the proposed methodology.At the end sensitivity analyses of main parameters are performed and the results are discussed.
,x) = c n + c x + c E(y|x)Where; ,x) = c N + c x + c E(y|x)Where;
Then the optimal decisions are determined using a backward recursive approach.They have shown that acceptance sampling model based on Bayesian inference is efficient and less expensive than the single sampling plan.Fallahnezhad and Aslam (2013) proposed a decision tree for optimizing the cost acceptance sampling problem based on recursive modeling.

2015 pp575-586 578 3. Dynamic Modeling
Pak.j.stat.oper.res.Vol.XI No.4 r : cost of replacing, reworking or repairing a defective item c a : cost of one defective item in an accepted lot.

Table 1 : Results of the dynamic programming process in the proposed sampling model
* K * K * K * K 72

Table 2 : Optimal solution for different values of parameters
* K