Statistical control to monitor

40
GMPWkPHL1012S4 1 Statistical Control to Monitor and Control Validated Processes. Session 4 Steven S. Kuwahara, Ph.D. GXP BioTechnology LLC PMB 506, 1669-2 Hollenbeck Avenue Sunnyvale, CA 94087-5402 USA Tel. & FAX: (408) 530-9338 e-Mail: [email protected] Website: www.gxpbiotech.org

Transcript of Statistical control to monitor

Page 1: Statistical control to monitor

GMPWkPHL1012S4 1

Statistical Control to Monitor and Control Validated Processes.

Session 4

Steven S. Kuwahara, Ph.D. GXP BioTechnology LLC

PMB 506, 1669-2 Hollenbeck Avenue Sunnyvale, CA 94087-5402 USA

Tel. & FAX: (408) 530-9338 e-Mail: [email protected]

Website: www.gxpbiotech.org

Page 2: Statistical control to monitor

•  All functions mentioned in the GMP are GMP processes. –  Not all GMP processes need to be monitored. –  The processes that introduce variability into the

product or can cause the production of unacceptable product need to be monitored.

–  This goes beyond manufacturing processes. –  QC test methods need to be monitored. –  The annual product review needs to be monitored to see

if batch records are being properly executed. –  Processes that generate critical business information

need to be monitored.

What to Monitor 1.

2 GMPWkPHL1012S4

Page 3: Statistical control to monitor

•  Use information from the process validation and risk assessment to determine what needs to be monitored. (You need proof of your assertion.) –  Even if the process validation shows that a step is very

stable, if the risk assessment shows that that step can create a serious threat to the product or patient, it should be monitored.

–  Steps or processes can be monitored. If there are multiple small steps in a process, the outcome of the process can be monitored in place of each of the steps.

–  If the outcome of a process or step is immaterial to the quality of the product, it does not need to be monitored.

What to Monitor 2.

3 GMPWkPHL1012S4

Page 4: Statistical control to monitor

•  There can be two types of data. –  Variable data forms a continuum and an individual

result can fall anywhere within it. Most statistical procedures are designed to deal with variable data.

–  Attribute data comes in discrete units. Yes/no: red, green, blue, or yellow; pass/fail; high, medium, low.

–  One of the problems with attribute data is that it may be subjective or actually part of a continuum. Is a thing red, reddish, pink, or brown, brownish, rust; what is high or medium; passing?

–  Since attribute data must be discrete, a clear and firm definition is needed.

Data 1.

4 GMPWkPHL1012S4

Page 5: Statistical control to monitor

•  There are statistical methods for dealing with attribute data, especially since they may not follow the normal distribution. –  One technique is to convert attribute data into variable data by

using fractions or percentages, but this is good only with large numbers. With small numbers the discreteness creates large jumps.

–  Attribute data that is in binary (+/-, yes/no) form will follow a binomial distribution.

–  Attribute data is not as strong as variable data so you need more of it.

•  In what follows we will assume that you have variable data.

Data 2.

5 GMPWkPHL1012S4

Page 6: Statistical control to monitor

TOLERANCE vs. CONFIDENCE LIMITS With confidence limits you are trying to determine the value of the “true mean” (µ). The result gives an interval within which you expect to find µ with a certain probability (confidence). The results are means with the same n that was used to calculate the limits. With a tolerance interval you are asking for the values of the next n numbers of results. The result gives an interval within which you have x % confidence that it will contain y % of the results. It assumes that all of the results are from the same population. The result here is a single number. 6 IVTPHL1012S1

Page 7: Statistical control to monitor

TOLERANCE LIMITS FOR A SINGLE RESULT 1.

•  DEFINITION: ± ks. Where k is a value to allow a statement that we have 100(1 - α) percent confidence that the limits will contain proportion p of the population.

•  Requires a normal distribution of the population. •  Allows one to set limits for single determinations

(not averages) with a limited number of replicates available.

7 IVTPHL1012S1

Page 8: Statistical control to monitor

TOLERANCE LIMITS 2. Selected Portions of a Table for Two-sided Limits

•  k 95% Confidence 99% Confidence •  n p=95% p=99% p=95% p=99% •  2 37.67 48.43 188.5 242.3 •  3 9.916 12.86 22.40 29.06 •  4 6.370 8.299 11.15 14.53 •  5 5.079 6.634 7.855 10.26 •  10 3.379 4.433 4.265 5.594 •  20 2.752 3.615 3.168 4.161 •  50 2.379 3.126 2.576 3.385 •  Table XIV, Applied Statistics and Probability for Engineers, D.C.

Montgomery & G.C. Runger, John Wiley & Sons, 1994.

8 IVTPHL1012S1

Page 9: Statistical control to monitor

TOLERANCE LIMITS FOR A SINGLE RESULT 3. Example

•  A product is made at 2.25 mg/mL. n = 10 samples are taken from 5 early lots. The assays show 2.27, 2.25, 2.24, 2.22, 2.26, 2.23, 2.23, 2.24, 2.27, and 2.25 mg/mL. We calculate = 2.246, s = 0.017. From the table at n = 10, 99% confidence for 95% of results k = 4.265 so the Tolerance Interval is:

•  2.246 ± (4.265)0.017 = 2.319 - 2.173. •  We have 99% confidence that 95% of the results from

this population will be in the interval. •  The 95% confidence interval for the mean is ± 0.012,

giving 2.258 to 2.234. 9 IVTPHL1012S1

Page 10: Statistical control to monitor

Statistical Process Control (SPC) Basics. 1.

•  At some level of discrimination, NO TWO THINGS ARE ALIKE. There is always some variation.

•  If things are not being hand made, the variation should be small enough to make each unit interchangeable with any other unit. – A 100 mg tablet may vary by ± 1 mg and be

okay, but not a 1 mg tablet. •  The allowable variation should not be larger than

the variation that causes a unit to be “different.”

10 GMPWkPHL1012S4

Page 11: Statistical control to monitor

Statistical Process Control (SPC) Basics. 2.

•  In the old days, people made many units of product and the “production lot” underwent 100% inspection to segregate “good” units from the “bad.” “Bad” units were scrapped. Thus the name “Quality Control.” –  It cost just as much to make scrap as to make a “good”

unit. –  100% inspection is never 100% effective. –  “Quality Control” was basically a sorting operation.

Quality was really not controlled since the “bad” product had already been made.

11 GMPWkPHL1012S4

Page 12: Statistical control to monitor

Statistical Process Control (SPC) Basics. 3.

•  Walter Shewhart, in the late 1920’s, and, later, W. Edwards Deming basically proposed the idea that making scrap was not cost effective.

•  They proposed the idea that the elimination of scrap would produce the most cost effective manufacturing process.

•  Scrap was the result of excessive variation. •  Variation comes in two forms. In the Shewhart/

Deming terminology there are common cause and assignable cause variations.

12 GMPWkPHL1012S4

Page 13: Statistical control to monitor

Statistical Process Control (SPC) Common Cause Variation.

•  Common (controlled) cause variation is the basic variation that is inherent in a process. It is the sum of all of the small, inherent, random errors associated with the process. Sources of error may be undetectable.

•  Since common cause variation is inherent in a process, it changes only when the process, or the way that the process is managed, changes.

•  Common cause variation, therefore, can only be reduced through the actions of management.

13 GMPWkPHL1012S4

Page 14: Statistical control to monitor

SPC: Assignable Cause Variation.

•  Assignable (special) cause variations result from unusual situations and are not built-in as a part of the process.

•  Because they arise from unusual events, assignable cause variations should be detectable by careful inspection of the system.

•  While management action may be needed, most assignable cause variations can be corrected by line workers themselves, if they have the required knowledge and experience.

14 GMPWkPHL1012S4

Page 15: Statistical control to monitor

X-bar Chart

Time LCL

UCL

X bar x x

x x x x x x x

x x x

x x x x

x

15 GMPWkPHL1012S4

Page 16: Statistical control to monitor

R Chart

•  UCL

Time

Range

LCL

o o o o o o o o o o o o

o

o

o o

o o

o o

o o o

16 GMPWkPHL1012S4

Page 17: Statistical control to monitor

GMPWkPHL1012S4 17

Page 18: Statistical control to monitor

GMPWkPHL1012S4 18

Chart and Process Interpretation

•  Look at R chart first. x bar Chart is meaningless if R has changed significantly or is large.

•  If R has increased, identify any special causes that are responsible for the increased variability and change the process to stop them.

•  If R has decreased, identify special causes responsible and change process to incorporate them.

Page 19: Statistical control to monitor

GMPWkPHL1012S4 19

SETTING CONTROL LIMITS FOR YOUR SPC CHARTS. 1.

•  Control limits for the SPC charts should be incorporated as specifications, unless you are setting your release specifications to be wider than your control limits.

•  The problem here is that your SPC control limits should be based upon what your process is capable of delivering, if it is operating in a state of control. Therefore, if the limits are exceeded, it is an indication that the process is out of control, even if it is within the release limits.

Page 20: Statistical control to monitor

GMPWkPHL1012S4 20

SETTING CONTROL LIMITS FOR YOUR SPC CHARTS. 2.

•  First, calculate the average of the averages that you are using. This is:

Now calculate the average range that comes from the ranges of the data that were used for the averages. This is:

N

xx

N

∑= 1

R

Page 21: Statistical control to monitor

GMPWkPHL1012S4 21

SETTING CONTROL LIMITS FOR YOUR SPC CHARTS. 3.

•  For “3-sigma limits” the Shewhart formulae are:

7. size subgroupfor 0D that Notenegative.not if

CL

CL

3

3

R4

2

x2

<=

=

==

−=

=+=

RDLCL

RRDUCL

RAxLCL

xRAxUCL

R

R

x

x

Page 22: Statistical control to monitor

GMPWkPHL1012S4 22

SETTING CONTROL LIMITS FOR YOUR SPC CHARTS. 4.

•  The constants, A2, D3, and D4 are combinations of other constants and are set for 3σ and change with the subgroup size.

•  The subgroup size (n) is the number of replicates for each average. (Also known as a “rational subgroup.”)

•  When possible, 20 to 30 subgroups should be used to establish the grand average and the average range. Fewer subgroups may be used in the beginning, but the numbers should evolve until 30 is reached.

•  The idea is to reach the point where you are dealing with µ and σ, but recent computer studies have shown that instead of 30, the real number should be around 200.

Page 23: Statistical control to monitor

Western Electric Rules 1. Zones

GMPWkPHL1012S4 23

+1σ

-1σ -2σ

-3σ

+2σ

+3σ

Page 24: Statistical control to monitor

Western Electric Rules 2. •  The process is out of control when any one of the

following happens: •  1. One point plots outside the 3σ control limits. •  2. Two out of 3 consecutive points are beyond the 2σ limits. •  3. Four out of 5 consecutive points plot beyond the 1σ

control limits. •  4. Eight consecutive points plot on one side of the center

line (). •  These are one-sided rules. They only apply to

events happening on one side of the chart. –  If a point is beyond +2σ and the next point plots beyond

-2σ, they are not 2 points beyond 2σ.

GMPWkPHL1012S4 24

Page 25: Statistical control to monitor

Western Electric Rules 3. Considerations

•  Based on the work of Shewhart, Deming, and others when they were with Bell Telephone.

•  Because they are based on the standard deviation zones, these are sometimes known as “zone rules.”

•  These rules enhance the sensitivity of the control charts, but require the use of standard deviations, not ranges.

•  A “point” on a control chart usually represents an average that was calculated for a “rational group.”

GMPWkPHL1012S4 25

Page 26: Statistical control to monitor

Rational Subgroups •  The subgroup that is chosen to represent a

“point” should be chosen so that it properly represents the product unit. –  If you are checking lots over time then the subgroup

units should be randomly chosen from the lot. –  If you are more interested in the different parts of a

lot, you should define the parts and choose from within the “part.”

–  The number of units in the subgroup should be calculated as an “n” value based on your desired confidence interval and the level of risk that you are willing to accept.

GMPWkPHL1012S4 26

Page 27: Statistical control to monitor

CUSUM Charts I.

•  There are CUmulative SUM control charts. –  They are based on the Cumulative Sum of the

Deviations from a target value. •  The CUSUM chart is a relatively new

invention designed to overcome the lack of sensitivity of “Shewhart Charts” and the tendency of the charts to give false alarms, especially when the Western Electric Rules are employed.

•  CuSum chart: A quality control chart with memory

GMPWkPHL1012S4 27

Page 28: Statistical control to monitor

CUSUM Charts II.

•  For deviations greater than ± 2.5σ the Shewhart chart is as good or may be better than the CUSUM chart.

•  CUSUM charts are more sensitive and will detect changes (especially trends) in the ± 0.5σ - ± 2.5σ range.

GMPWkPHL1012S4 28

Page 29: Statistical control to monitor

Types of ‘Time-weighted charts

•  There are 3 types of time-weighted charts. •  Moving Average •  - Chart of un-weighted moving averages •  Exponential Moving Average (EWMA) •  - Chart of exponentially weighted moving averages •  CUSUM •  - Chart of the cumulative sum of the deviations

from a nominal specification

GMPWkPHL1012S4 29

Page 30: Statistical control to monitor

Equations for CUSUM

GMPWkPHL1012S4 30

( )

( )

.deviations thesum you will over which period time theis j

lue. target va theis and jat point CUSUM theis j.at average the

x whereaverages,for S

j.at n observatio theis

x wheredata,point singlefor

jj

j

µ

µ

µ

j

j

ij

j

ijj

Sis

x

xS

−=

−=

Page 31: Statistical control to monitor

Starting a CUSUM I.

•  Specification: Target Value: 100 = µ •  n xj Calculation CuSum value = Sj j = 8 •  1 99 = 99 – 100 = -1 •  2 101 = 99+101-2*100 = 0 •  3 99 = 99+101+99-3*100 = -1 •  4 100 =99+101+99+100-4*100 = -1 •  5 102 = 99+101+99+100+102-5*100 = 1 •  6 101 = 99+101+99+100+102+101-6*100 = 2 •  7 100 = 99+101+99+100+102+101+100-7*100 = 2 •  8 101 = 99+101+99+100+102+101+100+101-8*100 = 3

•  Sj= (Σxj ) – jµ

GMPWkPHL1012S4 31

Page 32: Statistical control to monitor

Starting a CUSUM II.

•  In theory, the sum of the deviations should be zero, if the process is in statistical control.

•  So the cumulative run length (j) should be large enough that you would expect it to be at zero, if the target value (µ) is really the center point.

•  The target value (µ) should be the specification for the measurement.

•  Therefore the center line in a CUSUM chart should be at zero.

GMPWkPHL1012S4 32

Page 33: Statistical control to monitor

Shift then return to Normal

GMPWkPHL1012S4 33

Theory Reality

Page 34: Statistical control to monitor

The V-Mask I. • A statistical t-test to determine if the process

is in a state of statistical control. The V-mask is placed at a distance d from the

last point of measurement. The opening of the V-mask is drawn at an

angle of ± θ. •  First, obtain an estimate of the standard

deviation or standard error (σx) for the value of Sj. This should be known from the specification setting process or from development work.

GMPWkPHL1012S4 34

Page 35: Statistical control to monitor

The V-Mask II. •  Decide on the smallest deviation you want to detect (D).

Calculate: δ = D/σx. If D = σx then δ = 1

•  Decide on the probability level (α) at which you wish to make decisions. –  For the usual ± 3σ level, α = 0.00135.

•  Determine the scale factor (k) which is the value of the statistic to be plotted (vertical scale) per unit change in the horizontal scale (lot or sample number). It is suggested that k should be between 1σx and 2σx, preferably closer to 2σx.

•  Using the value of δ, obtain the value of the lead time (d) from the following table.

GMPWkPHL1012S4 35

Page 36: Statistical control to monitor

The V-Mask III. •  Obtain the angle (ϴ) from the same table by

setting δ = D/k. (Table BB in Juran’s Book) •  Construct the V-Mask from these data.

•  Truncated Table BB.

GMPWkPHL1012S4 36

δ ϴ d 0.2 5o 43’ 330.4 0.5 14o 00’ 52.9 1.0 26o 34’ 13.2 1.8 41o 59’ 4.1 2.0 2.6 3.0

45o 00’ 52o 26’ 56o 19’

3.3 2.0 1.5

Page 37: Statistical control to monitor

V-Masked CUSUM

GMPWkPHL1012S4 37

Action?

Failure

d ϴ

Time

X-bar

Page 38: Statistical control to monitor

CUSUM Rules •  The sample size can be the same as used in an chart. One

recommendation is to use. •  n = 2.25s2/D where s2 is an estimate of the process (lot to

lot) variance. •  The V-Mask is always placed at the last point measured. •  If all points are within the V-mask, the process is under

control. •  Any point out of the V-Mask shows a lack of control. •  The first point out of the V-mask shows when the shift

started even if later points are within the masks.

GMPWkPHL1012S4 38

Page 39: Statistical control to monitor

Moving V-Mask

GMPWkPHL1012S4 39

Failure

Page 40: Statistical control to monitor

References: ISO/TR 7871:1997: Cumulative sum charts --

Guidance on quality control and data analysis using CUSUM techniques

•  http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=14804

•  British Standards No. BS 5700 ff SR, 05.03.2009, page 16.

•  Wadsworth, H.M.; “Statistical Process Control,” in Juran’s Quality Handbook 5th Ed.; Juran, J.M. and Godfrey, A.B. (eds.); McGraw-Hill, New York, NY, 1999, Sect. 45, page 45-17. GMPWkPHL1012S4 40