X Bar&Rchart
X Bar&Rchart
One of the most common variable control charts is the X-bar chart in combination with an R chart.
Prepare the data for an X-bar and R chart like the attached daily (one month) chart as follows:
1. To horizontally type the numbers 1 through 31, simply type the numbers 1, 2, and 3 in three
adjacent columns (on the same row); select all 3 cells and drag horizontally from the lower right
hand corner of the third cell. Note the cursor will change from a thick cross to a cross hair when
placed over the lower right corner.
2. In the upper left corner of the data range, type the following: =9+RANDBETWEEN(1,30)*0.1.
This will generate a random number between 9.0 and 12.0, i.e., 9 + (a random number between 1
and 30) 0.1. Drag to copy this cell down 5 cells and horizontally 31 cells for each of the 5
rows. (or =9+ RAND*3 . RAND yields a random number between 0 and 1.)
3. For all the formulas shown, after selecting the appropriate cell, you can either type them into the
formula bar or have Excel do it using the Insert, Formula tools.
4. In the leftmost sum cell type a summation formula for the 5 cells, e.g., =SUM(D24:D28). Drag
this formula across the row.
5. Below the summation row, add a formula for the average of the set of 5 daily readings, e.g.,
=AVERAGE(D24:D28). Drag this to copy to all cells in that row.
6. The X-bar value is the average of all daily averages, e.g., =AVERAGE($D30:$M30). Note that
absolute referencing is required since all values of X-bar must be identical. Drag this across the
row.
7. Calculate the ranges next as you will need R-bar soon. Use the MAX and MIN functions to
determine the range, e.g., =MAX(D24:D28)-MIN(D24:D28). Drag this formula across the row.
8. Calculate R-bar, i.e., the average of all daily range values, e.g., =AVERAGE($D34:$M34).
Again note the absolute referencing required to obtain the same values in all cells.
9. Calculate the upper control limit of the X-bar chart using the formula UCL X-bar = X-bar + A2R-bar.
Since the subgroup size is 5, in this case A2 = 0.58 (from SPC tables). Hence use:
=$D31+0.58*$D35. Note the absolute referencing for X-bar and R-bar since these values must
remain the same when the formula is dragged across the row.
10. Calculate the lower control limit for the X-bar chart using the formula UCL X-bar = X-bar - A2R-bar,
e.g., =$D31-0.58*$D35. Drag to copy across the row.
11. Calculate the upper control limit of the R-bar chart using the formula UCL R = D4R-bar., e.g.,
=2.11*$D35. Note that D4 = 2.11 for a subgroup size of 5 samples per day. Drag this formula
across.
For sample sizes lower than 7, LCLR-bar is not calculated as it is usually negative.
Prepare a chart for the data as follows:
1. Select the row of average data points. Click the Chart Wizard icon,
2. Step 1: On the Standard Types tab choose the Line chart type and for chart sub-type choose
stacked line with markers displayed at each data value. Click Press and Hold to View Sample
button to check that you have chosen the correct type. Then click NEXT.
3. Step 2: On the Data Range tab check that Series in Rows is selected. On the Series tab, click
the go to spreadsheet button on the Category (X) axis labels button and select the row of days,
i.e., 1 through 31, that are to appear as values on the x axis. Then click Next.
4. Step 3: Add a Y-axis title but omit an X-axis title, add gridlines to the x-axis and delete the
legend; then choose Next.
5. Step 4: Select Place chart as object in Sheet 1; Finish.
6. Right click the plot area and select clear. Drag the horizontal sizing handles so that the plotted
data points line directly over top of the corresponding data columns in the spreadsheet.
7. Select the X-axis, then click Format, Selected axis and on the Scale tab unclick the Value(Y) axis
crosses between categories box, then OK, to place dates directly below vertical gridlines rather
than between them.
8. Add the X-bar data line by selecting the entire row of X-bar values by dragging the mouse over
them. Drag and drop the data set onto the chart. Alternately, select and copy the row of data.
Then select the chart and click Edit, Paste special and select Add cells as new series and Values
(Y) in rows, OK. You will probably not see any result or a new series may appear but it may be
the sum of the two series. Do not despair. Select the entire chart and click Chart, Chart type,
Custom type, Colored lines, Built in, OK. Both series of data should now appear as the correct
values. You will have to spend some time using Chart, Chart Options and also the Format tools to
convert your chart into a printable form.
9. Repeat the drag and drop for the UCL and LCL lines.
10. Prepare the R-bar chart in similar fashion.
11. Click in an empty cell and click Print Preview. Choose Setup, Page, Landscape. Adjust to 75%
(or whatever is necessary) to display the entire graph on one page. Reduce Margins and Header
and Footer sizes as required to obtain more printable area on the sheet.
OTHER CONTROL CHARTS:
For X-bar and s charts, instead of range calculate the standard deviation using a formula like:
=STDEV(D24:D28).
For a Median chart use a formula like: =MEDIAN(D24:D28).
conc. Fe (ppm)
12.0
11.5
11.0
10.5
10.0
9.5
9.0
Day
sple #1
sple #2
sple #3
sple #4
sple #5
Sum
Average
X-bar
UCLx-bar
LCLx-bar
Range
R-bar
UCLR-bar
1
10.8
11.4
10.4
9.8
9.9
52.3
10.5
10.5
11.7
9.2
1.6
2.2
4.7
2
11.2
10.7
10.0
9.9
10.2
52.0
10.4
10.5
11.7
9.2
1.3
2.2
4.7
3
11.7
11.8
9.4
9.2
11.1
53.2
10.6
10.5
11.7
9.2
2.6
2.2
4.7
4
11.3
9.6
11.8
10.4
9.1
52.2
10.4
10.5
11.7
9.2
2.7
2.2
4.7
5
11.3
10.6
10.9
9.3
11.1
53.2
10.6
10.5
11.7
9.2
2.0
2.2
4.7
6
11.5
11.8
10.8
11.5
9.4
55.0
11.0
10.5
11.7
9.2
2.4
2.2
4.7
7
9.9
12.0
12.0
10.5
9.8
54.2
10.8
10.5
11.7
9.2
2.2
2.2
4.7
8
8
10.8
9.9
9.4
11.6
10.9
52.6
10.5
10.5
11.7
9.2
2.2
2.2
4.7
9
9
9.2
9.2
11.6
9.3
9.3
48.6
9.7
10.5
11.7
9.2
2.4
2.2
4.7
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
10
9.8
11.8
9.1
9.2
9.4
49.3
9.9
10.5
11.7
9.2
2.7
2.2
4.7
11
10.6
11.0
10.2
10.9
11.2
53.9
10.8
10.5
11.7
9.2
1.0
2.2
4.7
12
10.0
9.1
10.7
11.9
9.8
51.5
10.3
10.5
11.7
9.2
2.8
2.2
4.7
13
11.0
9.7
10.3
10.3
10.9
52.2
10.4
10.5
11.7
9.2
1.3
2.2
4.7
14
11.9
9.4
11.0
11.6
10.2
54.1
10.8
10.5
11.7
9.2
2.5
2.2
4.7
15
11.6
11.5
11.3
10.5
10.0
54.9
11.0
10.5
11.7
9.2
1.6
2.2
4.7
16
11.6
10.2
11.9
9.5
10.7
53.9
10.8
10.5
11.7
9.2
2.4
2.2
4.7
17
9.5
9.9
10.5
9.7
10.8
50.4
10.1
10.5
11.7
9.2
1.3
2.2
4.7
18
10.6
10.8
11.6
10.6
11.7
55.3
11.1
10.5
11.7
9.2
1.1
2.2
4.7
19
9.2
10.7
11.8
9.9
10.6
52.2
10.4
10.5
11.7
9.2
2.6
2.2
4.7
20
11.2
9.5
10.3
9.2
11.6
51.8
10.4
10.5
11.7
9.2
2.4
2.2
4.7
21
10.5
9.6
10.6
11.0
11.6
53.3
10.7
10.5
11.7
9.2
2.0
2.2
4.7
22
11.9
9.4
11.4
11.8
12.0
56.5
11.3
10.5
11.7
9.2
2.6
2.2
4.7
23
11.5
10.1
10.3
10.6
10.2
52.7
10.5
10.5
11.7
9.2
1.4
2.2
4.7
24
9.7
10.2
9.5
11.2
11.9
52.5
10.5
10.5
11.7
9.2
2.4
2.2
4.7
25
10.9
9.3
10.7
9.4
11.1
51.4
10.3
10.5
11.7
9.2
1.8
2.2
4.7
26
10.7
10.0
10.7
9.1
9.6
50.1
10.0
10.5
11.7
9.2
1.6
2.2
4.7
27
10.2
11.6
10.1
11.0
11.7
54.6
10.9
10.5
11.7
9.2
1.6
2.2
4.7
28
9.7
11.6
9.2
9.3
11.3
51.1
10.2
10.5
11.7
9.2
2.4
2.2
4.7
29
10.7
9.6
11.2
10.7
10.3
52.5
10.5
10.5
11.7
9.2
1.6
2.2
4.7
30
10.1
11.3
10.9
10.7
9.7
52.7
10.5
10.5
11.7
9.2
1.6
2.2
4.7
31
10.7
9.6
9.1
10.8
11.0
51.2
10.2
10.5
11.7
9.2
1.9
2.2
4.7
20
21
22
23
24
25
26
27
28
29
30
31
conc. Fe (ppm)
10
11
12
13
14
15
16
17
18
19
42
64
64
57
41
84
75
32
83
52
33
43
79
54
54
56
74
46
53
84
40
77
63
20
51
46
60
46
81
61
43
66
85
45
37
58
73
52
48
20
34
59
40
39
35
57
34
48
67
57
39
19
86
42
66
50
69
54
42
46
29
38
20
53
56
64
71
32
30
92
41
51
38
43
29
57
43
57
70
78
57
42
17
58
44
28
44
93
16
65
4. The Random Seed is a suggested starting value for the data. It is optional. If you include one,
each time this same seed is used, the same data set is produced; otherwise it will differ each time.
5. Enter the addresses of the output range where the data is to be located. Do this by clicking the go
to worksheet box and then dragging over an array of cells. Excel fills in the correct cell address.
Histogram:
The Histogram analysis tool determines a frequency distribution table for a data set and prepares a
histogram chart. In addition to individual frequencies there is an option to include cumulative frequencies
in the results.
ppm H2O in HF
Histogram
Frequency
Cumulative %
25
120.00%
100.00%
Frequency
20
80.00%
15
60.00%
10
40.00%
20.00%
.00%
10
20
30
40
50
60
70
80
90
100
More
BIN
You should determine the number of intervals and their ranges before using this tool. Otherwise Excel
will use a number of intervals approximately equal to the square root of the number of values in your data
set, with equal-width intervals starting and ending at the minimum and maximum values in the data set.
If you specify the intervals yourself, you can use numbers that are multiples of 2, 5, or ten, etc-which are
much easier to analyze.
To determine the intervals, first find the minimum and maximum values in the data set as well as the
number of data points.
The minimum value is found using the MIN function, e.g., =MIN(E16:N25).
The maximum value is found using the MAX function, e.g., =MAX(E16:N25)
MIN =
MAX =
COUNT=
12
93
100
The number of values is found using the COUNT function, e.g., =COUNT(E16:N25)
1. Enter BIN as a label. See cell E1. Below it enter the bin values 10 and 20, then select these two
cells and fill down to 100. See column E.
2. From the Tools menu choose Data Analysis, Histogram, OK.
8. Modify the chart using Format and Chart Options to look like the one shown. In histograms the
bars are adjacent to each other, not separated. Select one of the bars and choose Format, Options
to set the Gap Width to zero.
Histograms are often used to identify the nature of a process variation. When only common cause
variation is present in a process, a histogram of the data displays a normal distribution. However, when
special causes of variation are present, the histogram appears skewed. Occasionally, other distributions
are identified, e.g., binomial, Poisson, etc. The histogram shows that the data presented in this example
displays a normal distribution (as expected).
Pareto Chart:
BIN
10
20
30
40
50
60
70
80
90
100
More
Frequency
BIN
Frequency
0
50
20
3
60
20
7
40
13
13
70
12
20
80
8
20
30
7
12
90
6
8
20
3
6
100
1
1
10
0
0 More
0
By checking the Pareto (sorted histogram) box in the Histogram dialog box, the intervals are sorted as
shown in the accompanying table.
The sorted data from the Pareto analysis can easily be charted using the Chart Wizard.
1. Select only the Y-values (Frequency) and click the Chart Wizard icon. Choose Column type and
clustered column with a 3-D visual effect, Next.
2. On Step 2 choose the Series tab and in the Category (X) axis labels box click the go to
spreadsheet icon and select only the corresponding x-values. Complete the chart as usual and
reformat it to look like the one on the next page.
The Pareto chart shows that the most frequently occurring concentrations are in the 50 ppm and 60 ppm
bins, i.e., lie between 41- 50 ppm and 51 60 ppm ranges.
(Two other options. 1. Repeat the same procedure as for creating a Histogram, but check the Pareto chart option to obtain sorted data and a Pareto
chart. 2. Do not select the Pareto chart option and just obtain sorted data. Then use the Chart Wizard to create a chart. Select only the Y-values,
then use the Chart, Source Data, Series tab to input the X-axis values.)
Pareto Chart
H2O in HF July Shipments
Frequency
20
20
20
15
13
12
10
3
1
50
60
40
70
80
30
90
20
100
0
10