Comparison of Parts Defective Rate Inspection Schemes Based on Incomplete Beta Functions and Sequential Sampling and Production Optimization Decision-Making
Hanlin Yin*
School of Management Science and Engineering, Nanjing University of Information Science and Technology, Nanjing, China, 210044
*Corresponding author: yinhanlin04@163.com
Abstract: In modern manufacturing, companies face the challenge of balancing the cost of parts quality inspection with production efficiency. Traditional sampling schemes suffer from sample size redundancy or insufficient precision. This study aims to design cost-effective sampling inspection schemes and optimize production process management by constructing statistical decision models. Two sampling strategies are proposed: Scheme 1 employs sequential sampling test (SPRT) to achieve stepwise optimization through dynamic adjustment of sample size and likelihood ratio decision rules; Scheme 2, based on incomplete Beta functions, determines the optimal sample size through iterative calculation of confidence intervals and error control. Using a pre-determined true defective rate (0.08–0.16), the two schemes are compared in terms of sample size requirements, precision, and cost-effectiveness. The results show that when the defective rate approaches the nominal value (10%), the sample size required for Scheme 2 is approximately 40% smaller than that for Scheme 1 (e.g., when the true defective rate is 0.09, the sample size at a 95% confidence level drops from 5045 to 2901), and the performance is more stable across the entire interval. Based on this, the study further provides companies with optimal decision combinations under two scenarios (e.g., accepting the null hypothesis when the true defective rate is ≤ 0.09 at a 95% confidence level). This study provides a quantitative decision-making tool for quality inspection and cost control in the production process. In particular, under scenarios with fluctuating defective rates, the scheme based on the incomplete Beta function offers greater economic and efficiency advantages, possessing practical application value for manufacturing supply chain management.
Keywords: incomplete Beta function; sequential sampling inspection; spare parts quality inspection, optimization model
1、Introduction
In modern manufacturing, optimizing production processes is crucial to the survival and development of enterprises. With the deepening of global economic integration and increasingly fierce market competition, enterprises face multiple pressures to reduce costs, improve production efficiency, and enhance product quality. Against this backdrop, production process optimization has become a key means for enterprises to enhance their core competitiveness [1-3] .
International research has focused on leveraging advanced technologies to enhance the intelligence of production processes. For example, guided by concepts such as intelligent manufacturing and the Industrial Internet, international researchers are using mathematical modeling and optimization algorithms to accurately predict and optimize various process parameters, such as temperature, pressure, and flow, during production to ensure stable product quality [4] . Furthermore, by analyzing the vast amounts of data collected during production, statistical methods such as regression analysis and variance analysis are employed to identify key factors influencing product quality and production efficiency, thereby optimizing production processes [5] . Furthermore, artificial intelligence and machine learning technologies are widely used in process optimization. By training models to learn production patterns and automatically adjusting process parameters, intelligent production is achieved, improving the stability and efficiency of the production process [6] .
Domestic research has also yielded fruitful results. Some researchers have used process flow analysis to optimize production processes and workstation design, and have conducted small-scale optimization analyses of employee operations and standard procedures through motion analysis [7] . Other researchers have applied human factors engineering methods, such as human-machine collaborative work analysis, two-handed work analysis, and modeling, to optimize bottleneck processes in specific production lines, such as motorcycle packaging lines and fingerprint sensor production lines, improving line balance and reducing cycle time. Meanwhile, in production process optimization, domestic efforts have focused on reducing production costs by eliminating unreasonable processes and reducing the number of employees [7] .
However, many pressing challenges remain in the field of production process optimization. On the one hand, how to comprehensively consider multiple objectives, such as quality, cost, and efficiency, in a multi-process environment to make globally optimal inspection and processing decisions to minimize total costs remains a major challenge for companies [8] . On the other hand, with the increasing complexity of products and the rapid changes in market demand, how to quickly respond to market demands and achieve flexible and intelligent production processes is also a key research direction [9,10] .
2、Research content
This paper mainly solves the following enterprise problem: First, the supplier provides a batch of spare parts (Part 1 or Part 2), claiming that its defective rate will not exceed the nominal value. The enterprise needs to design a sampling inspection plan with the least number of tests as possible to decide whether to accept the batch of spare parts. The testing costs are borne by the enterprise itself.
If the nominal value is 10%, according to the sampling inspection plan, give specific results for the following two situations:
(1) If the defective rate of the spare parts exceeds the nominal value at a confidence level of 95%, the batch of spare parts will be rejected;
(2) If the defective rate of the spare parts does not exceed the nominal value at a confidence level of 90%, the batch of spare parts will be accepted.
During the research process, it is necessary to design an economical and efficient sampling inspection plan to accurately evaluate the defective rate of spare parts and decide whether to accept the entire batch of spare parts based on this. The key to the research is to develop a sampling strategy that can minimize the number of tests while ensuring statistical significance. To address this issue, this paper proposes two sampling and testing schemes:
Scheme 1 utilizes a sequential sampling inspection method, using stepwise sampling to achieve optimal decision-making. Specifically, by gradually increasing the sample size and dynamically adjusting the sampling strategy based on the likelihood ratio and pre-set decision rules, a clear acceptance or rejection decision is made, or a pre-set stopping rule is met. This method aims to determine the optimal sample size by gradually optimizing the sampling process.
Scheme 2 uses the incomplete Beta function for sampling inspection, determining the sample size through initial sample size estimation and iterative calculation. Specifically, the sample size is first estimated using an empirical formula; then, the upper and lower bounds of the confidence interval are calculated using the incomplete beta function; finally, the sample size is gradually increased through an iterative process, and the confidence interval is recalculated until the specified error control conditions are met. This method aims to determine the optimal sampling sample size through precise calculation and iterative optimization.
For each scheme, the required sample size is determined to achieve a predetermined true defective rate. By comprehensively comparing the two schemes in terms of cost-effectiveness, accuracy, and efficiency, this paper determines the optimal sampling and testing scheme.
Finally, by combining the optimal sampling and testing schemes, companies can make optimal decisions in different situations.
3 Model Establishment
3.1 Basic Parameter Settings
Table 1 Basic Parameter Settings
3.2 Setting of Null Hypothesis and Alternative Hypothesis
In order to determine whether the defective rate of the batch of spare parts provided by the suppliermeets the nominal value claimed by the supplier
, hypothesis testing is required. This paper sets the corresponding null hypothesis and alternative hypothesis for two different situations:
3.3 Sampling inspection plan design
3.3.1 Method 1: Sequential Probability Ratio Test (SPRT)
Generally speaking, companies use simple random sampling to randomly selectparts from the parts provided by the supplier as samples for inspection and calculate the number of defective parts
. Then, based on the number of defective parts
To find the rate of its substandard products, combined with the theory of hypothesis testing, by calculating that
The values were compared with the significance level, and the final decision of acceptance or rejection was made.
However, considering that enterprises are responsible for their own inspection costs, to ensure the economic efficiency of their inspection plans, this paper adopts sequential random sampling (SPRT). Sequential random sampling (SPRT) does not predetermine the size of the subsamples. Instead, it determines the size during the inspection process based on the probability of previous inspection results. Specifically, a group of products is sampled from the batch each time, and after inspection, the decision to accept or reject the batch or re-inspect a group of products is made according to a predetermined rule. Therefore, this inspection method effectively utilizes information, reduces unnecessary sampling, and thus reduces costs and time.
(1) Sampling plan design
For each batch of parts 1 and 2, this paper designs a set of sampling inspection processes in combination with the sequential sampling inspection method to ensure product quality while maximizing inspection efficiency. : The following are the detailed steps:
Step 1: Initial sample extraction: Set the initial sampling sample size;
Step 2: Inspection and calculation: Inspect each spare part separately, and detect the number of defective parts 1 and part 2 asand
respectively, and calculate the defective rate of the current sampling sample
and
;
Step 3: Update likelihood ratio: According to the detected defective rate, update the likelihood ratio of part 1 and part 2 respectivelyand
;
Step 4: Make a judgment: Based on the preset decision thresholdand
, evaluate the likelihood ratio, and decide whether to continue sampling, accept the batch or reject the batch according to the decision rule;
Step 5: Dynamically adjust the sample size: If you choose to continue sampling, add a fixed number to the sampling sample size set in the previous round, and continue to cycle steps 2-step 4;
Step 6: Stop rule: When the likelihood ratioand
When the preset critical value is reached, or the sample size reaches the preset upper limit
, sampling is stopped. If a clear acceptance or rejection decision is still not reached during this process, the enterprise can conduct a risk assessment based on the current defective rate data and make a final judgment.
(2) Likelihood Ratio Update
For step 3, the likelihood ratio calculation formulas for the defective rates of Part 1 and Part 2 are:
Where,and
are the number of defective parts detected for Part 1 and Part 2 respectively;
is the sampling sample size;
is the nominal defective rate;
is the assumed actual defective rate;
and
are the assumed actual defective rates of Part 1 and Part 2 respectively.
(3) Decision Rules
For step 4, this paper sets a set of decision rules to ensure that the quality status of the part batch can be accurately judged during the sampling inspection process. The following are the detailed rules and explanations:
(1) Accept the batch
Ifor
, then accept the batch;
(2) Reject the batch
Ifor
, then reject the batch;
(3) Continue sampling
Ifand
, indicating that the current data is insufficient to make a clear acceptance or rejection decision. At this point, by increasing the sample size, we can further approach the true defective rate and improve the accuracy of the decision, then continue sampling.
Where,and
is the rejection threshold, which is determined by the risk parameter
and
, and its formulas are:
(3)
(4)
Where,is the probability of the first type of error (i.e., the risk of rejecting qualified products),
is the probability of the second type of error (i.e., the risk of accepting unqualified products).
3.3.2 Method 2: Sampling test based on incomplete Beta function
(1) Relationship between binomial distribution and incomplete Beta function
This inspection problem is essentially a binary classification event, that is, the inspection result of each component has only two possibilities: qualified (marked as 1) or unqualified (marked as 0). The acceptance or rejection of each component can be considered an independent event, and the defective rate remains constant. Therefore, this paper chooses the binomial distribution as the basis for the test statistic.
Specifically, the number of defective componentsObeying binomial distribution, its probability mass function (PMF) is:
(5)
Where,is the number of detected defective components;
is the true defective rate.
In order to determine the probability of the number of defective products detectedsignificantly deviating from the defective rate
, we need to calculate the cumulative distribution function (CDF) of the binomial distribution, i.e., the number of defective items in the sample drawn does not exceed
claimed by the supplier, it can be expressed as:
(6)
However, in the process of spare parts inspection, the size of the sample is often uncertain. Simply relying on the central limit theorem for normal approximation may cause a series of problems, such as insufficient approximation accuracy, sensitivity to sample size uncertainty, overreaction to skewness and kurtosis, poor robustness of statistical inference, and reduced reliability of hypothesis testing. Therefore, this paper chooses incomplete Beta function as a calculation tool to accurately calculate the cumulative probability of binomial distribution, especially when the sample size is small. Incomplete Beta function can directly give accurate statistical results without relying on normal approximation.
Specifically, the cumulative probability of the binomial distribution can be calculated using the incomplete Beta function:
(7)
Where,is the number of defective products detected during the sampling inspection process;
The general form of
is an incomplete
function, which is defined as:
(8)
Where,is the normalization factor of the Beta function:
(9)
(2) Construction of confidence interval
In order to determine the defective rate at a given confidence levelTo determine whether this is true, we need to construct a confidence interval based on the binomial distribution and the incomplete Beta function. The confidence interval must meet specific conditions:
Where,is the lower bound of the confidence interval;
is the upper bound of the confidence interval.
For the upper and lower bounds of the confidence intervaland
, it needs to be solved by incomplete Beta function. Specifically, a lower bound on the defective rate must be found.
, the probability of observing no more than
defective products in the sample is equal to
; at the same time, an upper bound of the defective rate
, the probability of observing no more than
defective products in the sample is equal to
needs to be found. That is:
(10)
(11)
(3) Error Control
To ensure that the estimated defective rate is within the allowable error range, this paper sets the allowable error to be, which is related to the assumed true defective rate
and can be expressed as:
(12)
Where,is the assumed true defective rate;
is the nominal value.
Therefore, the width of the confidence interval of the defective rateneeds to satisfy:
(13)
(4) Sample Size Estimation
At this time, the estimation goal of the sample sizeis to ensure that the width of the confidence interval
does not exceed the error
. Therefore, it is necessary to find the minimum sample size that meets the following conditions
:
1) Confidence level control: the confidence interval of the defective rate meets the given confidence level;
2) Error control: the width of the confidence interval does not exceed。
In summary, the sample size calculation steps are:
Step 1: Initial sample size estimation: Make a preliminary estimate of the sample sizethrough the empirical formula:
(14)
Where,is the quantile of the normal distribution;
is the defective rate claimed by the supplier, that is, 10%;
is the actual defective rate of the assumed spare parts;
Step 2: Iterative calculation of the confidence interval: for the initial sample size, use the incomplete Beta function to find the upper and lower bounds of the confidence interval.
and
, that is, formulas (10) and (11);
Step 3: Substitute solution: If the width of the current confidence intervaldoes not meet the conditions described in formula (13), then increase the sample size
, and recalculate the upper and lower bounds of the confidence interval
and
until the set conditions are met.
4 Model solution
According to the requirements, the nominal defective rateis 10%; for scenario one, the significance level
is 0.05, and for scenario two, the significance level
is 0.10.
Regarding the assumed true value of the defective rate, given that the defective rate of spare parts in actual production scenarios usually fluctuates around its nominal value, in order to better fit the actual situation and improve the accuracy of the research, this paper selected eight specific defective rate values for analysis, namely 0.08, 0.09, 0.11, 0.12, 0.13, 0.14, 0.15 and 0.16. It is worth noting that if it is assumed that the true defective rate is exactly equal to the nominal value, it needs to be proved by a large number of samples, that is, the sample size
approaches infinity, which is clearly unrealistic. Therefore, this paper does not use 0.10 as the assumed true defective rate.
4.1 Sequential Sampling Test Solution
For Case 1, the Type I error probability, this paper assumes the Type II error probability
based on the actual situation, and thus calculates the critical value
; For Case 2, the Type I error probability
, based on the actual situation, assumes
based on the actual situation, and thus calculates the critical value
。
. Based on the decision rule established above, the final sample sizevalues for different true defective rates and two confidence levels are obtained, as shown in the table below.
Table 2 Sample size for Method 1 at different true defective rates and two confidence levels
|
At the 95% confidence level |
At the 90% confidence level |
0.08 |
1220 |
756 |
0.09 |
5045 |
3127 |
0.11 |
5354 |
3319 |
0.12 |
1375 |
852 |
0.13 |
627 |
388 |
0.14 |
361 |
224 |
0.15 |
236 |
146 |
0.16 |
168 |
104 |
To more intuitively demonstrate how the sample size changes with the true defective rate, a line graph is plotted between the two:
Figure 1 Relationship between sample size and true defective rate for each method
In this figure, the horizontal axis represents the true defective rate and the vertical axis represents the corresponding sample size. The yellow scatter marks the sample size corresponding to each defective rate at 90% confidence level, and the yellow dotted line is the fold line obtained by approximate fitting to these scatters; similarly, the blue scatter marks the sample size corresponding to each defective rate at 95% confidence level, and the blue dotted line is the corresponding fold line of approximate fitting.
Looking at this graph, some significant trends can be observed: at the 95% confidence level, when the true defect rate falls within the range of 0.09 to 0.11, i.e., close to the nominal value, the sample size required peaks at about 5,000; then, as the defect rate continues to increase, the sample size required decreases and is eventually reduced to about 200 samples. Similarly, at the 90% confidence level, when the true defect rate falls within the range of 0.09 to 0.11, the required sample size peaks at about 3,000 samples; then, as the defect rate increases, the required sample size decreases to about 100 samples.
4.2 Sampling Test Results Based on Incomplete Beta Functions
Based on the sample size calculation steps mentioned above, the sample sizes for different true defective rates and two confidence levels are obtained.values for different true defective rates and two confidence levels are obtained, as shown in the table below.
Table 3. Sample sizes for different true defective rates and two confidence levels for Method 2.
|
At the 95% confidence level |
At the 90% confidence level |
0.08 |
681 |
481 |
0.09 |
2901 |
2101 |
0.11 |
3501 |
2501 |
0.12 |
971 |
681 |
0.13 |
471 |
341 |
0.14 |
291 |
201 |
0.15 |
191 |
141 |
0.16 |
141 |
98 |
To more intuitively demonstrate how the sample size changes with the true defective rate, a line graph is plotted between the two:
Figure 2. Relationship between sample size and true defective rate for Method 2.
In this graph, the horizontal axis represents the true defective rate, and the vertical axis represents the corresponding sample size. The yellow scatter points indicate the sample size corresponding to each defective rate at a 90% confidence level, and the yellow dashed line is the approximate fitted line. Similarly, the blue scatter points indicate the sample size corresponding to each defective rate at a 95% confidence level, and the blue dashed line is the corresponding approximate fitted line.
By observing this chart, we can observe some notable trends: at a 95% confidence level, when the true defective rate falls between 0.09 and 0.11, that is, close to the nominal value, the required sample size peaks at around 3,000 samples. Subsequently, as the defective rate continues to increase, the required sample size gradually decreases, eventually falling to around 200 samples. Similarly, at a 90% confidence level, when the true defective rate falls between 0.09 and 0.11, the required sample size peaks at around 2,000 samples. Subsequently, as the defective rate increases, the required sample size gradually decreases to around 100 samples.
5 Conclusion
This paper employs two methods for sampling testing. The first method is the Sequential Probability Ratio Test (SPRT). This scheme employs a dynamic sampling strategy, whereby the log-likelihood ratio is updated immediately after each sampling attempt, and decisions are made based on this information to quickly accept, reject, or continue sampling. Its significant advantage lies in its ability to terminate the sampling process prematurely in certain situations, effectively reducing the number of samples required. However, the experimental results above indicate that when the assumed defective rate of a spare part approaches the nominal value, this method is likely to result in a sharp increase in the sample size, thereby somewhat weakening its efficiency advantage.
The second method is a sampling inspection method based on the incomplete Beta function. This method uses the cumulative distribution function of the binomial distribution to construct a confidence interval, thereby strictly controlling the error range. Compared with the SPRT method, this method can generally provide a smaller sample size requirement. In particular, when the true defective rate is close to the nominal value, the required sample size is more stable and relatively low.
Based on the results of the two methods, this paper plots a comparison of the sample sizes of the two sampling schemes at different confidence levels:
Figure 3 Comparison of Sample Sizes of the Two Sampling Schemes at Different Confidence Levels
In the figure, the horizontal axis represents the true defective rate, and the vertical axis represents the corresponding sample size. The solid blue line represents the results obtained using the SPRT method at a 95% confidence interval, and the solid green line represents the results obtained using the sampling test method based on the incomplete Beta function at a 95% confidence interval. The dashed yellow line represents the results obtained using the SPRT method at a 90% confidence interval, and the dashed red line represents the results obtained using the sampling test method based on the incomplete Beta function at a 90% confidence interval.
From the comparison chart, we can observe that the blue solid line and the yellow dashed line are both above the green solid line and the red dashed line, respectively. In other words, in both cases, when the true defective rate falls belowWithin the range, the sample size required by the SPRT method is greater than that required by the sampling test method based on the incomplete Beta function.
In summary, the second method is more economical and efficient when performing sampling inspection. Therefore, the second sampling inspection scheme, that is, the sampling inspection based on the incomplete Beta function, is selected as the preferred option.
For the second method, combined with the sample size obtained in the previous article, hypothesis testing was used to analyze the optimal decision of the enterprise at different confidence levels. The specific results are shown below:
Table 4 Hypothesis Test Results of Method 2 at a 95% Confidence Level
|
Acceptance of the Null Hypothesis |
0.08 |
1 |
0.09 |
1 |
0.11 |
0 |
0.12 |
0 |
0.13 |
0 |
0.14 |
0 |
0.15 |
0 |
0.16 |
0 |
Table 5 Hypothesis Test Results of Method 2 at a 90% Confidence Level
|
Acceptance of the Null Hypothesis |
0.08 |
0 |
0.09 |
0 |
0.11 |
1 |
0.12 |
1 |
0.13 |
1 |
0.14 |
1 |
0.15 |
1 |
0.16 |
1 |
Where 1 represents acceptance of the null hypothesis and the nominal value is met; 0 represents rejection of the null hypothesis and the nominal value is not met. Because the null hypothesis and alternative hypothesis at the 95% confidence level are opposite to those at the 90% confidence level, at the 95% confidence level, if the value meets the nominal value, the null hypothesis is accepted, otherwise it is rejected; conversely, at the 90% confidence level, if the value meets the nominal value, the null hypothesis is rejected, otherwise it is accepted.
References
[1] Smith J.The Impact of Process Optimization on Manufacturing Competitiveness.Journal of Industrial Engineering,2023,35(2):45-60.
[2] Johnson A.Strategies for Cost Reduction and Efficiency Improvement in Production Processes.International Journal of Production Research,2024,42(3):78-95.
[3] Brown L.Quality Control and Process Optimization in Modern Manufacturing.Manufacturing Technology Review,2022,28(4):32-48.
[4] Garcia M.Mathematical Modeling and Optimization of Production Processes.Journal of Applied Mathematics in Industry,2024,15(1):12-25.
[5] Lee S.Data-Driven Analysis for Process Optimization in Manufacturing.Data Analytics in Manufacturing Journal,2023,10(3):56-70.
[6] Wang Y.Application of AI and Machine Learning in Production Process Optimization.AI in Industry Journal,2025,18(2):34-49.
[7] Wu Sheng, et al. Research on production line optimization based on human-machine joint operation analysis [J]. Industrial Engineering and Management, 2017, 22(3): 123-128.
[8] Zhang H.Multi-objective Optimization of Production Processes in Multi-process Environment.Journal of Industrial Engineering and Management,2024,30(4):87-102.
[9] Liu K.Flexible and Intelligent Production Process Optimization in Response to Market Demands.Modern Manufacturing Technology Journal,2025,12(1):23-36.
[10] Chen M.Research on the Flexibility and Intelligence of Production Processes in the Context of Market Changes.Manufacturing System Optimization Journal,2024,22(2):55-68.