Results: Monte Carlo Simulation of Acceptance Sampling Plan

reynald

Quite Involved in Discussions
#1
I have been meaning to do this for personal reference so it feels good to finally have the results. I'm posting it here for everyone's reference and for my future me since I'm sure I would misplace the file later so to make sure I could at least search it on the internet, here it goes.
--------------------------------------------------------------------------
Monte Carlo Simulation of Acceptance Sampling Plan

Background:
Sometimes people get confused why their acceptance sampling plan somehow did not capture a defective item and was shipped to the customer. Here is my take on that matter.

Objective:
To examine using Monte Carlo simulation approach the performance of attribute acceptance sampling plan given batch size of 3200 items, sample size of 125 (MIL-STD-105E: General Inspection Level 2, AQL = 0.1).

Methods:
1. Random numbers were generated using SAS's JMP random number utility. 1,000 columns each having 3200 rows were generated containg a random events pass/fail that follows a Bernoulli distribution with parameter P. This generated table would represent the Population Data where each column representing a distinct period in time.

2. From the generated table above, a random sample of 125 rows will be taken. Each row will be then summarized as either containing a "fail" entry or not. For those columns where "fail" were sampled, a judgment of "batch failed" will be given. For those columns where "fail" were not sampled, a judgement of "batch passed" will be given.

3. Of the interest of this simulation is the examine the response of percent batch_failure as a function of the Bernoulli distribution parameter P.

4. The simulation would be run for the following Bernoulli distribution parameter P = { 0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05, 0.1}. For each value of P, three runs would be made to be able to have a feel on the standard deviation of the results.

Results:
Here are the results of the Simulation
Screen Effectiveness Results
(Percent Trapped* by the Sampling Plan given True Defective Level P):
P************ Trial1************ Trial2************ Trial3
0.0001************ 0.8%************ 1.4%************ 1.5%
0.0005************ 5.7%************ 6.1%************ 5.3%
0.001************ 12.6%************ 12%************ 10.9%
0.005************ 49%************ 45.8%************ 47.3%
0.01************ 71.4%************ 70.7%************ 72.3%
0.05************ 99.8%************ 99.9%************ 100%
AQL= 0.1************ 100%************ 100%************ 100%
*(This means Escapee = 100% - Percent Trapped)


Conclusion:
As has been mentioned many times in several threads in this Forum, Acceptance Sampling assures only that no more than a level P = AQL would reach the customer. Below that level of P, just live with the fact that escapees are inevitable.


Reference:
JMP Code that was used to Generate the Results
PHP:
dt = New Table("Population Data");
p = 0.0001;     //--->You can change this value
i = 1;
fail=0;
end_column = 1000; //----->I will be generating 1000 columns of random numbers
For( i = 1, i <= end_column, i++,
	dt << New Column( Char( i ), formula( If( Random Uniform() < ::p, 1, 0 ) ) )
); //---> 1 means Defective, 0 means Good



dt << add rows( 3200 );       //------------->Each column would have 3200 rows

dt_samples = dt << Subset( Output Table( "Samples" ), Sample Size( 125 ) );


j=1;
For( j = 1, j <= end_column, j++,
if(
	Col Max( column(dt_samples,j))>0, fail=fail+1,print(fail)
	//Note: If I see at least 1 Defective, the sampling plan fails the batch
	)
);


print("There are " ||  char(fail) || " samples that failed. That is "||char(round(100*fail/end_column,1))|| "% failure rate.");
 
Elsmar Forum Sponsor

Bev D

Heretical Statistician
Staff member
Super Moderator
#3
Well, I'm not really sure hwo teh actul analysis was done, but the following statement is not accurate:
"Acceptance Sampling assures only that no more than a level P = AQL would reach the customer"

The definition of AQL (Acceptable Quality Level) is actually the level that if present would be ACCEPTED and therefore shipped to the Customer 95% of the time (or some other % dependign on how you specify Alpha or the Producer's risk.)

So you can have a defect rate higher than the AQL that will routinely be missed and therefore reach the customer, at lesser and lesser probability as the defect rate increases unitl it reaches the RQL (aka LTPD) level. At which point the chance of accepting the lot is less than 5% (or 10% dependign on how you specifiy Beta also known as the Consumer's risk)

The names say it all. AQL protects the producer from over rejecting lots with an ACCEPTABLE defect rate. RQL protects the Customer from lots with an unacceptable defect rate.


Reynald has capured the essence of the 'fallibility' of sampling in that no sample plan can guarantee that no defects will reach the customer.

seems the model he used may be wrong?
 
S

supreecha

#4
:agree:Acceptance Sampling by Attributes

Measurement type: Go/no go
Lot quality in percent defective
Lot size: 3200
Use binomial distribution to calculate probability of acceptance


Acceptable Quality Level (AQL) 0.1
Rejectable Quality Level (RQL or LTPD) 10


Compare User Defined Plan(s)

Sample Size 125
Acceptance Number 0

Accept lot if defective items in 125 sampled <= 0; Otherwise reject.


Percent Probability Probability
Defective Accepting Rejecting AOQ ATI
0.1 0.882 0.118 0.085 486.5
10.0 0.000 1.000 0.000 3200.0

Average outgoing quality limit (AOQL) = 0.282 at 0.794 percent defective.
 

Attachments

Thread starter Similar threads Forum Replies Date
lanley liao How to understand this words that the planning of internal audit shall take into consideration the results of previous audits? Oil and Gas Industry Standards and Regulations 10
Nihls When the MSA results show no operator influence Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 3
Q IATF audit - Root Cause Analysis results IATF 16949 - Automotive Quality Systems Standard 5
P Ppk results shown as asterisk after the transformation of Non-normal data Using Minitab Software 4
S Documenting Design Verification Test Results (ISO 9001) Design and Development of Products and Processes 1
A MSA results differences - Supplier results vs. My results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 1
J Audit Finding For Not Retaining Test Results ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 7
F ISO 17025:2017 Clause 7.7 Ensuring the validity of results - Threshold ISO 17025 related Discussions 9
P AS9102 Form 3 Dimension Results Inspection, Prints (Drawings), Testing, Sampling and Related Topics 1
H Graphical analysis of results - Confidence level bands nomenclature Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 2
G What information to put on measurement Dimensional Results APQP and PPAP 7
A Calibration Certificate Results General Measurement Device and Calibration Topics 3
F Measurement Audit and ILC for ISO 17025 Clause 7.7.2 - Comparison with results of other laboratories ISO 17025 related Discussions 0
KCalaba21 ISO 9001:2015 6.2.2 E - "e) how the results will be evaluated." ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 3
S AS9100D PEAR - Examples for organization's method for determining process results? AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 5
shimonv Referring to previously submitted biocompatibility results in a new 510(k) submission Other US Medical Device Regulations 1
J ISO 17025 - Please share a sample procedure for monitoring the validity of results ISO 17025 related Discussions 1
A Acceptance p-value for linearity and bias analysis in minitab results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 0
Marc European universities dismal at reporting results of clinical trials - 2019 Other Medical Device Regulations World-Wide 0
T Final process capability results - What I am supposed to present? Cp and CpK? APQP and PPAP 11
V Recording CMM dimensional results on CFG-1003 APQP and PPAP 3
Prashant G AS9100 Requirement - Verification of characteristics results with drawing requirements AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 13
A Supplier Audit Results - when do you prepare? General Auditing Discussions 10
U ISO 17025:2017 Clause 7.7 Ensuring the Validity of Calibration Results ISO 17025 related Discussions 6
M FDA News FDA Safety communication – Interim Results of Duodenoscope Reprocessing Studies Conducted in Real-World Settings Medical Device and FDA Regulations and Standards News 0
A Definition Intended Results - What does "Intended Results" mean? Definitions, Acronyms, Abbreviations and Interpretations Listed Alphabetically 4
G ANOVA GR&R: Minitab vs AIAG MSA results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 7
G ISO 9001:2015 - Management Review 9.3.2 c) 5) - Monitoring and Measurement Results ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 7
R Tensile Test Strain Rate - Impact on the Test Results Manufacturing and Related Processes 3
K Taguchi Experiments for Factorial Design Analysis - Reliability of Minitab Results Using Minitab Software 1
B How to interpret Grindometer Gage R&R Results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 1
J What results need to be defined in IATF 16949 Clause 8.3.4 IATF 16949 - Automotive Quality Systems Standard 3
C Leveraging previous results in IQOQs - Environmentally Controlled Room 21 CFR Part 820 - US FDA Quality System Regulations (QSR) 4
W MR Inputs (9.3.2) - "Monitoring and Measurement Results" vs. "Process Performance" Management Review Meetings and related Processes 8
S Is it mandatory to provide the results of the validation report in handwriting? ISO 13485:2016 - Medical Device Quality Management Systems 5
Ajit Basrur CDRH Customer Satisfaction Results at 87% US Food and Drug Administration (FDA) 1
T Results from conducting a Capability Studies Statistical Analysis Tools, Techniques and SPC 4
V CMQ/OE exam results - March 7 2015 Professional Certifications and Degrees 10
W Results of the ASQ CSSBB Exam March 07 2015 Professional Certifications and Degrees 62
T OES Global Results Drift Quality Manager and Management Related Issues 1
Ron Rompen Quick question on results of Student-t test Statistical Analysis Tools, Techniques and SPC 7
G Interpreting Type 1 MSA (Measurement Systems Analysis) Results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 4
L Release of Audit Results Report to 3rd Party ISO 9000, ISO 9001, and ISO 9004 Quality Management Systems Standards 6
M ANOVA for S/N ratio gives different results Statistical Analysis Tools, Techniques and SPC 5
V Analysing Results after DOE Using Minitab Software 1
B Tolerance Calculator Based on R&R Results Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 2
C How to handle Action Results in a new FMEA Review once we have a new RPN? FMEA and Control Plans 1
V Analysis of DOE Results and Model Finalization Using Minitab Software 4
B MSA (Measurement System Analysis) - Results and Actions Taken Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 12
B NDC - Gauge R&R Studies with results where NDC = 1 or 0 Manufacturing and Related Processes 1

Similar threads

Top Bottom