Using Decision Theory Approach to Bulid a Model for Bayesian Sampling Plans

The paper deals with constructing a model for Bayesian sampling plans for the system “Average out going quality level (AAAAAAAA)”, where the percentage of defectives is varied from lot to lot, so it considered to be a random variable, having a prior d istribution ff(pp), which must be fitted to represent the distribution of percentage of defectives efficiently. The parameters of this distribution must estimated, and then used in model construction. The aim of the model is to find the parameters of single Bayesian sampling plan (nn, cc), the sample size, and the acceptance number (cc), from minimizing the total cost of the model, which comprises cost inspection and cost of repairing or replacement of defective units. In addition to cost of rejecting goo items, which is a penalty cost. Also the construction depend on decision rule[δδ(xx)], for acceptance and decision rule for rejection[1 − δδ(xx)]. Finally the build model can be applied to another distribution like Gamma – Poisson, Normal – Beta, to find the sampling plan (nn, cc) necessary to test the product of the lot and to have a production with accepted (AAAAAAAA) to satisfy consumer's and producer's risk. All the derivation required to build this cost function are exp lained and all the results of obtained samples and applications are illustrated in tables.


Introduction
The term sampling inspection plan, is used when the quality of product is evaluated by inspecting samples rather than by total inspects, which required cost and time. Here we introduce a model for total expected cost function by [7 & 9] who m gives simp le information about the elements of this cost function, while [10] introduce the cost model when the percentage of defective is random variab le follows Gamma distribution, and suggested to apply another distribution as we done in our research. The build model differs fro m them by including decision rule[ ( ) ] for acceptance and[ 1 − ( ) ] for rejection, the posterior distribution ( | ) and finding the optimal value of acceptance number ( ) is a closed form, also the sample size necessary to take a decision, in a closed form also. The programs required to obtain ( , ),[ ( )] and total cost, arte executed.
The aim o f this paper is to build the total cost of quality control model, used to find the Bayesian sampling p lan ( , ) for ( ) system, the method considered the percentage

Methodology of Research
Since the aim of research insist on finding Bayesian sampling plans for system ( ), where the percentage of defective in production represents random variab le varied fro m lot to lot and have some prior d istribution[ ( ) ], which determined fro m past data and experience, and it may be Beta distribution or Gamma, or Log-Normal or any other distributions. It is necessary to determine the parameters of Bayesian sampling plan ( , ), taken fro m lot by minimizing either (total inspection cost) or minimizing total expected risk, wh ich is the risk due to taking the wrong decision.
To satisfy, the aim, first of all we define all notations necessary to build the model, these are; : Lot size of p roduct. : Nu mber of defective units in the lot . = � �: Percentage of defective in lot .
= � �: Percentage of defective in the sample .
: Nu mber of defective in sample.
: Nu mber of defective in Lot.
: Acceptance number 1 : Cost of sampling and testing unit in the sample. 2 : Cost of repairing o r replacement of defective un its in the sample. 3 : Cost of sampling and testing units in the remaining quantity ( − ) after rejecting sample. 4 : Cost of repairing or rep lacement of defective unit in quantity ( − ). 5 : Cost of accepting good unit and it is not a penalty cost. 6 : Cost of accepting defective unit. ( ) : Probability of accepting the production with quality and it is; ( ) = ( ≤ ) ( ) : Probability of rejecting the production with quality .
: Average percentage of defectives in the lot after doing rectifying inspection on it. : Break even quality point;  Therefore, the posterior distribution of percentage of defe ctives is also Beta, but with parameters ( + , + − ) and with average;

Construction of the Model
Which can be written in terms of the mean of prior ( ) i.e.

= +
as: And let be break even quality level, which is the point of percentage of defect ive, at wh ich we cannot distinguish between acceptance decision and rejection, and is defined by = − − , and it is also defined in terms of quality control cost parameters. Therefore; (10) Using the [ ( ) , , ] , can found the value of expected risk under Bino mial process and continues prior distribution. See [9].
But here the proposed model depend on definition ( , ) in terms of and decision rule[ ( )], and it is defined as follows; ( , ) = ( ) [ 1 + 2 + 5 ( − ) + 6 ( − ) ] ( | ) +(1 − ( ) ) [ 1 + 2 + 3 ( − ) + 4 ( − ) ] ( | ) (11) And since is random variable has ( ) then the expected value of risk in terms of ( ) is denoted by [ ( ) , ] and it is defined as: The min imu m value for formu la (13) can be verified by; , 3 < 5 , 4 > 6 3 > 5 & 4 < 6 Since equation (13), define the formula of expected risk function in terms of expectation, we want to find it in terms of sampling distribution, this required to take the distribution of defectives in the lot ( ), and d istribution of ( ) in sample (n), ( | ) in consideration, and also taking ( ) ( the prior d istribution of quality of a process, and also define the loss ( , ( ) ), this tend us to find the expected value of the loss due to the decision of accepting and rejecting, which is now defined by the following equation;   (17) considered to be a function of Bayesian single plan to test the product ( , ) and searching for the two values ( , ) which g ives min imu m value for function (17), can be done by applying the first partial derivatives for the function equal to zero, then solving the two equations, since the distribution of ( , ) is a discrete distribution, so we cannot apply differentiat ion method, we can apply forward differences method for ( , ) which required writing ( , ) in a fitness way;

Application
The following data represents the distribution of percentage of defectives for (100) lots taken from Iraqi general co mpany for producing liquid o ils, after tests it found to be Beta distribution ( , ) The last three classes were grouped since its observed frequencies is less than 5, also we compute the mean of percentage of defectives  (20) and (24) by using the estimated values of ( �,̂ ) and ( 1 , 2 , 3 , 4 , 5 , 6 ), also for different values of process average ( ), the results for d ifferent size of lot are tabulated in table (2). After testing the distribution of quality in table (1), and estimating parameters, and also computing different parameters of total cost model, we find different values of Bayesian single samp ling p lan ( , ) and the results are explained in table (2).
The above table represents the results of sampling plan ( , ) accord ing to quality level = 0.001 ( 0.001 ) 0.005 and lot size = 1000 ( 1000 ) 25000 , for equation (24) and (20), while for g iven data in research, we find that the proposed sampling plan when = 16818 units, and = 0.0042625 and = 0.0187 is ( , ) = (1295, 25 ) and also we compute [ ( ) , ] fro m its results found to be equal to (71.720 $)
(4) Fro m table (2) we find the samp le size ( ) is increasing when the percentage of defective is increased, which is logical result.
(5) The proposed model can be applied to another kind of Bayesian sampling which have Gamma prior, and log -Normal, since it is a general model. (6) Fro m the data, we found that = 0.0042625 , wh ich is the estimated value of percentage of defectives in the normal condition of production process, but it's true value found ( = 0.08) which is greater than proposed ( = 5%) for the factory, this results is logical also because of complex and bad conditions of process of production, we look at the percentage (0.08) is very good now.