Friday, August 25, 2017

HP Prime: Shewhart X-Bar Chart (Quality Chart)

HP Prime:  Shewhart X-Bar Chart (Quality Chart)

Introduction and Calculation

The program XCHART generates five variables that describe the parameters of a Shewhart X-bar chart for quality control purposes.  Two limits, upper and lower, are determined, set 3 deviations from the mean, set the boundaries in which a process can vary and still allow the process to be in control.

The samples are arranged in a matrix.  Each row is a sample, with each column is a data point of those samples.  For example, a 15 x 10 matrix represents 15 samples of with the sample size of 10.

The five parameters calculated are:

MM:  Grand Mean.  The mean of all the sample means. 

Sample mean = Σx / n

RM:  Range Mean.  The mean of all ranges of all samples. 

Range = max(sample) – min(sample)

MD:  Mean Deviation.  The mean of all the standard deviation of all samples.

Sample Deviation = √( (Σx^2 – (Σx)^2/n) / (n – 1)

L, U:  Lower and Upper limit of the x-bar chart.  How it is calculated is dependent on the sample size (number of columns).

If the size ≤ 25, then:

U = MM + a2 * RM
L = MM – a2 * RM

Where a2 is a constant.  The values of a2 for sample sizes 2 – 25 can be found here:  http://onlinelibrary.wiley.com/doi/10.1002/9781119975328.app2/pdf

Some values (2 – 11):
Sample Size
a2
Sample Size
a2
2
1.880
7
0.419
3
1.023
8
0.373
4
0.729
9
0.337
5
0.577
10
0.308
6
0.483
11
0.285

HP Prime Program XCHART

EXPORT XCHART(mat)
BEGIN
// 2017-08-25 EWS
// Quality control
// {grand mean, range mean,
// std.dev mean, LCL, UCL}

// Grand mean
LOCAL MM:=mean(mean(TRN(mat)));

// Average range
LOCAL RM,C,R,I,L,cl;
// sample size: columns
C:=colDim(mat);
// number of samples
R:=rowDim(mat);

FOR I FROM 1 TO R DO
cl:=row(mat,I);
RM:=RM+(MAX(cl)-MIN(cl));
END;
RM:=RM/R;

// Average deviation
LOCAL MD:=mean(stddev(TRN(mat)));


// Estimate LCL,UCL

LOCAL U,L;
IF C≤25 THEN
// a2 list for sample size 2-25
LOCAL a;
LOCAL a2:={1.88,1.023,.729,
.577,.483,.419,.373,.337,.308,
.285,.266,.249,.235,.223,
.212,.203,.194,.187,.18,.173,
.167,.162,.157,.153};
a:=a2(C-1);
L:=MM-a*RM;
U:=MM+a*RM;
ELSE
// c4 (C>25)
LOCAL c4:=√(2/(C-1))*((C/2-1)!/
((C-1)/2-1)!);
U:=MM+3*MD/(c4*√C);
L:=MM-3*MD/(c4*√C);
END;
// Results
RETURN {MM,RM,MD,L,U};
END;

Example:

Data Process 6 samples of 6 data points each:

9.48
10.07
10.98
8.9
11.53
11.05
10.04
8.78
10.8
9.45
11.34
8.9
10.75
10.48
10.08
9.36
10.61
9.92
10.05
8.99
10.00
8.33
9.3
9.77
9.65
9.41
10.08
8.91
11.43
9.08
9.74
9.08
11.17
11.21
9.94
8.89

Since the sample size is not greater than 25, the range is used, with a2 = 0.483 (for the size of 6).

Results:
MM = 9.93194444444
RM = 2.19
MD = 0.785268047476
L = 8.87417444444  (lower limit)
U = 10.9897144444  (upper limit)

According to the results, the process needs further investigation.

Sources:

Aczel, Amir D. and Sounderpandian, Jayavel.  Complete Business Statistics McGraw-Hill Irwin: Boston. 2006.  ISBN 13: 978-0-07-286882-1

“6.3.2.  What Are Variables Control Charts?”  Engineering Statistics Handbook.  http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc32.htm
Retrieved August 24, 2017

Six Sigma Improvement with Minitab  “Appendix 2: Factors for control charts” Published on line June 22, 2011.   http://onlinelibrary.wiley.com/doi/10.1002/9781119975328.app2/pdf   Retrieved August 24, 2017

Eddie


This blog is property of Edward Shore, 2017.

Casio fx-CG50 and TI-84 Plus CE: Multiple Linear Regression

Casio fx-CG50 and TI-84 Plus CE: Multiple Linear Regression We have arrived at the last month of 2024. What a crazy year. I hope for...