1. Introduction
Sampling inspection plans for lot acceptance are often designed in industry to suitably discriminate between satisfactory and unsatisfactory batches. In essence, the construction of the best decision rule for lot disposition can be stated as a constrained optimization problem. Generally, proper acceptance test plans must provide the desired protections to both customers and manufacturers, and the required number of items to be sampled should be as small as possible. Many test plans are available in the literature for sentencing lots of incoming or outgoing goods. Papers [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14] are just a sample of recent references.
The number of minor defects (or nonconformities) per unit is sometimes the quality characteristic of interest; for example, when the inspected units are metal, linoleum, glass, paper or plastic. In such cases, the Poisson model is commonly used for analyzing the observed sample. For instance, Fernández [
15] adopted Poisson models to describe the number of blemishes per sheet in inspecting paper. In these situations, the Poisson parameter,
is precisely the defect rate per sampled unit. Moreover, the number of events in a specific time period is often modeled by a Poisson distribution. In particular, many studies assume that the stochastic demands follow that distribution; see, e.g., [
16,
17,
18,
19,
20].
The mean and variance of a Poisson distributed variable are both equal to
which could be too restrictive in practice. Evidently, the Poisson distribution is not suitable for fitting dispersed data. Due to this reason, Fernández [
21] considers the Conway–Maxwell–Poisson (CMP) distribution with centering parameter
and dispersion parameter
d for modeling the defect count data. The CMP law with parameter
is a generalization of the Poisson distribution, where
d can reflect under-
equi-
and over-dispersion
Conway and Maxwell [
22] introduced this distribution for modeling queuing systems with state-dependent service rates. Samuel et al. [
23] studied some statistical and probabilistic properties of the CMP law. An extensive survey of procedures and applications of this model in a wide diversity of areas, including numerous references, can be found in Sellers et al. [
24]. Other interesting papers are Francis et al. [
25], Zhu [
26] and Santarelli et al. [
27].
In many practical situations, the combination of available empirical information with a previous objective and subjective knowledge appreciably improves the efficiency of the inferential methods; see, e.g., [
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38]. The presence of prior information is common in most manufacturing processes. In such cases, the incorporation of earlier inspection results and subjective expert opinions is frequently advantageous in acceptance sampling. Fernández [
21] studied the construction of acceptance test plans for CMP models using exclusively sample information. In contrast, this paper deals with the determination of optimal lot inspection schemes based on dispersed defect count data and prior knowledge. A constrained minimization problem is solved via Monte Carlo simulation to determine the optimal inspection scheme. The proposed sampling plan provides the demanded protections to both consumers and producers and minimizes the needed sample size. Essentially, a submitted lot is accepted whenever its posterior lot acceptability is large enough. The suggested Bayesian approach is an appealing alternative to the typical frequency-based perspective in terms of accuracy and inspection effort. Controlling the Bayesian risks allows the practitioners to ensure that the rejected and accepted lots are, in fact, rejectable and acceptable at the required confidence levels.
The rest of this paper is structured as follows.
Section 2 presents the posterior odds ratio criterion for lot sentencing based on dispersed defect count data and prior information. The design of sampling plans with controlled Bayesian consumer and producer risks and minimum sample size is developed in
Section 3. A mixed-integer nonlinear programming problem is formulated in order to find the best inspection scheme. Then, explicit approximations of the Bayesian risks and the optimal plan are deduced in
Section 4 by using the asymptotic normality of the test statistic. Next,
Section 5 introduces a Monte Carlo simulation approach to calculate the optimal scheme, which is applied in
Section 6 to the manufacturing of paper and glass. Finally,
Section 7 offers some concluding remarks.
2. Posterior Odds Ratio Testing
A random variable
X is said to follow the CMP probability model with parameter
which is denoted by
if its probability mass function is given by
where
denotes the set of nonnegative integers,
and
is the parameter space.
Clearly, the
i-th moment of the random variable
is given by
where
represents the set of natural numbers. Hence, the mean and variance of
X can be expressed as
Consider that in a certain production process, the number X of minor defects or nonconformities detected in a given item follows the distribution and also that a large batch of products has been submitted to determine its acceptability. In addition, the experimental information is contained in a simple random sample of size n from the variable where represents the number of imperfections observed in the i-th inspected item from the lot for
The manufacturer assumes that the distribution is an acceptable model for whereas the customer supposes that the distribution is rejectable, where is less than In other words, the manufacturer considers that the null hypothesis is admissible, while the customer specifies the alternative hypothesis In short, is the acceptable parameter and is the unacceptable one.
In Bayesian hypothesis testing, the null hypothesis is accepted whenever its posterior probability is large enough. Obviously, it is needed to estimate prior probabilities for and before applying Bayes’ theorem. Suppose that is a numerical value in the interval representing the decision-maker’s prior level of credibility in the acceptability of the submitted batch based on available expert opinions and previous data. Hence, and is the prior odds ratio in favor of versus
The submitted lot would be accepted by the Bayesian test whenever the posterior odds ratio of
against
given
which is defined as
is small enough. In our situation, the posterior odds ratio
based on the available data
is given by
where
and
Since the log ratio is given by
where
it is clear that the posterior odds ratio test would accept
if and only if the test statistic
is at most the so-called acceptance constant
i.e., the batch is accepted whenever
The test statistic
is based on the sufficient statistic
which captures all relevant information in the data.
The acceptance sampling plan based on the posterior odds ratio criterion can be summarized as follows: Step 1: At random, select n items from the submitted batch. Step 2: Count the number of minor defects in n items, and calculate and Step 3: Compute the value of the test statistic Step 4: Accept the batch if and reject it otherwise.
Assuming that with it is derived from the central limit theorem that converges in law to a standard normal random variable as where and are the mean and variance of respectively. Consequently, the test statistic is approximately normally distributed when n is large enough.
It should be noted that the posterior lot acceptability which represents the conditional degree of belief in given the observed sample and the posterior odds ratio may be revised in light of additional subjective and objective information.
3. Design of Lot Acceptance Sampling Plans
Sampling inspection schemes for lot acceptance purposes are usually designed in industrial quality control to minimize the needed sample size for lot judgment while ensuring that the so-called producer and consumer risks are sufficiently small; say, at most, and respectively, where An agreement between the manufacturer and the customer is commonly assumed on the choices of the prior probabilities of the hypotheses, and the acceptable and unacceptable CMP parameters, and and the maximum allowable Bayesian producer and consumer risks, and respectively.
Essentially, the Bayesian consumer risk is the probability that an accepted batch has an unacceptable quality level, whereas the Bayesian producer risk is the probability that a rejected batch has an acceptable quality level. These risks provide the assurance that practitioners typically require. The manufacturer wants a small maximum probability that is true when the lot is rejected, while the consumer desires a small maximum probability that is false when the batch is accepted.
In our situation, the Bayesian producer and consumer risks associated with the inspection scheme
can be expressed as
respectively. Based on Bayes’ theorem, the Bayesian producer risk is defined as
where
whereas the Bayesian consumer risk is given by
Equivalently, in terms of the prior odds ratio
the Bayesian risks can be expressed as
and
A suitable Bayesian inspection scheme
must satisfy the requirements
It is assumed that
and
because it is natural to consider that
and
That is, biased tests are not admissible. The optimal inspection scheme
would then be the test plan with a minimal sample size that simultaneously satisfies the conditions (
1). The constrained minimization problem to determine the required number of items to test,
and the optimal acceptance constant,
is a mixed-integer nonlinear programming problem, which can be stated as
where
is the set of real numbers. More compactly, the optimization problem (
2) may be formulated as
where
denotes the feasible region.
Since
is non-increasing in
c and
is non-decreasing in
it is deduced that the required sample size is
where
and
It should be noted that the optimal sample size,
is finite because, as
,
which is less than
That is,
is less than
if
n is sufficiently large. In addition, any value in the nonempty interval
is a feasible value of the acceptance constant. The midpoint of the above interval is a neutral choice for
It is assumed in the present paper that
is the optimal acceptance constant. Generally,
and
cannot be explicitly expressed. Nevertheless, accurate estimates can be computed by Monte Carlo simulation.
4. Explicit Approximate Risks and Plans
Closed-form approximations of the Bayesian risks and the optimal inspection scheme can be deduced by using the asymptotic normality of under the null and alternative hypotheses. For later use, denotes the standard normal cumulative distribution function and for
Assuming that
n is large enough, it follows that the distribution of the test statistic
is approximately
when
where
and
In such a case, an approximation of the Bayesian producer risk
is given by
Similarly, the Bayesian consumer risk
is approximately
Equating the above approximate risks to
and
respectively, it is derived that
where
Consequently, it is derived from (
3) that
which imply that
It is then deduced that
is an approximation of the smallest sample size
where
stands for the least integer upper bound. Moreover,
are approximate estimates of the optimal acceptance constant. A balanced estimation of
would be
which is given by
In general, the acceptance plan is often a satisfactory approximation of the best scheme if is sufficiently large. Evidently, the approximation is not excellent when is small. Anyway, is always a convenient initial point in order to find via iterative procedures.
5. Computation of Optimal Inspection Schemes
Monte Carlo methods are widely used in optimization, especially when it is difficult or impossible to apply other approaches. Essentially, their key idea is using randomness to solve complex deterministic problems.
In our situation, it is needed to use Monte Carlo simulation to find the best inspection scheme because the Bayesian risks cannot be assessed in closed forms. The global solution of the minimization program (
2) can be practically determined by using repeated random sampling.
Assume that
is a simple random sample of a large size
m of the test statistic
when
for
Suppose also that
represents the empirical cumulative distribution function of
based on the corresponding sample for
That is,
for
and
where I
denotes the indicator function.
Strongly consistent estimations of the Bayesian producer and consumer risks associated with the sampling plan
are then given by
and
An accurate approximation of the best inspection scheme can be obtained by simulation. If
m is large enough, the optimal sample size would be precisely
where
and
are the natural sample estimates of
and
respectively. In terms of the prior odds ratio
the estimations
and
can alternatively be expressed as
and
Computationally, it is convenient to use starting values for and . The approximate plan can serve as the initial point in the iterative process to find the best scheme which is of vital importance to decrease calculation costs. The size m of the simulated samples is assumed here to be with the intention of obtaining accurate results.
6. Illustrative Examples
An application to glass manufacturing presented in Fernández [
39] is first considered in this section to illustrate the methodology developed for the CMP distribution. In this case, an analyst wants to find the optimal inspection scheme to accept or reject large lots of 0.64 m
2 sheets of glass. The number
X of blemishes per sheet of glass is the quality characteristic of interest, and the decision rule to determine the lot acceptability is based on a simple random sample from the variable
Fernández [
39] assumes that
X has a Poisson model with parameter
However, in many cases, the defect count data are under- or over-dispersed with respect to the Poisson distribution. Due to this reason, the number of imperfections occurring on each sheet is assumed here to follow the
distribution.
The manufacturer deems that the
model is acceptable when the defect rate per unit is
and
whereas the customer supposes that the
distribution is rejectable if
and
Table 1 shows the best inspection scheme,
and the approximately optimal plan,
for
and
The Bayesian producer and consumer risks (BPR and BCR) of the schemes
and
are also reported. In light of
Table 1, the required sample size tends to reduce when
and/or
increase. Likewise, the reduction in sampling inspection effort is clear when
is high.
Assume that the maximum permissible producer and consumer risks are and respectively. In the non-informative case, i.e., when or the optimal plan is obtained to be Thus, the best decision rule consists of taking 17 sheets of glass at random from the submitted lot and then accepting the whole lot if is at most otherwise, the lot is rejected. The proposed approximate plan is given by The optimal plan and the Bayesian risks of and have been obtained by simulating random samples of size 17 from the and distributions. In this balanced situation, the approximate plan is nearly optimal because the BCR is lower than 10%, and the BPR is only slightly higher than 5%.
Suppose now that the producer and the consumer agreed to assign a prior probability to the lot acceptability, which implies that the prior odds ratio r is 1/4. Thus, there is a strong prior belief that the lot is acceptable. In this case, the approximate plan is quite different from the optimal scheme Similarly, is not a good approximation of the best inspection scheme when Evidently, the normality of is not reasonable when n is small. In all events, however, is a useful initial estimate of
According to Fernández [
21], the optimal plan under the frequentist perspective is
which is quite similar to
when the prior odds ratio is
In general, the Bayesian viewpoint produces a significant reduction in sample size when
r is small. For example,
is only 12 when
However, in the non-informative case, the optimal Bayesian and frequentist test plans are often nearly equivalent.
With the aim of studying the effect of the dispersion parameter
d on the optimal test plan,
Table 2 presents the approximate and optimal inspection schemes,
and
and their corresponding Bayesian risks when
and
for
and
In view of
Table 2, it is clear that
is a non-decreasing function of
d when
and
are fixed. Therefore, the required sample size in the Poisson case is an upper bound of
when the dispersion parameter is less than 1, and a lower bound of
when
d is greater than 1.
As graphical illustrations of the influence of
r on the optimal and approximate sampling inspection schemes,
Figure 1 and
Figure 2 show the values of the approximate and optimal sample sizes and acceptance constants, respectively, versus
r when
and
Clearly,
and
are smaller than
and
respectively, when
r is small. Otherwise,
is a practical estimate of
An application to the production of paper is now discussed to exemplify the determination of optimal sampling plans based on prior odds ratio tests. The number of impurities discovered per inspection unit is typically the most important quality characteristic in paper manufacturing. In our case, a practitioner wishes to determine the best decision rule to reject or accept large lots of 0.49 m2 sheets of paper, assuming that the number X of imperfections per sheet follows a distribution with mean
The maximal Bayesian risks that the consumer and the producer are willing to incur in the development of a test plan for lot acceptance are
and
respectively. Furthermore, the presence of sixty-five impurities is considered rejectable by the customer, whereas thirty-five blemishes per hundred sheets is deemed acceptable by the manufacturer. Thus,
and the acceptable and rejectable means are
and
Table 3 reports the optimal and approximate inspection schemes,
and
and their corresponding Bayesian risks when
and
for
and
According to
Table 3, if the acceptable and rejectable means,
and
are fixed, the optimal sample size
is reduced when the dispersion parameter
d assumed by the manufacturer and customer increases. Therefore, the required sample size in the Poisson case is a lower bound of
when the dispersion parameter is
and an upper bound of
when
For example, if
the minimal sample size
when
is a lower/upper bound of the value of
when the dispersion parameter
d is less/greater than
Clearly, the needed sample size increases when the observed random sample is over-dispersed compared to the Poisson distribution. For instance, if
the optimal sample size is
when
whereas
if
For illustrative and comparative purposes,
Figure 3 displays the optimal sample size under the frequentist perspective
and the optimal Bayesian sample size
as a function of the prior odds ratio when
and
The corresponding acceptance constants
and
are shown in
Figure 4. In view of these figures, it is evident that the Bayesian approach greatly decreases the required sample size and acceptance constant when the prior lot acceptability,
, is high; i.e., when the prior odds ratio
r is low. In the non-informative case, the best frequentist and Bayesian plans are quite similar.