Lazarus
Programming => LCL => Topic started by: GeorgeSteven on September 27, 2021, 09:26:42 am

I would like to know the opinion of the forum in the following case.
I am trying to calculate the UCL and LCL for a set of measurements.
I took one measurement per day, three months in a row.
For calculating the limits, I used the following procedure:
1. Calculate the Average
2. Calculate the Median Range
3. Calculate control limits using following formula:
UCL= Average + 3.14*Median Range
LCL= Average  3.14*Median Range
I was told that this is the correct way to calculate the UCL and LCL. For your convenience, I attached the excel file with my calculation.
Please, let me know what is your opinion in this case. Is this the correct way or should I do it differently?
Thank you,

There is a statistics program, LazStats, on CCR (https://sourceforge.net/p/lazarusccr/svn/HEAD/tree/applications/lazstats/). It calculates UCL and LCL in procedure TXBarChartForm.Calculate, unit XBarChartUnit.

UCL= Average + 3.14*Median Range
I'm just wondering where the value Pi would come from. Isn't it defined as 3 standard deviations?

First of all: I'm not a statistician, so my answer may be wrong...
Basically, your statement is correct, but the question is: What is the value of the standard deviation? Normally for such such control charts, a small sample is pulled from the entire population repeatedly over time. You can calculate the standard deviation of that small sample, but must use statistical arguments to correct this to obtain the "true" standard deviation of the entire population. Or only the range of the values in the sample is taken, like in the OP's text, and again correction factors must be applied to estimate the standard deviation. These correction factors are tabulated in statistics texts for various sample sizes.
Therefore, I think that the factor 3.14 (if it's correct at all) is not pi, but one of these correction factors.