Control charts where the center line is a trend or slope?

G

Graeme

After some thought I have decided to go ahead and post this question, because I feel it is sufficiently different from others to be ... different. Besides, I want to use Excel to solve this, not rulers and pencils.

(Fair Notice: I have a long-winded discussion of the problem.)

Question – how are control limits for an SPC chart calculated when the center line is a trend?

What?” you say? Heresy! A trend is a “very bad thing” and a sure sign that things are out of control! Get rid of that nasty trend and all will be well in the world!

But wait, I say – maybe I’m talking about a special application – an application where a trend is expected, normal, and you can’t do anything to control it or get rid of it. Let me give a bit of background before re-stating the question.

Standard Shewhart statistical process control (SPC) charts are designed to monitor a process which produces a large number of measurements of the same "identical" feature over a relatively short period of time. Ideally the process holds a constant level. Random variation is easily visible, and that is good. The chart also gives visibility to variation that may not be random, such as points above or below the control limits, or an upward or downward trend. These things are considered bad.

SPC charts are also used in calibration labs to monitor measurement processes and measurement standards. Processes are typically monitored by use of a check standard – a device that is similar to the workload and measured at the same time as normal work. Recording and charting the values is similar to production SPC charts, except that there is much less data. Instead of producing hundreds of parts (measurements) per hour, the lab might generate 200 measurements a year – or only 20, depending on the workload. X and mR charts are much more common than X-bar and R charts. Still, things work about the same as the usual type.

The bigger problems come when trying to use SPC chart methods to monitor the variation of measurement standards. First, there is a data problem: if a standard is calibrated every 12 months, it naturally takes five years to get five measurement values. (In the calibration business, patience really is a virtue.) Calibrating more frequently than the usual interval will collect data more quickly, but that costs a lot of money and time. So we usually live with it. A bigger problem is that some things change in value over time – they drift. This is known and expected. Examples include shrinkage of gage blocks, drift of standard resistor values, change in the output of a DC volt standard, and many more examples. The drift is a natural phenomenon that can be compensated for but not controlled or adjusted. This means that values plotted on a graph will show a trend. On a standard SPC chart a trend may be a bad thing but for many measurement standards it’s just the way they are. The trend can be determined, often with linear regression, so I have a rate and direction of change over time. That can be used to determine an “assigned value” for right now, and to predict a value at times in the near future (up to one calibration interval). If control limits or – even better, 95% confidence limits – could be plotted around that trend, they would give an estimate of the standard deviation which is very useful in computing measurement uncertainty.

So the question before the group is this – how does one calculate control limits or confidence limits when the central line is a trend? I am looking for a method using Microsoft Excel, not a paper printout, ruler and pencil. Besides, I think confidence limits for this will be curves instead of straight lines.

Consider the following data set:
Code:
[FONT=Courier New][SIZE=3]Date (X)    Value (Y)[/SIZE][/FONT]
[FONT=Courier New][SIZE=3]1996-05-01  1.000 017[/SIZE][/FONT]
[FONT=Courier New][SIZE=3]1997-05-13  1.000 024 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]1998-06-05  1.000 022 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]1999-07-07  1.000 028 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2000-08-02  1.000 024 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2001-08-28  1.000 031 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2002-09-24  1.000 036 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2003-10-22  1.000 032 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2004-05-05  1.000 035 [/SIZE][/FONT]
[FONT=Courier New][SIZE=3]2005-05-11  1.000 036[/SIZE][/FONT]
When plotted, this series has an upward trend of about +5.4 x 10-9 per day or about +0.000 002 per year. From the regression line, I can be fairly confident in giving the device an assigned value of 1.000 037, and I can be fairly confident that in May 2006 the value will be near 1.000 039. My problem is that I don’t know (yet) how to quantify that confidence – the uncertainty – and without being able to do that these values are meaningless.

If the line was horizontal (slope = 0) then computing a value for the uncertainty of the device would be trivial. (Compute the standard deviation and multiply by an appropriate value of Student’s t for 95% confidence limits.) But the line has a non-zero slope … so,

How do I get the equivalent result when the center line is a trend?

(By the way, the device is a 1 Megohm standard resistor. But, it doesn’t really matter what it is – it could just as easily be the 1 Volt output of a DC volt standard, or a 1 Ohm standard resistor, or any of a number of other things. Also, precision of one part in 106 is fine for this application.)

TIA,
 
Last edited by a moderator:

bpritts

Involved - Posts
Graeme:

It occurs to me that you could use some of the same thinking used by
Short Run SPC to adjust the centerline based on the expected drift.
This would be true, at least, if the drift is predictable.


Alas, my knowledge of short run SPC is totally theoretical. But consider:

1) Determine a function to model the drift, as you have done with the
regression.

2) Chart the difference between the predicted and actual values. Use this
delta of predicted vs. actual as your "x" value. Should have a zero mean,
and be normal? (Would want to test these assumptions, but if you
developed the function using a regression, I think they will be!)

3) From there on, use the control limits as calculated.

My only concern is that the logic of this process may be circular. However,
I would think that you will still have some predictive value from the SPC
chart; outlier data should fall above the control limits. Maybe some
colleagues can comment on this?

I like this question, because it gives me an idea I can take to one of my
stamping clients. They have given up on SPC for many applications where
punches are used. Here, too, there are wear situations; if you punch a
hole with a spec of 20 +/- 1, for example, they will install a punch with a
diameter of 20.8 or so, then let the punch wear until it gets to 19.3, then
replace it. Plays **** with the Cpk, but meets customer requirements and
saves money.

What do you think?


Brad
 

Steve Prevette

Deming Disciple
Leader
Super Moderator
There is a hazard when you let the center line of SPC have a slope. Now you are estimating two quantities about the data - the y intercept and a slope. In linear regression, there are calculations for "prediction intervals" which are tough calculations and aren't readily available in excel unless you program them (which I have done so). The prediction intervals (which would be analogous to the control limits) actually curve. As we extraplote away from the center of the data, the prediction errors grow.

Personally, I think the right answer is to make a control chart for the slope. Plot the delta from one point to the next, and see if that (basically the first derivative) is in control. Then use that value for your drift rate.
 

Miner

Forum Moderator
Leader
Admin
What you describe is a perfectly legitimate for of SPC. While bpritts method would work, it would be more complicated for the user (unless it is automated). Normally, you would plot the regression line as the central line of the control chart. Since the control limits are determined by the Range, you can calculate them the same way as standard control limits. In this case they would parallel the regression line by the same +/- as if the line were horizontal.

The one caveat is that the subgroup Range should not trend also.
 

Steve Prevette

Deming Disciple
Leader
Super Moderator
Miner said:
What you describe is a perfectly legitimate for of SPC. While bpritts method would work, it would be more complicated for the user (unless it is automated). Normally, you would plot the regression line as the central line of the control chart. Since the control limits are determined by the Range, you can calculate them the same way as standard control limits. In this case they would parallel the regression line by the same +/- as if the line were horizontal.

The one caveat is that the subgroup Range should not trend also.

I do differ with your opinion. The control limits on a regression line will curve away from the center line, becoming farther away the farther you get from the horizontal center of the existing data.
 

Tim Folkerts

Trusted Information Resource
Attached is Minitab's analysis of the situation (a fitted regression line pasted into a M$Word document for uploading).

The 95% Confidence Interval for the regression line predictcts the position of the regression line itself. Since the location or the slope of the line could be off, this results in the curved lines the Steve described. The "true" regression line should fall within those bounds 95% ofthe time.

The 95% Prediction Interval gives the range in which a single new data point would be expected. These are straight lines parallel to the "best fit" regression line in the center.

At least, those are the general descriptions given in stat books. I'm not sure either one is completely ideal. The 95% prediction interval seems to assume that the "best" regression line is the true regression line. If the lines are extrapolated much farther on the graph, then it becomes clear that soon the CI will excede the PI. So we are 95% sure a data point will fall in a particular range, but not even 95% sure the line itself will fal in that range???

I think this is another, more extreme case of "collect at least 30 data points before making a control chart". For a standard chart, 30 points are need to ensure an accurate estimate of X-bar and sigma. Here we need to estimate X-bar, sigma and a slope. That probably means that more than 30 points would be appropriate.

I suspect that if you had 120 monthly data points instead of 12 yearly data points, the 95% CI for the line would be much tighter, but the 95% PI would be about the same. (In the same way that more data more data points makes the uncertainty in X-bar smaller but doesn't change sigma). Then the straight 95% PI lines (or change them to 99.7% PI) could be used effectively as control limits.

Tim F
 

Attachments

  • Sloping_Resisor_Data.doc
    34 KB · Views: 266

Miner

Forum Moderator
Leader
Admin
Steve Prevette said:
I do differ with your opinion. The control limits on a regression line will curve away from the center line, becoming farther away the farther you get from the horizontal center of the existing data.

What you are describing are not control limits but the confidence interval for the regression line. The reason the limits curve away is the confidence interval in the estimate of the slope of the line.

What I am describing is covered in the AIAG SPC manual under special types of control charts. The calculation of the control limits is the standard method based on the subgroup range. The only difference is that these limits are parallel to the Regression line at the same distance as the Central line of a standard control chart.

This special control chart is specifically designed for processes that are subject to a predictable and acceptable rate of tool wear. The intent is to accept the tool wear, but react to special causes, or accelerated rates of wear.
 
C

cyberspider

An idea...

I may follow this strat. just in case....

1. plot the historical trend..
2. take averge of last few points.
3. take average of first few points..
4. use slope of line..

Just think on this concept..
 

Statistical Steven

Statistician
Leader
Super Moderator
I have always used Tim's approach of prediction intervals on a single new observation. I believe using regression with 99.73% (same as control charts) prediction intervals work the best. You can use the same rules as control charts to determine if the regression line is still appropriate. Eight points in a row above or below the regression line is an indication that the process has shifted.
 
D

Darius

If I remember....

Just obtain the diference between the real data and the estimate and from such data you can do traditional SPC, check files:D
 

Attachments

  • TrendSPC.xls
    21 KB · Views: 790
  • L014.pdf
    20.9 KB · Views: 298
Top Bottom