8 Process Capability Analysis 8.1 Introduction • A process capability analysis relates the inherent variability in a process to specifications or requirements for the product produced by that process. • There are many ways of analyzing the capability of a process. The most common being: (1) Histograms and probability plots (2) The control chart (3) Process capability ratios. (4) Designed experiments. • Process capability measures the uniformity of a process. Process variability (variance) and systematic deviations from a target value (bias) are the primary sources of nonuniformity. • We will study the two major components of process variability: – Short-term variability which reflects the inherent random variability at a point in time. – Long-term variability which reflects the variability over time. • It is common to take a 6σ spread as a measure of process capability (where σ comes from the distribution of the product quality characteristic of interest). • When the distribution is assumed to be normal N (µ, σ), we define the natural tolerance limits to be µ ± 3σ. In this case, 99.73% of process output will be within the tolerance limits. • One way to estimate of process capability is to find a probability distribution that best describes data from that process (e.g. normal, weibull, gamma, lognormal, etc.). Once an acceptable distribution has been found a process capability analysis is performed by comparing the properties of fitted distribution to specification limits. • When the researcher observes the process directly and can control or monitor the datacollection procedure, the study is a true process capability study because by controlling data collection and knowing the time sequence of the data, inferences can be made about the stability of the process over time. • Major applications of data from a process capability analysis are: 1. Predicting how well the process will meet tolerances. 2. Assisting, when necessary, in adjusting a process. 3. Reducing the variability in a manufacturing process. 4. Specifying performance requirements for new equipment. 5. Selecting between competing suppliers. 8.2 Using a Histogram or Probability Plots • One advantage of using a histogram is the immediate visual impression of process performance and that it could possibly indicate a reason for poor performance (off-target, outliers, skewness, bimodality, etc.). • For a histogram to be moderately stable so that it can reliably estimate process capability, Montgomery recommends that at least 100 observations be taken from the process. 105 • The histogram along with the mean x and standard deviation s enable us to assess process capability by looking first at the shape of the histogram. If it reasonably approximates a normal distribution, then x ± 3s can be used when assessing process capability. • A normal probability plot with a test for normality (such as a Kolmogorov-Smirnov test) are commonly used as supplementary checks of normality. Example 1: I used SAS to generate two data sets of 250 values from two distributions having µ = 20. • The first data set contains 250 random values from a normal N (20, 1) distribution. The variable is denoted NORMAL. • The second data set contains 250 random values from a gamma (.5,40) distribution. The variable is denoted GAMMA. • Suppose the lower and upper specification limits are LSL=17 and USL=23, respectively. • Histograms (1) and (2) have a normal pdf superimposed on the normal and gamma data histograms, respectively. • Histograms (3) and (4) have a gamma pdf superimposed on the normal and true gamma data histograms, respectively. • The estimated parameters shown below each plot are the maximum likelihood estimates (MLEs). • The quality of the fitted distribution to the hypothesized distribution can be assessed with goodness-of-fit tests. • SAS can output the results for the (i) Anderson-Darling Test, (ii) Cramer Von-Mises Test, (3) Kolmogorov-Smirnov Test, and (4) the (not-recommended) Chi-Square Goodness-of-Fit Test. SAS Summary Statistics for the Normal(20,1) sample data: -------------------------------------------------------The CAPABILITY Procedure Variable: _normal Moments N Mean Std Deviation Skewness Uncorrected SS Coeff Variation 250 20.0544549 0.98469082 0.12451955 100786.725 4.91008519 Sum Weights Sum Observations Variance Kurtosis Corrected SS Std Error Mean 250 5013.61374 0.96961602 0.28268622 241.434388 0.06227732 Basic Statistical Measures Location Mean Median Mode 20.05445 19.98213 . Variability Std Deviation Variance Range Interquartile Range 106 0.98469 0.96962 5.90262 1.36525 Tests for Normality Test --Statistic--- -----p Value------ Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling W D W-Sq A-Sq Pr Pr Pr Pr 0.994503 0.037547 0.059499 0.378384 Quantiles W D W-Sq A-Sq 0.5028 >0.1500 >0.2500 >0.2500 Extreme Observations Quantile 100% Max 99% 95% 90% 75% Q3 50% Median 25% Q1 10% 5% 1% 0% Min < > > > Estimate 23.3518731 22.4471940 21.7529221 21.2904965 20.7315978 19.9821281 19.3663452 18.9203281 18.4856329 17.8064801 17.4492496 -------Lowest------- -------Highest------ Value Obs Value Obs 17.4492496 17.5315695 17.8064801 17.8153951 17.8168153 239 29 234 214 5 22.0698526 22.1224929 22.4471940 22.9921756 23.3518731 33 213 70 56 61 Specification Limits --------Limit-------- ------Percent------- Lower (LSL) Target Upper (USL) % < LSL % Between % > USL 17.00000 20.00000 23.00000 0.00000 99.60000 0.40000 Process Capability Indices Index Cp CPL CPU Cpk Cpm Value 1.015547 1.033981 0.997113 0.997113 1.013998 95% Confidence Limits 0.926361 0.934039 0.900105 0.900280 0.926976 1.104631 1.133481 1.093675 1.093946 1.104973 SAS Summary Statistics for the Gamma(.5,40) sample data: -------------------------------------------------------The CAPABILITY Procedure Variable: _gamma Moments N Mean Std Deviation 250 19.834919 3.20121968 Sum Weights Sum Observations Variance 107 250 4958.72976 10.2478074 Skewness Uncorrected SS Coeff Variation 0.300444 100907.707 16.1393131 Kurtosis Corrected SS Std Error Mean -0.1739938 2551.70405 0.20246291 Basic Statistical Measures Location Mean Median Mode Variability 19.83492 19.73126 . Std Deviation Variance Range Interquartile Range 3.20122 10.24781 18.15474 4.66168 Tests for Normality Test --Statistic--- -----p Value------ Shapiro-Wilk Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling W D W-Sq A-Sq Pr Pr Pr Pr 0.990459 0.048292 0.109171 0.650947 Quantiles W D W-Sq A-Sq Estimate -------Lowest------- 30.1185447 27.1717936 25.3220567 23.9723333 22.2090666 19.7312570 17.5473890 15.7160413 14.9488884 13.5740292 11.9638075 -------Highest------ Value Obs Value Obs 11.9638075 13.2888758 13.5740292 13.6244628 13.6678656 218 174 234 1 17 26.9835419 27.1096947 27.1717936 27.2287022 30.1185447 173 28 96 176 5 Specification Limits --------Limit-------- ------Percent------- Lower (LSL) Target Upper (USL) % < LSL % Between % > USL 17.00000 20.00000 23.00000 18.40000 64.00000 17.60000 Process Capability Indices Index Cp CPL CPU Cpk Cpm 0.1010 >0.1500 0.0878 0.0909 Extreme Observations Quantile 100% Max 99% 95% 90% 75% Q3 50% Median 25% Q1 10% 5% 1% 0% Min < > > > Value 0.312381 0.295192 0.329570 0.295192 0.311966 95% Confidence Limits 0.284947 0.246202 0.278902 0.246412 0.285194 0.339783 0.343748 0.379784 0.343971 0.339956 108 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Distribution of _normal 25 20 N Cp Cpk Cpm 250 1.02 1.00 1.01 Summary Statistics Mean Std Dev Skewness Kurtosis 20.05 0.985 0.125 0.283 Percent 15 10 5 0 17.1 17.7 18.3 18.9 19.5 20.1 20.7 21.3 21.9 22.5 23.1 _normal Specifications and Curve Lower=17 Normal(Mu=20.054 Sigma=0.9847) Target=20 Upper=23 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Distribution of _gamma 25 20 N Cp Cpk Cpm 250 0.31 0.30 0.31 Summary Statistics Mean Std Dev Skewness Kurtosis 19.83 3.201 0.300 -.174 Percent 15 10 5 0 10 12 14 16 18 20 22 24 26 28 _gamma Specifications and Curve Lower=17 Normal(Mu=19.835 Sigma=3.2012) 109 Target=20 Upper=23 30 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Distribution of _normal 25 20 N Cp Cpk Cpm 250 1.02 1.00 1.01 Summary Statistics Mean Std Dev Skewness Kurtosis 20.05 0.985 0.125 0.283 Percent 15 10 5 0 17.1 17.7 18.3 18.9 19.5 20.1 20.7 21.3 21.9 22.5 23.1 _normal Specifications and Curve Lower=17 Gamma(Theta=0 Alpha=417 Sigma=0.05) Target=20 Upper=23 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Distribution of _gamma 30 25 N Cp Cpk Cpm 250 0.31 0.30 0.31 Summary Statistics Mean Std Dev Skewness Kurtosis 19.83 3.201 0.300 -.174 Percent 20 15 10 5 0 10 12 14 16 18 20 22 24 26 28 30 _gamma Specifications and Curve Lower=17 Gamma(Theta=0 Alpha=38.6 Sigma=0.51) 110 Target=20 Upper=23 SAS Code for Process Capability Example with Normal and Gamma Data DM ’LOG; CLEAR; OUT; CLEAR;’; * ODS PRINTER PDF file=’C:\COURSES\ST528\SAS\cp1.pdf’; ODS LISTING; OPTIONS LS=78 PS=500 NONUMBER NODATE; *******************************************************************; *** NORMAL AND GAMMA VARIATES FROM DISTRIBUTIONS WITH MEAN = 20 ***; *******************************************************************; DATA in; DO N = 1 TO 250; _normal = 20 + RANNOR(5510); ** NORMAL(20,1) **; _gamma = .5*RANGAM(20921,40); ** GAMMA(.5,40) **; OUTPUT; END; SYMBOL1 VALUE=dot WIDTH=3 L=1; TITLE ’PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA’; PROC CAPABILITY DATA=in; VAR _normal _gamma; SPEC LSL=17 USL=23 TARGET=20 ; ** Specify responses ; ** Enter specifications; *** Make histograms of the normal and gamma data ; *** with the MLE normal pdf and statistics superimposed ; HISTOGRAM _normal _gamma / NORMAL(INDICES); INSET MEAN (5.3) STD=’Std Dev’ (5.3) SKEWNESS (5.3) KURTOSIS (5.3) / HEADER = ’Summary Statistics’ POS = NE; INSET N CP (4.2) CPK (4.2) CPM (4.2) / POS = NW; *** Make histograms of the normal and gamma data ; *** with the MLE gamma pdf and statistics superimposed ; HISTOGRAM _normal _gamma / GAMMA(THETA=0 INDICES); INSET MEAN (5.3) STD=’Std Dev’ (5.3) SKEWNESS (5.3) KURTOSIS (5.3) / HEADER = ’Summary Statistics’ POS = NE; INSET N CP (4.2) CPK (4.2) CPM (4.2) / POS = NW; *** Make empirical CDF plots of the normal and gamma data ; *** with the MLE normal CDF superimposed ; CDFPLOT _normal _gamma / NORMAL; *** Make QQ and PP plots of the normal data ; QQPLOT _normal / NORMAL; PPPLOT _normal / NORMAL; RUN; • As an alternative to the histogram, we can use probability plots (such as CDF plots, percentilepercentile (PP) plots, and quantile-quantile (QQ) plots) to study process capability. • Plot (5) has the fitted normal CDF plot superimposed on the empirical CDF plot for the random normal data. • Plot (6) has the fitted normal CDF plot superimposed on the empirical CDF plot for the random gamma data. • Plot (7) is quantile plot of the random normal data versus the quantiles assuming a normal distribution. • Plot (8) is a normal probability plot of the random normal data. 111 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Cumulative Distribution Function for _normal 100 Cumulative Percent 80 60 40 20 0 18 20 22 24 _normal Specifications and Normal Curve Lower=17 Mu=20.054 Sigma=0.9847 Target=20 Upper=23 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Cumulative Distribution Function for _gamma 100 Cumulative Percent 80 60 40 20 0 10 15 20 25 30 _gamma Specifications and Normal Curve Lower=17 Mu=19.835 Sigma=3.2012 112 Target=20 Upper=23 35 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA Q-Q Plot for _normal 24 _normal 22 20 18 16 -3 -2 -1 0 1 2 3 Normal Quantiles Specifications Lower=17 Target=20 Upper=23 PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA P-P Plot for _normal Cumulative Distribution of _normal 1.0 0.8 0.6 0.4 0.2 0.0 0.0 0.2 0.4 0.6 Normal(Mu=20.054 Sigma=0.9847) 113 0.8 1.0 • SAS output (9A) contains results for these tests fitting a (hypothesized) normal distribution to the random normal data. All p-values are large so we fail to reject the null hypothesis of a normal distribution. • SAS output (9B) contains results for these tests fitting a (hypothesized) normal distribution to the random gamma data. All p-values are relatively small so there is evidence to reject the null hypothesis of a normal distribution. PROCESS CAPABILITY COMPARISON OF NORMAL AND GAMMA DATA OUTPUT 9A The CAPABILITY Procedure Fitted Normal Distribution for _normal Parameters for Normal Distribution Parameter Symbol Estimate Mean Std Dev Mu Sigma 20.05445 0.984691 Goodness-of-Fit Tests for Normal Distribution Test ----Statistic----- Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Chi-Square D W-Sq A-Sq Chi-Sq 0.0375466 0.0594991 0.3783838 11.3270226 DF 7 ------p Value-----Pr Pr Pr Pr > > > > D W-Sq A-Sq Chi-Sq >0.150 >0.250 >0.250 0.125 Percent Outside Specifications for Normal Distribution Lower Limit LSL Obs Pct < LSL Est Pct < LSL Upper Limit 17.000000 0 0.096127 USL Obs Pct > USL Est Pct > USL 23.000000 0.400000 0.138878 Capability Indices Based on Normal Distribution Cp CPL CPU Cpk Cpm 1.015547 1.033981 0.997113 0.997113 1.013998 Quantiles for Normal Distribution Percent 1.0 5.0 10.0 25.0 50.0 75.0 90.0 95.0 99.0 ------Quantile-----Observed Estimated 17.8065 18.4856 18.9203 19.3663 19.9821 20.7316 21.2905 21.7529 22.4472 17.7637 18.4348 18.7925 19.3903 20.0545 20.7186 21.3164 21.6741 22.3452 114 OUTPUT 9B The CAPABILITY Procedure Fitted Normal Distribution for _gamma Parameters for Normal Distribution Parameter Symbol Estimate Mean Std Dev Mu Sigma 19.83492 3.20122 Goodness-of-Fit Tests for Normal Distribution Test ----Statistic----- Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Chi-Square D W-Sq A-Sq Chi-Sq 0.04829201 0.10917094 0.65094719 6.39603200 DF 7 ------p Value-----Pr Pr Pr Pr > > > > D W-Sq A-Sq Chi-Sq >0.150 0.088 0.091 0.494 Percent Outside Specifications for Normal Distribution Lower Limit LSL Obs Pct < LSL Est Pct < LSL Upper Limit 17.000000 18.400000 18.792339 USL Obs Pct > USL Est Pct > USL 23.000000 17.600000 16.140229 Capability Indices Based on Normal Distribution Cp CPL CPU Cpk Cpm 0.312381 0.295192 0.329570 0.295192 0.311966 Quantiles for Normal Distribution Percent 1.0 5.0 10.0 25.0 50.0 75.0 90.0 95.0 99.0 ------Quantile-----Observed Estimated 13.5740 14.9489 15.7160 17.5474 19.7313 22.2091 23.9723 25.3221 27.1718 12.3878 14.5694 15.7324 17.6757 19.8349 21.9941 23.9374 25.1005 27.2821 • Output 10A and 10B contains the parameter estimates for fitting the normal data to a gamma distribution (10A) and for fitting the gamma data to a gamma distribution (10B). • They also contain tables of the observed versus estimated quantiles. If the fitted distribution is a good choice, then the quantiles should be close. • The output also contains process capability indices that we will discuss in the next section. 115 OUTPUT 10A The CAPABILITY Procedure Fitted Gamma Distribution for _normal Parameters for Gamma Distribution Parameter Symbol Estimate Threshold Scale Shape Mean Std Dev Theta Sigma Alpha 0 0.048128 416.6901 20.05445 0.982436 Goodness-of-Fit Tests for Gamma Distribution Test ----Statistic----- Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Chi-Square D W-Sq A-Sq Chi-Sq 0.0313208 0.0488707 0.3381429 11.2562464 DF 7 ------p Value-----Pr Pr Pr Pr > > > > D W-Sq A-Sq Chi-Sq >0.500 >0.500 >0.500 0.128 Percent Outside Specifications for Gamma Distribution Lower Limit LSL 17.000000 Obs Pct < LSL 0 Est Pct < LSL 0.054527 Upper Limit USL 23.000000 Obs Pct > USL 0.400000 Est Pct > USL 0.199484 Capability Indices Based on Gamma Distribution Cp CPL CPU Cpk Cpm 1.017742 1.083847 0.957809 0.957809 0.968746 Quantiles for Gamma Distribution Percent 1.0 5.0 10.0 25.0 50.0 75.0 90.0 95.0 99.0 ------Quantile-----Observed Estimated 17.8065 18.4856 18.9203 19.3663 19.9821 20.7316 21.2905 21.7529 22.4472 17.8400 18.4663 18.8062 19.3834 20.0384 20.7081 21.3234 21.6973 22.4105 116 OUTPUT 10B Fitted Gamma Distribution for _gamma Parameters for Gamma Distribution Parameter Symbol Estimate Threshold Scale Shape Mean Std Dev Theta Sigma Alpha 0 0.513866 38.59943 19.83492 3.192567 Goodness-of-Fit Tests for Gamma Distribution Test ----Statistic----- Kolmogorov-Smirnov Cramer-von Mises Anderson-Darling Chi-Square D W-Sq A-Sq Chi-Sq 0.03369770 0.04294087 0.27089970 3.64833166 DF 7 ------p Value-----Pr Pr Pr Pr > > > > D W-Sq A-Sq Chi-Sq >0.500 >0.500 >0.500 0.819 Percent Outside Specifications for Gamma Distribution Lower Limit LSL 17.000000 Obs Pct < LSL 18.400000 Est Pct < LSL 18.947093 Upper Limit USL 23.000000 Obs Pct > USL 17.600000 Est Pct > USL 15.960379 Capability Indices Based on Gamma Distribution Cp CPL CPU Cpk Cpm 0.312763 0.330698 0.299782 0.299782 0.269220 Quantiles for Gamma Distribution Percent 1.0 5.0 10.0 25.0 50.0 75.0 90.0 95.0 99.0 ------Quantile-----Observed Estimated 13.5740 14.9489 15.7160 17.5474 19.7313 22.2091 23.9723 25.3221 27.1718 13.1701 14.8915 15.8692 17.5986 19.6639 21.8850 24.0206 25.3618 28.0075 • In general, we will relate the empirical distribution to a theoretical distribution. The parameters of the theoretical distribution can be specified or estimated from the data. • We will choose a distribution that ‘best’ represents the data. This can be based on scientific or engineering principles or by empirical modeling among competing distributions. The following figure is a guide to the choice of a distribution by locating the measures of skewness (β1 ) and kurtosis (β2 ) on the figure. 117 • From the data we get estimates: q βb1 = Pn where Mj = i=1 (xi n − x)j βb2 = is the j th centered sample moment. • The relations between the SAS measures of skewness and kurtosis and β1 and β2 are (i) βb1 ≈ (SAS skewness)2 and βb2 ≈ (SAS kurtosis) + 3. • If the point (βb1 , βb2 ) falls in a region where none of the distributions seem appropriate, you will need to consider other families of distributions (e.g. Weibull). 118