John Zorich, MS CQE


 Chad Michael Cannon
 6 days ago
 Views:
Transcription
1 Used In Nonclinical Inspection & Test In the Pharma & Meddevice Industries John Zorich, MS CQE Outline of topics: Regulatory Requirements Basic Vocabulary Confidence Intervals Statistical Process Control (SPC) Confidence / Reliability Calculations Process Capability Indices Mean Time Between Failures Tests of Statistical Significance QC Sampling Plans Examples of Valid Statistical Rationale statements 1
2 Regulatory Requirements 21CFR211 (2016) Stability Testing...shall include...sample size... based on statistical criteria... FDA s Guidance for...process Validation (2011) The number of samples should be adequate to provide sufficient statistical confidence of quality both within a batch and between batches. The confidence level selected can be based on risk analysis as it relates to the particular attribute under examination. ICH Harmonised Tripartite Guideline Quality Risk Management, Q9 (2005) The following statistical tools are recommended to support and facilitate quality risk management : [statistical process] control charts process capability analysis Regulatory Requirements FDA's "GMP" (21CFR ) Sampling plans...shall be...based on a valid statistical rationale... FDA's "Medical Device Quality Systems Manual" "...all sampling plans have a builtin risk of accepting a bad lot. This sampling risk is typically determined... by...the 'operating characteristic [OC] curve [which]...can be used to determine the risk a sampling plan presents... A manufacturer shall be prepared to demonstrate the statistical rationale for any sampling plan used. ISO 13485: , Design & Development Verification 7.3.7, Design & Development Validation Records of the results and conclusions...including, as appropriate, rationale for sample size...shall be maintained. 2
3 is a mathematical summary value calculated from data taken from a Sample. All of the following are statistics: Avg thickness of every 100th cable produced last week. Range of thicknesses in that sample Median thickness in that sample. is a mathematical summary value calculated from data taken from the entire Population; that is, every data point in the entire population (e.g., average thickness of all cables produced last week). "Statistics" as a science is the mathematical analysis of "statistics", not of parameters. Statistics is the science of using "statistics" to guesstimate "parameters". is part of a The purpose of obtaining information about the sample statistic (e.g., Average, Std Deviation, or % inspec) is that we trust that it will give us information about the population parameter (which is what we really care about). 3
4 (they are the basis of most statistical methods) 95% Confidence Interval ( & Limits) Sample Mean A 95% confidence interval is an interval around the observed mean of a sample, in which interval you can expect (95% of the time) to find the true mean (= parameter) of the population from which the sample was taken. Confidence Limits are the values on either end of the interval. 4
5 Where is the true mean ( = the Parameter Mean)? Answer: Somewhere in Confidence Interval (at the chosen confidence level, typically 95%). Sample Mean Confidence interval based on a LARGE samplesize Confidence interval based on a MEDIUM samplesize Confidence interval based on a SMALL samplesize The choice of sample size is arbitrary, based upon how narrow you want the confidence interval ( i.e. how accurately you want to know the parameter). Because confidence limits are automatically adjusted based upon sample size, ANY sample size is valid!! Confidence Limits for Sample Average Standard Error of the (sample) Mean ( estimated from 1 sample ) Sample Standard Deviation Sample Size. 95% confidence interval for the Population Mean can be estimated using this equation: Sample Average + / " t " x (Std Error of Mean) 5
6 This table provides the t used to calculate Confidence Intervals; for 2sided, use A = 1 Confidence For 1sided confidence interval limits, use A = 2 x ( 1 Confidence) " v " or "d.f. (= degrees of freedom ) is commonly equal to the denominator in the calculation of the relevant standard deviation (e.g., the classic sample standard deviation has n 1 = Sample_Size 1 in its denominator. Confidence Limits for Sample Proportions, % Over a dozen different methods exist for calculating confidence limits for sample % defective  each of those methods gives a different length & different conf. limits!!! The classic method is called the Exact binomial  it can be calculated via Excel's "Beta" function  for example: UPPER 2tailed Confidence Limit =beta.inv( 1 (1 C ) / 2, k + 1, N k ) LOWER 2tailed Confidence Limit =beta.inv((1 C ) / 2, k, N k + 1 ) C = Confidence N = Sample size (e.g., 100 ) k = observed number of items of interest, e.g. defectives) 95% conf. limits for observed 10 defects in sample size = 100 beta.inv( 1 (1 0.95) / 2, , ) = = 17.6% beta.inv( (1 0.95) / 2, 10, ) = = 4.9% 6
7 Onesided confidence limits are calculated like so: UPPER 1tailed Confidence Limit =beta.inv( C, k + 1, N k ) LOWER 1tailed Confidence Limit =beta.inv( 1 C, k, N k + 1 ) 95% 1sided limits for observed 10 defects when N = 100 upper = beta.inv( 0.95, , ) = lower = beta.inv( , 10, ) =
8 Harold F. Dodge: He helped invent SPC when he worked in the QA department at Bell Laboratories from 1917 to Of his early experiences Dodge wrote: Initially, the basic procedures for variables called for samples of four, with one [SPC] chart for the average, and another for the standard deviation... We proposed shop use of samples of five instead of four; it is easier to divide by five than by four." That text is from: SPC Xbar charts with normally distributed data (ANY sample size is valid because the Control Limits are simply 2sided 99% confidence limits on current process mean) 125 n = 2 n = 4 n =
9 where Reliability means % inspecification (these are a type of process capability calculation) Sample Sizes Because the output of reliability/confidence calculation is a lower 1sided confidence limit... Any sample size is valid, because the smaller the sample size, the farther away from the observed %inspec is the %inspec that you can claim. 90% 100% Confidence limit based upon small sample Confidence limit base upon large sample % reliability observed in sample 9
10 ATTRIBUTE DATA: (i.e., Pass/Fail testing, not measurements results) Reliability = beta.inv ( 1 C, N F, F + 1 ) where... beta.inv = Microsoft Excel function C = Confidence desired (expressed as a decimal fraction) N = sample size F = # of failures seen in the sample That formula outputs the lower 1tailed "exact" binomial confidence limit on % inspecification observed in the sample. If no failures in a sample of 299, then 95% confidence in... =beta.inv( , 299 0, ) = 0.99 = 99% reliability If 2 failures in a sample size of 30, then 95% confidence in... =beta.inv( , 30 2, ) = 0.80 = 80% reliability Why does a sample of 299, with zero failures, equal 95% confidence of at least 99% reliability? A reliability calculation on a binomial proportion is, in effect, a lower 1sided confidence limit on the observed proportion. It's the lowermost edge of the interval in which we predict we will find the true ("parameter") proportion. We are 95% sure that the Parameter is somewhere in this interval 98% 99% Lower 1tailed 95% Confidence Limit on Sample Statistic, when N = 299 and no failures are found in sample. 100% For reliability, we get to claim the worst value in that interval (in this case, 99%) Sample Statistic 10
11 VARIABLES DATA Normally Distributed (or transformed to Normality) Kfactor table a.k.a., Normal Tolerance Factor table, or... Statistical Tolerance Factor table Procedure is: Calculate the Observed K Compare the Observed K to the K in the Ktable. Observed K = number of Std Deviations that the Process Mean is from nearest side of a 1 or 2sided specification, i.e., (SmplAvg NearestSpecLimit) SmplStdDev Juran's QH confidence reliability K If the "observed K" is at least 3.520, & the population is "Normally Distributed, & sample size is 15, then we are 95% confident that the Lot from which the sample came has at least 99% inspec parts. 11
12 Why does a sample of 15, with whose average is 3.52 std dev s away from a 1sided QC spec, equal 95% confidence of at least 99% reliability? A reliability calculation on a sample from a Normal population is, in effect, a lower 1sided confidence limit on the observed % inspec. We are 95% sure that the Parameter % inspec is somewhere in this interval 98% 99% 99.98% For reliability, we get to claim the worst value in that interval (in this case, 99%) When sample Avg is 3.52 stdevs from the onesided spec, can claim 99% reliability at 95% confidence. Observed Sample Statistic: =NORMSDIST(3.52) = % inspec but no confidence can be claimed for this statement! (requires normally distributed data, or data that has been transformed to normality) 12
13 Capability Indices = ( NSL ProcessAvg ) (3 x StdDev) where: NSL = QC specification closest to Process Average ProcessAvg = average of the sample data being analyzed StdDev = estimate of the standard deviation of the population from which the sample was taken (based on data from all samples being analyzed for Cpk) When Cpk alone is reported to a regulatory agency, the conclusions based upon the Cpk are suspect, if a small sample size was used, because... a Cpk is just a statistic  where s the parameter? = L C L (if report LCL, then...any sample size is valid) for a lower 1sided 95% limit, replace this with... normsinv(0.95) where normsinv is an Excel function Cpk without confidence Cpk with confidence (for 1 and 2sided QC specs) n in this formula refers to total # of raw data points combined from all samples in data set being evaluated If Cpk = 1.33, then lower 1sided 95% confidence limit is for n = 100 and 1.00 for n = 25 13
14 (e.g., for capital equipment) MTBF = Mean Time Between Failures Device Failure indicated by X on line Hours in service # 1 X X 500 # 2 X 500 # # 4 X X 500 After failure, device is quickly repaired & put back into service. MTBF = ( ) / 5 failures = 400 hours But that s a statistic  where s the parameter? When reporting a statistic, impossible to justify sample size. 14
15 LOWER 1SIDED CONFIDENCE LIMITS for MTBF from studies carried out for a predetermined time period: Any sample size is valid, because using Confidence Limits: 2 x T Lower Conf. Limit = Chiinv( 1 Conf, ( 2 x F ) + 2 ) Where T = Total inservice test time (all devices combined; = LengthOfStudy x NumberOfDevicesInStudy For this calculation, these are identical: T = 500 hours x 4 devices T = 50 hours x 40 devices T = 5 hours x 400 devices Chiinv = the Excel function Conf = desired confidence (as a decimal fraction) F = Total number of failures (all devices combined) e.g., ( 2 x 2000 ) / Chiinv ( , ( 2 x 5 ) + 2 ) = 190 hours 15
16 Confidence Interval explanation of ttests (mathematically identical to classic ttests) Sample Value Null Hypothesis Value 95% conf. interval (large sample) The fact that the Null Hypothesis is outside the confidence interval means the ttest had a significant result. It is much more difficult to obtain a significant result with a small sample (= large conf. interval) than with a large sample (= small conf. interval), and therefore any sample size is valid when claiming significance. Confidence Interval explanation of ttests Sample Value Null Hypothesis Value 95% conf. interval (small sample) The fact that the Null Hypothesis is NOT outside the confidence interval means the ttest had a nonsignificant result. It is much easier to obtain a nonsignificant result with a small sample (= large conf. interval) than with a large sample (= small conf. interval), and therefore... not all sample sizes are valid when claiming nonsignificance unless justified based upon the classic method of Power. 16
17 Testing for (practical) Noninferiority ( use this instead of nonsignificance and Power ) WORSE performance C B(yours) A (other) BETTER performance Assume that A is the other company s product and that B is your company s product, and that C is the first value lower than A that is considered worse than A in a practical sense). If B is statistically significantly larger than C, then you can claim that your product B is noninferior (substantially equivalent?) to product A, in a practical sense, irrespective of whether B is statistically different from A. Therefore...Any sample size is valid, for claiming noninferiority, IF it shows a significant difference between B and C 17
18 The %AQL of an AQL sampling plan is the product quality ( = lots having that % defective) that the sampling plan will accept (=approve) almost all the time. The %LQL of an LQL (a.k.a., LTPD, RQL, or UQL) sampling plan is the product quality ( = lots having that % defective) that the sampling plan will reject almost all the time. Predicting Pass Rates 100% 80% 60% % Defective OC curve for a 4% AQL sampling plan (ANSI Z1.4) 40% 20% 0% 0% 10% 20% Lot % Defective N = 1000 n = 80 c = 7 Sample Size is mandated by Sampling Plan booklet, based upon Lot Size. 18
19 100% 80% 60% % Defective OC curve for a 4% AQL, C=0 sampling plan (Squeglia's 4 & 5th ed.) 40% 20% 0% 0% 10% 20% Lot % Defective N = 1000 n = 15 c = 0 Sample Size is mandated by Sampling Plan booklet, based upon Lot Size. Previous slides, combined: 100% 80% 60% Previous 2 slides combined Z1.4 (4% AQL) ASQCZ1.4, 4% AQL ASQCC=0, 4% AQL C=0 ( 4% AQL ) 40% 20% 0% 0% 5% 10% 15% 20% Lot % Defective 14% LQL (choose sampling plans that have LQL = LTPD that support Risk Management statements) 19
20 Are LQL levels of AQL plans consistent? 100% 80% 60% 40% 20% 0% 0% 10% 20% Lot % Defective Lot Size = 1000 Lot Size = 500 Lot Size = 100 ASQCZ1.4, general, II, single, normal, 4% AQL After making choice on previous slide, be sure to determine actual LQL for planned Lot Size; adjust AQL as needed to achieve desired LQL. 20
21 CONFIDENCE INTERVALS We are 99% confident that the Population average is not smaller than 2.35 and not larger than 3.16 (where those 2 values are the lower and upper limits of the 2sided 99% confidence interval calculated based upon the Sample data). We used a sample size of 20, which is valid because this result was based upon a calculation of confidence interval limits (any sample size is valid when using confidence limits) Sample Avg CONFIDENCE / RELIABILITY STATEMENTS We are 95% confident that the Population from which the Sample was taken has an inspecification% (i.e., a %Reliability ) that is not less than 99.9%. We used a sample size of 8, which is valid because we used Ktables for our calculation, which are based on confidence limits, and therefore any sample size is valid. 5.7 Standard Deviations between QC Spec and Sample Average Sample Avg 42 21
22 QC SAMPLING PLANS We are using a formal published Sampling Plan booklet purchased from the American Society for Quality (ASQ). Sample size is a function of lot size, as explicitly required by the instructions in the Sampling Plan booklet. The particular sampling plan we chose from that booklet is one that will control the Incoming QC rejection rate, so that the rejection rate is least 90% for lots that have defective rates of 1.5% or greater (i.e., LQL = 1.5%), which is the rejection rate required by our Risk Management Plan documents. We have chosen to limit the range of allowed lot sizes that we purchase to , in order to ensure that the rejection rate is stable no matter what lot size is received. 22