Real Time Weight Control with SPC

 
  

Statistical Process Control is used to detect when a significant change has taken place in a process. 
We want to detect this change as soon as possible. What is real-time will depend on the process. 
All processes have variation as observed in any of their metrics but not all variation is significant from the statistical point of view. 

When we want to control a process by adjusting some process parameter we can make two mistakes:


Control over-reaction

A case of over-reaction is illustrated by the following example:

Someone is shooting at a target and, based on the deviation of the impacts, he adjusts the gun site after each shot.
The end result will be an increase of the dispersion of the impacts, therefore the adjustments will make the process worse.
The correct way is, of course, to fire 5 or 6 shots without adjustments and then decide if adjustment is required based on the center of the impacts.

    

If you drop a live frog in boiling water it will, immediately, jump out to save its life. But if you put it in a pot of cold water and heat it slowly enough, the frog will eventually pass out without any reaction. Many companies have fallen into this trap:

  • A big disaster generates a quick and effective response and the company recovers
  • A slow degradation of their KPIs such as customer sat or delays pass undetected until it is too late

 

Statistical Process Control

To avoid these two mistakes we can use SPC to control a metric to find out if the observed changes are significant from the statistical point of view and require a corrective action.
We will illustrate this with the use of an example: control your own weight to check if your diet is leading to your weight target or not.
In this example real-time control means daily.
You can download this example Excel file and enter your data in column B.
Download a copy of this Excel simulator  WeightSPC1.xlsx  from OneDrive to your PC before you run it.

You can decide the frequency of your data collection. In this example I have collected it daily.
It is important to collect it at the same moment (more or less) each day.
You can either have your Excel file in your smartphone or in the cloud (Google Drive or Microsoft's One Drive)
Open Sheet Weight in the Excel file:



Timestamp

To enter the timestamp in column A we will use data validation.
In cell X1 we have the formula = NOW() which will produce the current timestamp every time the sheet is updated.
We have defined data validation for the whole column A so by clicking in the arrow in the cell the timestamp from cell X1 will be presented so just click on the timestamp and it will be entered in the cell.


Results interpretation

SPC uses some rules, developed by the Western Electric company, to detect symptoms of statistically significant trends . 

The average of all values x-bar is the center line in the graph and sigma is the standard deviation of all values. 
The most obvious trend symptom is a value above the upper control limit (upward trend) or a value below the lower control limit (downward trend)




We define zone A as the area 2 sigmas beyond the center line. 2 out of 3 consecutive values in zone A indicates a trend.

Zone B is the area 1 sigma beyond the center line. 4 out of 5 consecutive values in zone B is an indication of trend.



In our Excel file upward trend symptoms are in red and downward in green.
It also discriminates upward and downward trends.
Upward symptoms definitions:




Weight Data Interpretation Example


  

  • From 24/3 to 28/3 alert 4 indicates that 4 out of the last 5 values were more than 1σ above the center line: this is a weight increase symptom.  
  • Alert 9 in 28/3 and 29/3 mean 9 consecutive values above the center line: also a symptom of weight increase. 
  • From 1/04 to 3/04 alert -2 means 2 out of the last 3 values are 2σ below the center line: statistically significant weight reduction symptom. 
  • Alert -4 on 2/04 and 2/05 means that 4 out of the last 5 values were more than 1σ below the center
  • The last 2 days are stable: no statistically significant trends.
  • A statistically significant reduction doesn't mean that this reduction is acceptable but at least we are moving in the right direction.
 

Results Analysis with an SPC Individuals Chart 

In sheet Weight, meant to be used from a smartphone, there is no graphic: we just show alerts of significant trends
In sheet SPC you can find an SPC chart for individuals you can use as an alternative:


  The red dots indicate increase trends and the green dots decrease. 

Stable Process

There is a common misconception about the meaning of process stability
For instance some might call the process characterized by the following data unstable:

  

But if we look at it in our SPC file:

  

It doesn't give us any alert of instability
This is a Stable process consisting simply of throwing a dice. Since we have always thrown the dice the same way, SPC is telling us that this is a stable process: no significant change has been detected.
Stability is not always a good thing. In the case of our weight control stability would mean that there is no improvement.
We want stability when the process is OK. If we improve this will show with SPC alerts in the right direction.

Autocorrelation

There is a basic difference between the dice throwing process and our daily weight.
In the case of throwing dice each individual outcome is independent from the previous outcomes: no matter how many consecutive 4s we had just now the probability of getting a 4 on the next throw is still 1/6.
In the case of body daily weight each outcome IS NOT INDEPENDENT from the previous outcomes: it is very unlikely that your weight today is 5 kg higher or lower than yesterday.
To check that we will correlate our daily weight for the last month with itself with 1 day, 2 day and 3 day delay:


We use Correlation in Excel Data Analysis and the result is:


This confirms a strong autocorrelation of our daily body weight.

Let us now repeat the same analysis with data from throwing one dice:


There is, indeed, no autocorrelation: each outcome is independent from the previous ones.

The effect of autocorrelation in our daily weight SPC is that there will be some false alerts.
To correct this effect one alternative is to reduce the sampling rate or to apply  EWMA chart with moving center line.  In both solutions the effect is that we will loose slow trend alerts which are the most useful in our weight control process.  In my experience I prefere some false alerts to missing inportant alerts (remember the boiled frog).

Use for other processes

This Excel file can be used to control a variable other than weight at work. For instance:


  

In this case we are doing an hourly control of our process yield. In this case Yield increase is good so Red is Good.
At 20:00 we have enough evidence of a Yield increase although the change seems to have taken place at 16:00.

Real Time SPC in the Manufacturing Line

The control plan specifies all the control points along the value stream. In this board assembly process:
Defects detected in the visual inspections are reported with just one touch of the screen and fed back to the previous step which just produced it:

This immediate feedback to the operator via an SPC chart enables a corrective action as soon as the process goes out of control:
Reaction time by the operator will depend on the amount of WIP accumulated between defect production and defect detection:

Corrective action responsibilities:

Conclusions

  • SPC enables detection of significant process change as opposed to just random variation .
  • High process intrinsic variation may lead to over-reaction (adjust when you shouldn't) 
  • This over-reaction increases variation making the process worse
  • Gradual small changes may pass undetected and cause a process degradation in the long term
  • SPC Western Electric rules can even detect small trends and alert the operator to make corrections before the process gets worse
  • Manual pencil & paper SPC charts only detect a point beyond the limits but not all the other trend symptoms
  • See other SPC charts both for variables and attributes in  Statistical Process Control with Excel
















Comments

Popular posts from this blog

Design of Experiments (DOE) with Excel

Response Surface Design Of Experiments with Excel

Six Sigma Virtual Catapult with Excel