Show TOC

Function documentationSPC Algorithms Locate this document in the navigation structure

 

You can use this inbuilt algorithms in SAP MII to build Quality Management Applications that implement Statistical Process Control (SPC) on the shop floor.

Features

Cp

Cp, usually referred as Capability, is a statistic that determines whether a process confirms to the specifications.

The following formula is used to calculate Cp:

This graphic is explained in the accompanying text.

Where:

  • USL is the upper specification limit.

  • LSL is the lower specification limit.

  • sest is the estimate of standard deviation (usually from a control chart).

In general, this statistic assumes that the process is normally distributed and in a strate of statistical control. The results are not reliable when the process is not in a state of statistical control and abnormally distributed. The general practice to determine the standard deviation estimate is based on a control chart.

Cpk

Cpk, referred as Capability Index, is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the Cpk:

Cpk = Min(Cpu, Cpl)

where:

  • Cpu is the upper capability index.

  • Cpl is the lower capability index.

A process is capble only when the Cpk value is 1.33 or greater. For a one-sided tolerance, the Cpk is equivalent to either Cpu or Cpl depending on which tolerance limit is specified.

Cpl

Cpl, Lower Capability Index, is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the Cpl:

This graphic is explained in the accompanying text.

Where:

  • is the overall process average.

  • LSL is the lower specification or tolerance limit.

  • sest is the estimate of standard deviation.

Cpu

Cpu, Upper Capability Index, is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the Cpu:

This graphic is explained in the accompanying text.

Where:

  • is the overall process average.

  • USL is the upper specification or tolerance limit.

  • sest is the estimate of standard deviation.

Cr

Cr, Capability Ratio, is the inverse of Cp.

The following formula is used to calculate the Cr:

This graphic is explained in the accompanying text.

EstCp

The EstCp is similar to Cp. The difference is EstCp uses an estimate of standard deviation based on individuals, whereas Cp uses the estimate based on a control chart or individuals.

The following formula is used to calculate the EstCp:

This graphic is explained in the accompanying text.

Where:

  • USL is the upper specification limit.

  • LSL is the lower specification limit.

  • sest is the estimate of standard deviation based on individual measurements.

The following formula is used to calculate the estimate of standard deviation for EstCp:

This graphic is explained in the accompanying text.

Note Note

EstCp is also referred to as Performance Index (Pp).

End of the note.
EstCpk

EstCpk is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the Cpk:

This graphic is explained in the accompanying text.

Where:

  • EstCpu is the upper capability index.

  • EstCpl is the lower capability index.

EstCpk and Cpk are equivalent when the estimate of standard deviation used to calculate Cpu and Cpl is based on individual measurements.

EstCpl

EstCpl is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the EstCpl:

This graphic is explained in the accompanying text.

Where:

  • is the overall process average.

  • USL is the upper specification or tolerance limit.

  • sest is the standard deviation estimate based on individual measurements.

Cpl and EstCpl are equivalent when the standard deviation estimate used is based on individuals. However, the standard deviation estimate used to calculate Cpl is based on a control chart, the values of these two statistics are slightly different. EstCpl always uses the standard deviation estimate based on individuals whereas Cpl use the standard deviation estimate based on individuals or an estimate from a control chart.

This graphic is explained in the accompanying text.

EstCpu

EstCpu is a statistic that indicates both the centering and ability of the process to conform to specifications.

The following formula is used to calculate the EstCpu:

This graphic is explained in the accompanying text.

Where:

  • s the overall process average.

  • USL is the upper specification or tolerance limit.

  • sest is the standard deviation estimate based on individual measurements.

Cpu and EstCpu are equivalent when the standard deviation estimate is based on individuals. The values are slightly different when the standard deviation estimate for Cpu is based on a control chart. EstCpu always uses the standard deviation estimate based on individuals whereas Cpu uses the standard deviation estimate based on individuals or an estimated from the control chart.

The following formula is used to calculate sest:

This graphic is explained in the accompanying text.

EstCr

The EstCr is the estimated capability ratio and is the inverse of EstCp.

The following formula is used to calculate the EstCr:

This graphic is explained in the accompanying text.

EstPercentNCHigh

The EstPercentNCHigh statistic represents the total percentage of USL given a normal distribution with the same standard deviation to estimate from the sample data.

EstPercentNCLow

The EstPercentNCHigh statistic represents the total percentage of LSL given a normal distribution with the same standard deviation to estimate from the sample data.

EstPercentNCPPM

The EstPercentNCPPM statistic represents the parts per million (ppm) percent non-conforming based on the assumption that the data is from a normal distribution. That is, this quantity represents the ppm you would expect given a normal distribution with the same standard deviation as that estimated from the sample data.

EstPercentNCTotal

The EstPercentNCTotal statistic represents the total percentage of samples outside of the specifications given a normal distribution with the same standard deviation as that estimated from the sample data.

EstStdDev

The EstStdDev is a measure of the spread or variation in a distribution and is calculated based on an average range, average moving range, or average standard deviation from a control chart. The formula that is used to calculate the EstStdDev depends on the type of control chart.

For control charts based on a range or moving range, the following formula is used:

This graphic is explained in the accompanying text.

For control charts based on standard deviation, the following formula is used:

This graphic is explained in the accompanying text.

where

This graphic is explained in the accompanying text.

and d2 and c4 are constants based on the subgroup size of the sample.

EstZLSL

The following formula is used to calculate EstZLSL:

This graphic is explained in the accompanying text.

Where:

  • LSL is the lower specification limit.

  • Mean is the overall average.

  • sest is an standard deviation estimate based on individual measurements rather than a control chart.

EstZUSL

The following formula is used to calculate EstZUSL:

This graphic is explained in the accompanying text.

Where:

  • USL is the upper specification limit.

  • Mean is the overall average.

  • sest is an standard deviation estimate based on individual measurements rather than a control chart.

Exponentially Weighted Moving Average (EWMA) Chart

The calculation of control limits for the EWMA chart depends on the type of dispersion chart that is being used.

For EWMA charts based on a range or moving range, the limits are calculated as follows:

This graphic is explained in the accompanying text.

For EWMA charts based on standard deviation charts, the control limits are calculated as follows:

This graphic is explained in the accompanying text.

Note Note

You have specified the parameter in the formulae.

End of the note.
Kurtosis

The kurtosis of a distribution describes the relative peakedness or flatness of the distribution relative to a normal distribution. A positive kurtosis indicates a peaked distribution while negative kurtosis indicates a flat distribution.

The following formula is used to calculate the kurtosis:

This graphic is explained in the accompanying text.

Max

The max is the largest value in a set of samples.

Mean

The mean of a distribution is the average of all samples. The following formula is used to calculate the mean:

This graphic is explained in the accompanying text.

Median

The median of a distribution is the middle value, that is, half of the numbers in the sample fall above the median and half below.

To calculate the median, sort the numbers from lowest to highest. If the number of samples is odd, pick the number in the middle of the sorted list to be the median. If the number of samples is even, pick the two values in the middle and average them to obtain the median.

Example Example

  • Odd Number of Samples: If the sample data is 94, 98, 90, 95, 91, 94, 96, 95, 100, then the calculated median is 95.

  • Even Number of Samples: If the sample data is 90, 91, 94, 94, 94, 95, 95, 96, 98, 100, then there are two middle values 94 and 95. The average of these two numbers, 94.5 is the median.

End of the example.
Min

The min is the smallest value in a set of samples.

PercentNCHigh

The PercentNCHigh statistic represents the percentage of samples that are above the upper specification limit (USL).

The following formula is used to calculate this statistic:

This graphic is explained in the accompanying text.

PercentNCLow

The PercentNCHigh statistic represents the percentage of samples that are above the upper specification limit (USL). The following formula is used to calculate this statistic:

This graphic is explained in the accompanying text.

PercentNCPPM

The PercentNCPPM statistic represents the parts per million percent non-conforming. The following formula is used to calculate this statistic:

This graphic is explained in the accompanying text.

PercentNCTotal

The PercentNCTotal statistic represents the percentage of samples that are outside the specification limits. The following formula is used to calculate this statistic:

This graphic is explained in the accompanying text.

Pp

Pp and EstCp are equivalent.

Ppk

Ppk and EstCpk are equivalent.

Ppm

The ppm is the parts per million non-conforming. The following formula is used to calculate ppm:

This graphic is explained in the accompanying text.

Pr

The Pr is the estimated capability ratio and the inverse of EstCp. The following formula is used to calculate the EstCr:

This graphic is explained in the accompanying text.

Pr and EstCr are equivalent.

Range

The range is the difference between the max and min. The formula that is used to calculate the range is:

This graphic is explained in the accompanying text.

Shapiro-Wilk Test

Studies show that the Shapiro-Wilk (W—) test is the most powerful omnibus test of normality against a wide range of alternative distributions. In our test, the p-value of W is obtained through simulation. Hence, it is not a bug if the p-values obtained from two simulations (i.e., two successive runs of the test) are slightly different. Using the default simulation size of 1000, the absolute maximum error of the p-value is less than 3.3% at a 95% confidence level. If you get a marginal p-value, you should consider increasing the simulation size and performing the test again. The absolute maximum error is less than 1/sqrt(N) where N is the simulation size.

Although the W—test is the most powerful test of normality, its actual power is still low when the sample size is small.

Skewness

The skewness describes the asymmetry of a distribution about its mean. A positive value for skewness indicates the distribution is skewed to the positive side. A negative skewness value indicates an asymmetric tail toward the negative side. The following formula is used to calculate the skewness:

This graphic is explained in the accompanying text.

Standard Deviation

The standard deviation is a measure of the spread or variation in a distribution. The following formula is used to calculate the standard deviation:

This graphic is explained in the accompanying text.

Sum

The sum adds all samples. The following formula is used to calculate the sum:

This graphic is explained in the accompanying text.

TotalAboveUSL

The TotalAboveUSL is the count of the number of samples that are above the USL.

TotalBelowLSL

The TotalBelowLSL is the count of the number of samples that are below the LSL.

TotalNonConformities

The TotalNonConformities is the count of the number of samples that are outside the specification limits.

Variance

The variance of a distribution is the square of the standard deviation and an indication of the spread or dispersion of the distribution. The following formula is used to calculate the variance:

This graphic is explained in the accompanying text.

ZLSL

The following formula is used to calculate ZLSL:

This graphic is explained in the accompanying text.

Where:

  • LSL is the lower specification limit.

  • Mean is the overall average.

  • sest is an standard deviation estimate from a control chart.

ZMIN

The following formula is used to calculate ZMIN:

This graphic is explained in the accompanying text.

ZUSL

The following formula is used to calculate ZUSL:

This graphic is explained in the accompanying text.

Where:

  • USL is the upper specification limit.

  • Mean is the overall average.

  • sest is an standard deviation estimate from a control chart.

Variables Control Chart Calculations

Control charts based on continuous data are called variables control charts. Typical control chart types include the following:

  • XBar and Range

  • Individuals and Moving Range

  • XBar and Standard Deviation

XBar and Range Chart Formulas

XBar chart control limits are calculated as follows:

This graphic is explained in the accompanying text.

Range chart control limits are calculated as follows:

This graphic is explained in the accompanying text.

Individuals and Moving Range Formulas

The moving range is defined as the absolute difference between consecutive samples. Individuals chart control limits are calculated as follows:

This graphic is explained in the accompanying text.

Moving range control limits are calculated as follows:

This graphic is explained in the accompanying text.

XBar and Standard Deviation Chart Formulas

The standard deviation for a subgroup is defined as follows:

This graphic is explained in the accompanying text.

Where n is the subgroup size.

The control limits for the XBar chart are calculated as follows:

This graphic is explained in the accompanying text.

is defined as follows and n is the number of subgroups.

This graphic is explained in the accompanying text.

The control limits for the standard deviation chart are calculated as follows:

This graphic is explained in the accompanying text.

XBar and Range Chart

The XBar and range chart is a control chart that is used to monitor processes when the data are included in a subgroup. The Western Electric (WECO) rules can be applied to the XBar and range chart. For more information on the WECO rules see the section on Western Electric Rules.

An example of an XBar and range chart is shown below:

This graphic is explained in the accompanying text.

The top chart plots the average of a subgroup of data while the bottom chart plots the range of the subgroup. The range is the difference between the largest and smallest values within a subgroup. The table below illustrates how subgroup averages and ranges are calculated:

Sample

Subgroup

Value

Subgroup Average

Subgroup Range

1

1

99.64

2

1

100.99

3

1

99.37

100.00

1.61

The first subgroup consists of the three sample values 99.64, 100.98 and 99.37. The subgroup average is the sum of these three values divided by the number of samples in the subgroup. Sum = 99.64 + 100.99 + 99.37 = 300 Average = 299.99 / 3 = 100.00 The range is the difference between the largest and smallest values. Largest value = 100.99 Smallest value = 99.37 Range = Largest – Smallest = 100.99 – 99.37 = 1.61

XBar and Range Formulas

The control limits for the XBar chart are calculated using the following formulas:

This graphic is explained in the accompanying text.

Where:

  • A2 is a constant and is dependent on the subgroup size.

  • is the overall average of the samples.

The control limits for the range chart are calculated using the following formulas:

This graphic is explained in the accompanying text.

Where:

  • D3 and D4 are constants and are dependent on the subgroup size.

  • is the average range.

  • is the overall average of the samples.

Box and Whisker Chart

The Box and Whisker Chart is ideal for displaying both the center and variability of a process on the same chart. The figure below displays and explains the components of a typical Box and Whisker Chart.

This graphic is explained in the accompanying text.

Fences are used to identify outliers.

  • The upper fence is drawn with limits defined as U1 = upper quartile + 1.5 * IQ and U2 = upper quartile + 3.0 * IQ. The quantity IQ in the equations above is the inter-quartile range.

  • The lower fence is drawn with limits defined as L1 = lower quartile – 1.5 * IQ and L2 = lower quartile – 3.0 * IQ. Values that fall within one of the fences are considered outliers.

  • The box in a Box and Whisker Chart is bounded by the first and third quartiles. Thus, the box contains the middle 50% of the data.

  • Typically the median is marked with a symbol. In the sample chart above the symbol is a horizontal line.

Note Note

The Box and Whisker control allows you to select alternative symbols to denote the median.

End of the note.
Exponentially Weighted Moving Average (EWMA) Chart

The EWMA Chart is a weighted moving average control chart where the weight decreases as the samples get older. The figure below shows a standard control chart with EWMA values and control limits.

This graphic is explained in the accompanying text.

The green dots on the chart represent the exponentially weighted moving averages. These quantities are calculated as follows: For the first point we use the following formula:

This graphic is explained in the accompanying text.

Note Note

is a constant weighting factor that varies from 0 to 1. The quantity is the overall average while the quantity x bar is the actual observed value or observed average depending on the control chart type.

If the field Use Avg. of All Subgroups for 1st Point Calculation is selected in i5SPCChart Parameters screen, represents the overall average value else the value 0.0 for is considered to calculate the first point on EWMA Chart.

End of the note.

For the remaining points, the following formula is used:

This graphic is explained in the accompanying text.

Control Limit Formulas

The calculation of control limits for the EWMA chart depends on the type of dispersion chart. For EWMA charts based on a range or moving range, the limits are calculated as follows:

This graphic is explained in the accompanying text.

For EWMA charts based on standard deviation charts, the control limits are calculated as follows:

This graphic is explained in the accompanying text.

This graphic is explained in the accompanying text.

Individuals and Moving Range Chart

The Individuals and Moving Range (IMR) chart is a control chart used to monitor processes where sampling is done on an individual basis rather than using subgrouped data. The WECO rules can be applied to an IMR chart.

Below is an example of an IMR chart.

This graphic is explained in the accompanying text.

The top chart plots each individual measurement while the bottom chart plots the moving range between consecutive samples. The moving range is the absolute difference between two consecutive samples. For example, in the chart above the first two sample values along with moving range are listed in the following table:

Sample

Value

MR

1

99.64

2

100.98

1.35

Individuals and Moving Range Formulas

Individuals chart control limits are calculated as follows:

This graphic is explained in the accompanying text.

Moving range control limits are calculated as follows:

This graphic is explained in the accompanying text.

In the formulas above, the quantity is defined as follows:

This graphic is explained in the accompanying text.

The quantity is defined as follows:

This graphic is explained in the accompanying text.

Where m is the number of values in the subgroup

The difference between data point xand its predecessor (moving range) is calculated as:

Next, the arithmetic mean (average) moving range of these values is calculated as:

The centerline, upper and lower control limits are calculated as:

Individual Charts

The average of individual values is calculated as follows:

This graphic is explained in the accompanying text.

Where m is the number of values in the subgroup

The difference between data point and its predecessor (moving range) is calculated as:

This graphic is explained in the accompanying text.

Next, the arithmetic mean (average) moving range of these values is calculated as:

This graphic is explained in the accompanying text.

The centerline, upper and lower control limits are calculated as:

This graphic is explained in the accompanying text.

Individuals Moving Range (MR) Chart

The chart calculations are:

This graphic is explained in the accompanying text.

starting with i = 2 (MR1 = 0).

The arithmetic mean (average) moving range of these values is calculated as:

This graphic is explained in the accompanying text.

where m is the number of measurement values on the chart

This graphic is explained in the accompanying text.

Moving Range Charts

The range chart plots the moving range for each subgroup. The moving range is the absolute difference between the average for the subgroup minus the average of the previous subgroup. For each subgroup, starting with the second one, the moving range is calculated and plotted. The chart calculations are as follows:

The mean (average) of the values in each subgroup is calculated as:

This graphic is explained in the accompanying text.

where m is the subgroup size.

The moving range for each subgroup is calculated as:

This graphic is explained in the accompanying text.

starting with i=2 (MR1 = 0).

The arithmetic mean (average moving range) of these values is calculated as:

This graphic is explained in the accompanying text.

where m is the number of measurement values

This graphic is explained in the accompanying text.

Western Electric Rules

A control chart is designed to help operators and managers determine if a process is producing consistent results with respect to a quality characteristic. One of the common techniques used to help make this determination is a set of rules commonly referred to as the Western Electric (WECO) rules.

Note Note

You have to understand the concept of standard deviation zones to understand the WECO rules.

End of the note.

This graphic is explained in the accompanying text.

The above figure has three colored zones. These zones are the regions between zero and three standard deviations from the mean broken into one standard deviation increments.

Our system implements the nine most common WECO rules.

Rule 1: A single point outside of the control limits

This graphic is explained in the accompanying text.

In this sample chart a single point is below the lower control limit and is marked as a rule violation with a red diamond marker.

Rule 2: Run above or below the centerline

This graphic is explained in the accompanying text.

The above figure has seven consecutive points above the centerline. The points marked with red diamond markers represent a violation of WECO Rule #2. The number of points required to trigger a failure is configurable.

Rule 3: Trend

WECO Rule 3 looks for either an upward or downward trend.

This graphic is explained in the accompanying text.

The above chart shows an steadily increasing trend marked with red diamond markers. This trend represents a violation of rule 3. The number of points required to trigger a failure is configurable.

Rule 4 – Cyclic pattern

This graphic is explained in the accompanying text.

A consecutive pattern of up and down points as illustrated above causes a violation of Rule 4. Again, the number of consecutive points that trigger the violation is configurable.

Rule 5 – Two out of three points in Zone A or beyond

Recall from above that Zone A is the region between two and three standard deviations from the centerline.

This graphic is explained in the accompanying text.

The two points marked with red diamonds are both in Zone A. Since the rule looks for two out of three consecutive points in Zone A or above, the condition marked on the chart represents a violation of Rule 5.

Rule 6 – Four out of five points in Zone B or beyond

Recall that Zone B is the region between one and two standard deviations from the centerline.

This graphic is explained in the accompanying text.

Since there are four out of five points in Zone B, there is a violation of Rule 6.

Rule 7 – Fifteen consecutive points in Zone C

Recall that Zone C is the region between zero and one standard deviation from the centerline.

This graphic is explained in the accompanying text.

The points marked with red diamonds represent a violation of Rule 7 because they all fall within Zone C and the number of consecutive points within Zone C is fifteen or greater. The number of points that are required to trigger a violation is configurable.

Rule 8 – Eight consecutive points none of which fall within Zone C

This graphic is explained in the accompanying text.

Here we see nine consecutive points none of which fall in Zone C. This is an example of a violation of Rule 8. The number of points required to trigger a violation is configurable.

Rule 9 – One point outside of the specifications

Some implementations of the WECO rules include this rule which is not a statistical rule but a rule based on process specifications.

This graphic is explained in the accompanying text.

Here we have two violations of Rule 9. One violation is due to a point above the upper specification limit while the other is due to a point below the lower specification limit.

Additional Western Electric Rule Notes

Since the WECO rules are statistical in nature, a violation could occur when there is no change in the process. However, a violation may not occur when there is a change in the process. There is a delicate balance between these two types of errors and it is directly related to the number of rules that you choose to use on your charts.

In general, the more rules you use, the more likely you are to find a false alarm. On the other hand, the fewer rules you use, the more likely you are to miss a change in the process when one has occurred. Thus, as with all statistical analysis, you must determine your objectives and use a common sense approach to implementing the WECO rules on your charts.

More Information

  • Shapiro-Wilk Test

    • E.S. Pearson, R.B. D’Agostino, K.O. Bowman (1977), “Tests for departure from normality: Comparison of powers,” Biometrika 64, pp. 231-246.

    • S.S. Shapiro, M.B. Wilk (1965) “An analysis of variance test of normality (complete sample).” Biometrika 52, pp. 591-610.

  • Xbar and Range Formulas

    • Deming, W.E. (1982), Quality, Productivity and Competitive Position, Center for Advanced Engineering Study, Massachusetts Institute of Technology, Cambridge, MA, Chapter 7

    • Wheeler, Donald J. and Chambers, David S. (1992), Understanding Statistical Process Control, 2d ed., SPC Press, Inc. Knoxville, TN

  • Box and Whisker Chart

    • http://www.itl.nist.gov/div898/handbook/eda/section3/boxplot.htm.

    • Chambers, John, William Cleveland, Beat Kleiner, and Paul Tukey, (1983), Graphical Methods for Data Analysis, Wadsworth.

  • Exponentially Weighted Moving Average (EWMA) Chart

    • Hunter, J.S. (1986), “The Exponentially Weighted Moving Average.” Journal of Quality Technology, Vol. 18, No. 4, October 1986, pp. 203-210.

    • “Applying Statistical Quality Assurance Techniques to Evaluate Analytical Measurement System Performance,” ASTM STP 6299-02, ASTM.

  • Individual and Moving Range Formulas

    • Deming, W.E. (1982), Quality, Productivity and Competitive Position, Center for Advanced Engineering Study, Massachusetts Institute of Technology, Cambridge, MA, Chapter 7.

    • Wheeler, Donald J. and Chambers, David S. (1992), Understanding Statistical Process Control, 2d ed., SPC Press, Inc. Knoxville, TN.

  • Western Electric Rules

    • Deming, W.E. (1982), Quality, Productivity and Competitive Position, Center for Advanced Engineering Study, Massachusetts Institute of Technology, Cambridge, MA, Chapter 7.

    • Western Electric (1956), Statistical Quality Control Handbook, American Telephone and Telegraph Company, Chicago, IL Nelson, Lloyd S. (1984), Technical Aids – The Shewhart Control Chart – Tests for Special Causes, Journal of Quality Technology, Vol. 16, No. 4, October 1984, pp. 237-239.

    • Wheeler, Donald J. and Chambers, David S. (1992), Understanding Statistical Process Control, 2d ed., SPC Press, Inc. Knoxville, TN.