Sequential Sampling Plan Calculation - Computer program formula

C

CristianoP

#1
I wrote a computer program to simulate the inspection of a lot using a sequential sampling plan.

Unfortunately, I cannot post links, but the literature says:

p1= AQL
p2= LTPD
a or alpha= Producer's Risk
b or beta= Consumer's Risk

k=log(p2*(1-p1)/p1/(1-p2))
h1=log((1-a)/b)/k
h2=log((1-b)/a)/k
s=log((1-p1)/(1-p2))/k

The acceptance number is: xa = s*n-h1,
while the rejection number is: xr = s*n+h2
n is the number of samples taken from the lot.

In the NIST's handbook chapter 6.2.6 there is an example with:
p1 = .01, p2 = .10, alpha = .05, beta = .10.

I simulate the inspection of a lot with exactly p1 defectives, so that I should get a rejection rate very close to alpha (which is the probability of rejecting a lot that has a defect level equal to p1).

I run the simulation for 10^6 lots and I get alpha = 0.0193 instead of 0.05 as expected, while beta is good (0.095 instead of 0.1).

But if I run the simulation using alpha = 2 * alpha, I get alpha = 0.0473, in good agreement with the expected value (beta is still good: 0.093).

That happens with any alpha, beta, p1 and p2. Why?

Thank you and sorry for my English :)
Cristiano
 
Elsmar Forum Sponsor

Marc

Hunkered Down for the Duration with a Mask on...
Staff member
Admin
#2
Can anyone help with this? If so, my appreciation in advance!
 
C

ChinYF

#3
Information from Jstor note from A.M.Walker that the formula is different from yous.
Acceptance number is: xa = s*n+h1,
Rejection number is: xr = s*n-h2
this may help.
Regards
 
C

CristianoP

#4
I guess that they use a different formula for h1 and h2 because if I use their formula, I get xa > xr (which is impossible).

Cristiano
 
Thread starter Similar threads Forum Replies Date
P Individuals Chart for Non-Sequential Data - Random Sample without Reference to Time Statistical Analysis Tools, Techniques and SPC 4
H Rolled Throughput Yield (RTY) Calculations for a Sequential Process Six Sigma 2
N APQP phases, sequential or in parallel? APQP and PPAP 8
J IVD sampling sizes for buyer Reliability Analysis - Predictions, Testing and Standards 0
S Which Sampling Plan(s) Should I Use? Inspection, Prints (Drawings), Testing, Sampling and Related Topics 7
C Sampling - ISO 16269-6 vs ISO 2859 Other ISO and International Standards and European Regulations 0
L Sampling Plan Risks AQL - Acceptable Quality Level 6
A Sampling plan for in-process QC (medical devices) Inspection, Prints (Drawings), Testing, Sampling and Related Topics 13
M Minitab Capability of the Population (no sampling) Using Minitab Software 11
W LTPD, AQL, Ppk and Cpk validation sampling plan table Inspection, Prints (Drawings), Testing, Sampling and Related Topics 0
Q Sampling method for Distributor verification activities EU Medical Device Regulations 1
E Change in control plan - Do I have to do sampling? IATF 16949 - Automotive Quality Systems Standard 1
S Is using ANSI/ASQ Z1.4-2008 the correct sampling plan to determine Pass/Fail of Apparel measurements? AQL - Acceptable Quality Level 4
N Sampling Plan for Internal Audits - ISO 2859 or 3951 - Or Neither? Internal Auditing 6
F Product audit sampling plans IATF 16949 - Automotive Quality Systems Standard 3
R Reduced sampling plan for sterial products APQP and PPAP 0
A ISO 2859-1 - 9.3.3.2 Switching score - Sampling Plans and PPM AQL - Acceptable Quality Level 0
R BS EN 12060:1998 - Zinc and zinc alloys Method of sampling Specifications Manufacturing and Related Processes 4
S High voltage testing - ISO 17025 - 7.2.2 Validation of methods and 7.3 Sampling ISO 17025 related Discussions 3
8 Activity Sampling Exercise Lean in Manufacturing and Service Industries 11
T Defining sampling plan for different AQL AQL - Acceptable Quality Level 3
B AS9100D Sampling Plan AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 2
R Design verification for interim design outputs - sampling rationale ISO 13485:2016 - Medical Device Quality Management Systems 2
Nicole Desouza Sampling plan for a customer who wants AQL 1.0 (per ANSI Z1.4) AQL - Acceptable Quality Level 5
V How to interpret AQL sampling tables AQL - Acceptable Quality Level 5
A AQL sampling bags of parts Inspection, Prints (Drawings), Testing, Sampling and Related Topics 5
C Applying Weibayes to Attribute sampling Reliability Analysis - Predictions, Testing and Standards 0
I Sampling processes - Who must define the AQL level? AQL - Acceptable Quality Level 9
E Sampling for capability studies for variables and attributes Capability, Accuracy and Stability - Processes, Machines, etc. 4
O Statistical justification of sampling size in V&V tests ISO 13485:2016 - Medical Device Quality Management Systems 5
M Sampling Plan for Alumin High Pressure Die Castings Manufacturing and Related Processes 0
E Sampling plan for orthopedic implant - Process Validation Inspection, Prints (Drawings), Testing, Sampling and Related Topics 4
S Inspection/sampling economics Inspection, Prints (Drawings), Testing, Sampling and Related Topics 3
S How to make a Sampling Plan - Conveyor belts Inspection, Prints (Drawings), Testing, Sampling and Related Topics 4
V Statistical basis and justification while comparing / changing sampling plans Gage R&R (GR&R) and MSA (Measurement Systems Analysis) 11
J AQL for Effectiveness Check - What AQL tiers to use on this type of sampling? Nonconformance and Corrective Action 9
N The question asks about sampling plans and AQL Reliability Analysis - Predictions, Testing and Standards 5
S Help develop sampling plan for prototype samples (medical devices) Statistical Analysis Tools, Techniques and SPC 7
A ISO 2859 Single Sampling - Clarification regarding the sampling table Inspection, Prints (Drawings), Testing, Sampling and Related Topics 4
C Are zero defect sampling plans relevant to AS9120B Distributor AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 4
R DCMA Sampling of CSI Parts AS9100, IAQG, NADCAP and Aerospace related Standards and Requirements 4
D Sampling method that is representative of the devices supplied by that distributor EU Medical Device Regulations 5
T ISO 13485: 2016 Internal Audit - Is sampling on projects allowed? ISO 13485:2016 - Medical Device Quality Management Systems 6
M Zero Defect Sampling Plan Standards Inspection, Prints (Drawings), Testing, Sampling and Related Topics 4
L ISO 2859-2 LQL sampling plan linked to %confidence/%reliability Inspection, Prints (Drawings), Testing, Sampling and Related Topics 2
K Sampling Plan for transparent tubular plastic parts from 32 different cavities Inspection, Prints (Drawings), Testing, Sampling and Related Topics 3
M ISO / ASTM standards for Sampling Plans for Medical Devices Inspection, Prints (Drawings), Testing, Sampling and Related Topics 1
N Sampling for stability studies - Class II surgically invasive devices Other Medical Device and Orthopedic Related Topics 1
S Surveillance Sampling Test - Determining Sample Size Inspection, Prints (Drawings), Testing, Sampling and Related Topics 5
A AQL Sampling Plan SOP / WI - Medical Device Industry Inspection, Prints (Drawings), Testing, Sampling and Related Topics 14

Similar threads

Top Bottom