ENGM 720 - Lecture 07 X-bar, R & S Control Charts; ARL & OC Curves 4/8/2015 ENGM 720: Statistical Process Control 1 Assignment: Reading: • • Chapter 5 • Start & Finish reading Chapter 6 • Spring Break means reading statistics on the beach, right? Assignments: • • Obtain the draft Ctrl Chart Factors table from Materials Page Access Excel Template for X-bar, R, & S Control Charts: • • Download Assignment 5 for practice Use the Excel sheet to do the charting, and verify your hand calculations 4/8/2015 ENGM 720: Statistical Process Control 2 Process for Statistical Control Of Quality Removing special causes of variation Statistical Quality Control and Improvement Improving Process Capability and Performance • Hypothesis Tests • Ishikawa’s Continually Improve the System Characterize Stable Process Capability Tools Managing the process with control charts Head Off Shifts in Location, Spread • Process Improvement • Process Stabilization • Confidence in Time Identify Special Causes - Bad (Remove) Identify Special Causes - Good (Incorporate) Reduce Variability “When to Act” Center the Process LSL 4/8/2015 0 USL ENGM 720: Statistical Process Control 3 Moving from Hypothesis Testing to Control Charts A control chart is like a sideways hypothesis test • Detects a shift in the process • Heads-off costly errors by detecting trends 2 2 2 0 2-Sided Hypothesis Test 4/8/2015 UCL 0 CL 2 Sideways Hypothesis Test LCL Sample Number Shewhart Control Chart ENGM 720: Statistical Process Control 4 Test of Hypothesis A statistical hypothesis is a statement about the value of a parameter from a probability distribution. Ex. Test of Hypothesis on the Mean • • Say that a process is in-control if its’ mean is 0. In a test of hypothesis, use a sample of data from the process to see if it has a mean of 0 . Formally stated: • • H0: = 0 HA: ≠ 0 4/8/2015 (Process is in-control) (Process is out-of-control) ENGM 720: Statistical Process Control 5 Test of Hypothesis on Mean (Variance Known) State the Hypothesis • • H0: = 0 H1: ≠ 0 Take random sample from process and compute appropriate test statistic x 0 x 0 z0 x n Pick a Type I Error level () and find the critical value z/2 Reject H0 if |z0| > z/2 2 2 z 4/8/2015 z 2 ENGM 720: Statistical Process Control z 2 6 UCL and LCL are Equivalent to the Test of Hypothesis Reject H0 if: • Case 1: z0 x 0 n z 2 x 0 z Case 2: 2 x 0 0 x z n n ) UCL n 2 x 0 z 2 x 0 x 0 • n z 2 ) LCL For 3-sigma limits z/2 = 3 4/8/2015 ENGM 720: Statistical Process Control 7 Two Types of Errors May Occur When Testing a Hypothesis Type I Error - • • Reject H0 when we shouldn't Analogous to false alarm on control chart, i.e., • point lays outside control limits but process is truly in-control Type II Error - b • • Fail to reject H0 when we should Analogous to insensitivity of control chart to problems, i.e., • point does not lay outside control limits but process is never-theless out-of-control 4/8/2015 ENGM 720: Statistical Process Control 8 Choice of Control Limits: Trade-off Between Wide or Narrow Control Limits Moving limits further from the center line • Decreases risk of false alarm, BUT increases risk of insensitivity x UCL CL LCL Sam ple Moving limits closer to the center line • Decreases risk of insensitivity, BUT increases risk of false alarm x UCL CL LCL Sam ple 4/8/2015 ENGM 720: Statistical Process Control 9 Consequences of Incorrect Control Limits Bad Thing 1: • A control chart that never finds anything wrong with the process, but the process produces bad product Bad Thing 2: • Too many false alarms destroy the operating personnel’s confidence in the control chart, and they stop using it 4/8/2015 ENGM 720: Statistical Process Control 10 Differences in Viewpoint Between Test of Hypothesis & Control Charts Hypothesis Test Checks for the validity of assumptions. (ex.: is the actual process mean what we think it is?) Tests for sustained shift (ex.: have we actually reduced the variation like we think we have?) 4/8/2015 Control Chart Detect departures from assumed state of statistical control Detects shifts that are short-lived Detects steady drifts Detects trends ENGM 720: Statistical Process Control 11 Example: Part Dimension When a process is in-control, a dimension is normally distributed with mean 30 and std dev 1. Sample size is 5. Find the control limits for an x-bar chart with a false alarm rate of 0.0027. • r.v. x - dimension of part x ~ N 30, • 1) r.v. x - sample mean dimension of part x ~ N 30, X 4/8/2015 n 1 ENGM 720: Statistical Process Control 5 ) 12 Distribution of x vs. Distribution of x Distribution of individual measurements x : N , ) Distribution of sample mean x : N , x n ) UCL 3 x CL LCL 3 x 4/8/2015 ENGM 720: Statistical Process Control 13 Ex. Part Dimension Cont'd Find UCL: P x UCL 0.0027 / 2 0.00135 UCL P z 0.00135 n UCL P z 1 0.00135 0.99865 n UCL 3 n UCL 3 n ) The control limits are: CL 30 UCL 3 LCL 3 4/8/2015 ) n 30 3 1 ) n 30 3 1 ENGM 720: Statistical Process Control ) 5 31.34 ) 5 28.66 14 Ex. Modified Part Limits Consider an in-control process. A process measurement has mean 30 and std dev 1 and n = 5. • Design a control chart with prob. of false alarm = 0.005 α .005 α .0025 2 1 .0025 .9975 z α 2.81 2 σ 1 UCL μ 2.81 30 2.81 31.3 n 5 σ 1 LCL μ 2.81 30 2.81 28.7 n 5 • If the control limits are not 3-Sigma, they are called "probability limits". 4/8/2015 ENGM 720: Statistical Process Control 15 General Model: Shewhart Control Chart Suppose x is some quality characteristic, and w is a sample statistic of x. Suppose mean of w is μw and std dev of w is σw, then: • • • UCL = μ w + Lσw • LCL = μ w – Lσw CL = μ w where L is the “distance” of the control limits from the center line, and expressed in multiples (units) of the standard deviation of the statistic, i.e. σw. This type of chart is called a Shewhart Control Chart 4/8/2015 ENGM 720: Statistical Process Control 16 Rational Subgroups Subgroups / Samples should be selected so that if assignable causes are present: • • Chance for differences between samples is maximized Chance for differences within a sample is minimized Use consecutive units of production Keep sample size small so that: • • • New events won’t occur during sampling Inspection is not too expensive But size is large enough that x is normally distributed 4/8/2015 ENGM 720: Statistical Process Control 17 Why Monitor Both Process Mean and Process Variability? Process Over Time Process Doing OK Lower Specification Limit Control Charts Upper Specification Limit X-bar R X-bar R X-bar R Mean shift in process Increase in process variance 4/8/2015 ENGM 720: Statistical Process Control 18 Teminology Causes of Variation: • Assignable Causes Meaning of Control: • • Keep the process from • • operating predictably Things that we can do something about Common / Chance Causes • Random, inherent In Specification • Meets customer constraints on product • In Statistical Control • No Assignable Causes of variation present in the process variation in the process 4/8/2015 ENGM 720: Statistical Process Control 19 Statistical Basis of x Chart Suppose a quality characteristic is x ~ N(, ) and we know and If x1, x2, …, xn is a random sample of size n then: and x n 1 n x i 1 x ~ N i , x n ) Recall that the probability is that either: x UCL z or x LCL z 4/8/2015 2 n 2 n ENGM 720: Statistical Process Control 20 Statistical Basis of x Chart Cont'd which is equivalent to: P z 2 x z 2 1 n n P LCL x UCL 1 • Where LCL and UCL are the lower and upper control limits, respectively In practice, one must estimate and from data coming from an in-control process 4/8/2015 ENGM 720: Statistical Process Control 21 Statistics of the Range R – the range – is a sample statistic If x1, x2, …, xn is a random sample of size n from a normal distribution then one can estimate using the range: ˆ R d 2 • where d2 is a function of n and can be found in Appendix VI Can get a better estimate for if using more than one sample • • Compute Ri for each of m samples where i = 1, …, m Then use the sample average of Ri m R Ri i 1 4/8/2015 ˆ R d2 ENGM 720: Statistical Process Control 22 Computing Trial Control Limits for x Chart Assume a quality characteristic x ~ N(, ) Take m 20 samples of size n = 4, 5, or 6 For each sample i, compute x and Ri for i = 1, …, m Compute: x and R m x xi i 1 4/8/2015 m R Ri i 1 ENGM 720: Statistical Process Control 23 Computing Trial Control Limits for x Chart General model for x chart UCL x L x CL x LCL x L x Substituting estimates for μx and σx and using 3-sigma limits: CL x x UCL x 3 x x 3 n R d2 x 3 x A2 R n Where A2 comes from Appendix VI and depends on n LCL x A2 R 4/8/2015 ENGM 720: Statistical Process Control 24 Computing Trial Control Limits for R - Chart x and R charts come as a pair General model for R chart UCL R L R CL R LCL R L R Substituting estimates for R and R and using 3-sigma limits CL R R UCL R 3 R R 3 d 3 ) R 3d 3 R D4 R d2 LCL D3 R 4/8/2015 ENGM 720: Statistical Process Control 25 Computing Trial Control Limits for R - Chart (continued) where and d3 D3 1 3 d2 d3 D4 1 3 d2 D3 and D4 are tabulated in Appendix VI and depend on n NOTE: R chart is quite sensitive to departures from normality 4/8/2015 ENGM 720: Statistical Process Control 26 Control Chart Factors Table (Appendix VI – see Materials Page for Engineering Notebook Copy) For a constant sample size (n) and 3σ limits: Obs n 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 A 2.121 1.732 1.500 1.342 1.225 1.134 1.061 1.000 0.949 0.905 0.866 0.832 0.802 0.775 0.750 0.728 0.707 0.688 0.671 0.655 0.640 0.626 0.612 0.600 A2 1.880 1.023 0.729 0.577 0.483 0.419 0.373 0.337 0.308 0.285 0.266 0.249 0.235 0.223 0.212 0.203 0.194 0.187 0.180 0.173 0.167 0.162 0.157 0.153 4/8/2015 A3 2.659 1.954 1.628 1.427 1.287 1.182 1.099 1.032 0.975 0.927 0.886 0.850 0.817 0.789 0.763 0.739 0.718 0.698 0.680 0.663 0.647 0.633 0.619 0.606 d2 1.128 1.693 2.059 2.326 2.534 2.704 2.847 2.970 3.078 3.173 3.258 3.336 3.407 3.472 3.532 3.588 3.640 3.689 3.735 3.778 3.819 3.858 3.895 3.931 d3 0.853 0.888 0.880 0.864 0.848 0.833 0.820 0.808 0.797 0.787 0.778 0.770 0.763 0.756 0.750 0.744 0.739 0.734 0.729 0.724 0.720 0.716 0.712 0.708 D1 0 0 0 0 0 0.204 0.388 0.547 0.687 0.811 0.922 1.025 1.118 1.203 1.282 1.356 1.424 1.487 1.549 1.605 1.659 1.710 1.759 1.806 D2 3.686 4.358 4.698 4.918 5.078 5.204 5.306 5.393 5.469 5.535 5.594 5.647 5.696 5.741 5.782 5.820 5.856 5.891 5.921 5.951 5.979 6.006 6.031 6.056 D3 0 0 0 0 0 0.076 0.136 0.184 0.223 0.256 0.283 0.307 0.328 0.347 0.363 0.378 0.391 0.403 0.415 0.425 0.434 0.443 0.451 0.459 D4 3.267 2.574 2.282 2.114 2.004 1.924 1.864 1.816 1.777 1.744 1.717 1.693 1.672 1.653 1.637 1.622 1.608 1.597 1.585 1.575 1.566 1.557 1.548 1.541 c4 0.7979 0.8862 0.9213 0.9400 0.9515 0.9594 0.9650 0.9693 0.9727 0.9754 0.9776 0.9794 0.9810 0.9823 0.9835 0.9845 0.9854 0.9862 0.9869 0.9876 0.9882 0.9887 0.9892 0.9896 B3 0 0 0 0 0.030 0.118 0.185 0.239 0.284 0.321 0.354 0.382 0.406 0.428 0.448 0.466 0.482 0.497 0.510 0.523 0.534 0.545 0.555 0.565 B4 3.267 2.568 2.266 2.089 1.970 1.882 1.815 1.761 1.716 1.679 1.646 1.618 1.594 1.572 1.552 1.534 1.518 1.503 1.490 1.477 1.466 1.455 1.445 1.435 Table factors derived from Montgomery,D.C., (2005) Statistical Quality Control, 5th Ed. SHORT RUN SPC B5 0 0 0 0 0.029 0.113 0.179 0.232 0.276 0.313 0.346 0.374 0.399 0.421 0.440 0.458 0.475 0.490 0.504 0.516 0.528 0.539 0.549 0.559 27 B6 2.606 2.276 2.088 1.964 1.874 1.806 1.751 1.707 1.669 1.637 1.610 1.585 1.563 1.544 1.526 1.511 1.496 1.483 1.470 1.459 1.448 1.438 1.429 1.420 Trial Control Chart Limits: Guidelines for Sampling Sample should be of size 3 to 8 (sizes 4 – 6 are more common) Sample must be homogeneous • same time (consecutive units) • same raw materials • same operator • same machine Time may pass between samples but not within samples 4/8/2015 ENGM 720: Statistical Process Control 28 Steps for Trial Control Limits Start with 20 to 25 samples Use all data to calculate initial control limits Plot each sample in time-order on chart. Check for out of control sample points • • If one (or more) found, then: 1. Investigate the process; 2. Remove the special cause; and 3. Remove the special cause point and recalculate control limits. If can’t find special cause - drop point & recalculate anyway 4/8/2015 ENGM 720: Statistical Process Control 29 Control Chart Sensitizing Rules Western Electric Rules: 1. One point plots outside the three-sigma limits; 2. Eight consecutive points plot on one side of the center line; 3. Two out of three consecutive points plot beyond two-sigma warning limits on the same side of the center line; or 4. Four out of five consecutive points plot beyond one-sigma warning limits on the same side of the center line. If chart shows lack of control, investigate for special cause 4/8/2015 ENGM 720: Statistical Process Control 30 Control Chart Examples UCL UCL UCL UCL x x x x LCL LCL LCL LCL Rule 1 4/8/2015 Rule 2 Rule 3 ENGM 720: Statistical Process Control Rule 4 31 Control Chart Sensitizing Rules Additional Sensitizing Rules: One or more points very near a control limit. 6. Six points in a row steadily increasing or decreasing. 7. Eight points in a row on both sides of the center line, but none in-between the one-sigma warning limits on both sides of the center line. 8. Fourteen points in a row alternating above and below the center line. 9. Fifteen points in a row anywhere between the one-sigma warning limits (including either side of the center line). 10. Any unusual or non-random pattern to the plotted points. 5. 4/8/2015 ENGM 720: Statistical Process Control 32 Charts Based on Standard Values, x Chart If values for and are known (i.e., do not need to estimate from data) UCL x 3 x CL x LCL x 3 x n A n A UCL 3 CL LCL 3 ) ) Quantity A is tabulated in Appendix VI 4/8/2015 ENGM 720: Statistical Process Control 33 R - Chart Based on Standard Values If values for R and are known UCL = R 3 R CL R LCL R 3 R r.v. W = R / – relative range The parameters of the distribution of W are a function of n W E W d 2 From the relative range we can compute the mean of R R W R E R E W E W d 2 4/8/2015 ENGM 720: Statistical Process Control 34 The Standard Deviation of R The standard deviation of R is given as: (Text does not derive this) therefore R d3 UCL d 2 3d 3 CL d 2 LCL d 2 3d 3 where • UCL D2 CL d 2 LCL D1 D1 d 2 3d3 D2 d 2 3d3 D1 and D2 are constants tabulated in Appendix VI Caution: Be careful when using standard values • make sure these values are representative of the actual process 4/8/2015 ENGM 720: Statistical Process Control 35 X-Bar & R-Charts The X-Bar Chart The R-Chart checks checks variability in for changes in location between sample variation samples UCL UCL x R LCL LCL Sample Number X-Bar ( Means ) Control Chart 4/8/2015 Sample Number R - ( Range ) Control Chart ENGM 720: Statistical Process Control 36 X-Bar & Sigma-Charts Used when sample size is greater than 10 X-Bar Control Limits: Sigma-Chart Control • Approximate 3 limits are Limits: found from S & table • Approximate, asymmetric 3 limits from S & table UCL x A 3 S UCL B4 S CL x CL S LCL x A 3 S LCL B3 S 4/8/2015 ENGM 720: Statistical Process Control 37 X-Bar & Sigma-Charts Limits can X-Bar also be generated from historical data: Control Limits: Sigma-Chart Control • Approximate 3 limits are Limits: found from known 0 & • Approximate, asymmetric 3 limits from 0 & table table UCL x A UCL B 6 CL x CL c 4 LCL x A LCL B 5 4/8/2015 ENGM 720: Statistical Process Control 38 Operating Characteristic (OC) Curve Ability of the x and R charts to detect shifts (sensitivity) is described by OC curves For x chart; say we know • Mean shifts from 0 (in-control value) to 1 = 0 +k (out-of-control value) The probability of NOT detecting the shift on the first sample after shift is b P LCL x UCL 1 0 k LCL 1 UCL 1 b P z n n 4/8/2015 ENGM 720: Statistical Process Control 39 OC Curve for x Chart Plot of b vs. shift size (in std dev units) for various sample sizes n OC Curve for x-bar chart with 3-sigma limits 1.00 0.90 0.80 Beta 0.70 0.60 0.50 n=20 n=5 0.40 n=2 n=1 0.30 0.20 0.10 4. 8 4. 4 4. 0 3. 6 3. 2 2. 8 2. 4 2. 0 1. 6 1. 2 0. 8 0. 4 0 0.00 k x chart not effective for small shift sizes, i.e., k 1.5 Performance gets better for larger n and L or larger shifts 4/8/2015 ENGM 720: Statistical Process Control 40 OC curve for R Chart Uses distribution of relative range r.v., i.e., Suppose 0 - in-control std dev 1 - out-of-control std dev OC curve for R chart plots b vs. ratio of in-control to out-of-control standard deviation for various sample sizes • W R That is, plot β vs. l 1/0 R chart not very effective for detecting shifts for small sample sizes (see Fig. 5-14 in text) 4/8/2015 ENGM 720: Statistical Process Control 41 Probability of Detecting Shift for Subsequent Samples After the shift has occurred: • • • • • • P(NOT detecting shift ON 1st sample) b 0.07078 P(DETECTING shift ON 1st sample) 1 b ) 0.93 P(DETECTING shift ON 2nd sample) b 1 b ) 0.066 P(DETECTING shift ON rth sample) b r 1 1 b ) P(DETECTING shift BY 2nd sample) 1 b ) b 1 b ) 0.93 0.066 0.996 P(DETECTING shift BY rth sample) 4/8/2015 i 1 b 1 b ) i 1 r ENGM 720: Statistical Process Control 42 Average Run Length (ARL) Expected number of samples taken before shift is detected is called the Average Run Length (ARL) ARL r b r 1 4/8/2015 r 1 1 1 b ) 1 b ) ENGM 720: Statistical Process Control 43 Performance of Any Shewhart Control Chart In-Control ARL: • Average number of points plotted on control chart before a false alarm occurs (ideally, should be large) ARL0 1 Out-of-Control ARL: • Average number of points, after the process goes outof-control, before the control chart detects it (ideally, should be small) ARL1 4/8/2015 1 1 b ENGM 720: Statistical Process Control 44 ARL Curve for x Chart Plot of ARL1 vs. shift size (in sd units) for various sample sizes n: 3.0 2.9 2.7 2.6 2.4 2.3 2.1 2.0 1.8 1.7 n=1 1.5 1.4 n=2 1.2 1.1 0.8 n=4 0.6 0.5 0.3 0.2 n=20 0.9 20.00 18.00 16.00 14.00 12.00 10.00 8.00 6.00 4.00 2.00 0.00 0.0 ARL to detect shift ARL for x-bar chart with 3-sigma limits k (shift size) Average Time to Signal, (ATS): • Number of time periods that occur until signal is generated on control chart ATS ARL ) h ) • h - time interval between samples 4/8/2015 ENGM 720: Statistical Process Control 45 Questions & Issues 4/8/2015 ENGM 720: Statistical Process Control 46