# Inside Quality Insider

•

•

•

•

• SUBSCRIBE

## When Do We Use Subgrouped Data?

### A problem with service-sector average charts

When the data come along one value at a time, we tend to put them on a chart for individual values (an XmR chart). Since virtually all business and managerial data occur one value at a time, the primary chart for service-sector data is the XmR chart. Yet the original process behavior chart was the average and range chart (also known as an X-bar and R chart). The advantages, restrictions, and issues surrounding average and range charts are the topics of this article.

While average and range charts are somewhat more specialized than XmR charts, they do have certain advantages for specific applications. At the same time, their greater specialization imposes certain restrictions on their use. When it makes sense to arrange the data into subgroups you will gain sensitivity by doing so. To illustrate this aspect of an average and range chart, I will use the data from a bottle filling line. Each hour five bottles are taken from the line and the amount of product in each bottle is measured. These five fill weights are considered one subgroup and the average and range for each of these subgroups is plotted on the average and range chart. Figure 1 shows the data for 16 such subgroups.

Figure 1: Fill weights for 16 hourly samples of five bottles

The grand average is 754.9, the average range is 4.5625. The scaling factors for creating an average and range chart for subgroups of size five are A2 = 0.577 and D4 = 2.114. (Tables of these scaling factors are found in most books on SPC.) Thus, the limits for the average chart are:

On the other hand, had we placed the 80 individual fill weights on an XmR chart we would have had an average of 754.9 and an average moving range of 1.987. This would have resulted in limits for the X chart of:

Figure 2 compares the average chart with the chart for individual values. Both charts tell the same story about this process. However, if the process changes, the average chart is likely to have a point outside the limits before the XmR chart does.

Figure 2: Average chart and individual values chart for the fill weight data

This increased sensitivity of the average chart is dependent upon having a rational subgrouping. When you place two or more values together in a subgroup you are making a judgment that you consider these values to have been collected under essentially the same conditions. This means that the differences between the values within a subgroup should generally represent nothing more, and nothing less, than routine, background variation.

The first requirement for rational subgrouping is that of internal homogeneity for the subgroups.

One way to satisfy this requirement of internal homogeneity is to collect multiple measurements within a reasonably short time. While this is easy to do when making widgets, it becomes less feasible with continuous processes and administrative systems. In the example above we had one subgroup per hour and five pieces per subgroup. When we placed the five values from each hour together in one subgroup we were making a judgment that within each hour the five pieces could be considered to be essentially uniform.

This requirement of internal consistency means that you are willing to consider the variation within the subgroups as "background noise." The assumption that the values were collected under essentially the same conditions means that you are not concerned with the differences between the values. Thus these differences must be thought of as the background level of noise which is present in your system. And as you may see from the computations, it is this background noise within the subgroups (as characterized by the average range) that is used to determine the limits for the average and range chart.

The second requirement for rational subgrouping is that the variation within the subgroups must truly represent the reasonable and proper amount of background variation for the process.

In the previous example, when we computed the limits for the average and range chart, we were using the average variation within the subgroups to set limits on how much variation we should expect to see from subgroup to subgroup. We used the average variation among the five bottles collected each hour to determine how much variation should occur from hour to hour. And the only way to judge if this is appropriate is to know both the process and the way the measurements are made.

In other words, there has always been an element of judgment involved in subgrouping. Subgrouping cannot be automated. It is the conclusion of a thought process that combines the context for the data with the purpose of the process behavior chart and then organizes the data in such a way that the chart will answer the questions of interest.

So what about administrative and service sector data? There are many situations where people will tend to collect these data into subgroups. Two examples follow.

Figure 3 shows the daily sales figures for a department store over a three month period. These values are given to the nearest hundred dollars. Each week's worth of sales have been made into a subgroup and the weekly averages and ranges are included at the bottom of figure 3.

Figure 3: Daily department store sales

The grand average is 93.84, and the average range is 106.5. The scaling factors for subgroups of size n = 7 are: A2 = 0.419, D3 = 0.076, and D4 = 1.924. The limits for the average chart are:

while the range chart limits are:

These limits are shown in figure 4.

Figure 4: Average and range chart for daily department store sales

Does the subgrouping of the daily department store sales shown in figure 3 satisfy the two requirements of rational subgrouping? Are the subgroups internally homogeneous? Does the variation within the subgroups provide the proper yardstick for measuring the variation from subgroup to subgroup?

Even a cursory reading of the data in figure 3 shows that there are substantial differences in the sales volumes of different days of the week, with Mondays and Tuesdays being low and Saturdays being highest. Therefore, when the seven days of one week are subgrouped together we have a collection of unlike things. This represents a violation of the first requirement of rational subgrouping.

In addition, the variation within the subgroups is the day-to-day variation, while the variation between the subgroups is the week-to-week variation. Since the day-to-day variation is a completely different type of variation than the week-to-week differences, it is unreasonable to expect that the variation within the subgroups will provide an appropriate yardstick for setting the limits on the average chart.

Therefore, the weekly subgroups shown in figure 3 violate both requirements of rational subgrouping. While it is possible to perform the computations and to create a chart using the "subgrouping" of figure 3, the failure to organize the data into rational subgroups will result in a chart that is useless.

How then can we track these sales over time? Could we plot these 91 values in a running record of daily sales? Yes. Should we turn this running record of 91 daily sales values into an XmR chart? Probably not.

Figure 5: Running record for daily department store sales

If we placed the 91 values from figure 3 on an XmR chart, the strong daily cycle of sales would inflate the moving ranges, which would in turn inflate the limits. The principles of rational subgrouping require successive values on an XmR chart to be collected under conditions that are, at least most of the time, reasonably similar.

Before we can place data on an XmR chart successive values must be logically comparable.

When your data display a recurring pattern this requirement is not satisfied. The name given to recurring patterns like the one in figure 5 is seasonality. To discover how to deal with seasonality when placing data on a process behavior chart see my book Making Sense of Data (SPC Press, 2003).

Could we plot the weekly average daily sales on an XmR chart? Yes. This will probably be the most satisfying way of tracking these data over time. Using the data in figure 3, the overall average is still 93.84, and the average moving range of the weekly averages is 1.52, resulting in the limits shown in figure 6.

Figure 6: XmR chart for weekly average daily sales

While the running record on the X chart in figure 6 is the same as that of the average chart in figure 4, the story told by these two charts is considerably different. The average chart is less sensitive because the subgrouping used there was not rational.

Figure 7 provides a second example of how administrative data are often arranged into subgroups. There you will find the quarterly sales for each of six regions for the past five years. These values have been arranged into 20 subgroups of size 6 so that each quarter is a subgroup.

Figure 7: Quarterly sales for five years

The grand average for the subgroups of figure 7 is 803. The average range is 836. The average and range chart for these 20 subgroups is shown in figure 8. Before you attempt to interpret figure 8 you need to answer two questions regarding the subgrouping used. These questions are: What type of variation occurs within the subgroups in figure 7? What type of variation occurs between subgroups in figure 7?

Figure 8: Average and range chart for quarterly sales

What is the problem with the subgrouping in figure 7? Are the subgroups internally homogeneous? It is the region-to-region variation that occurs within the subgroups in figure 7, while the quarter-to-quarter variation shows up between the subgroups. Is the region-to-region variation the proper yardstick for characterizing the variation from quarter to quarter? Would it not make more sense to acknowledge that the six regions are different, and then to track each region separately on an XmR chart?

### The stratification of subgroups

Subgroups are said to be stratified when each subgroup contains systematic differences in addition to routine variation. One of the ways this happens is when we subgroup unlike things together. The problem of stratification will be apparent on the average and range chart because it will result in limits that look too wide for the graph. This phenomenon may be seen in both figures 4 and 8. When the computations for an average and range chart result in limits that look far too wide for the graph, check to see if unlike things have been grouped together. In figure 4 it is the unlike daily sales that are subgrouped together. In figure 8 it is the regions that are different that have been subgrouped together. When looking at these charts we see that both the averages and the ranges are hugging the central line. Whenever 15 or more successive values on the range chart fall within one sigma of the central line, you should check for possible stratification of the subgroups.

The average and range chart, for all of its power and sensitivity, requires data which contain multiple measurements collected under essentially the same conditions. This requirement is rarely satisfied in service and administrative applications where data tend to come along one value at a time. This means that it will be extremely difficult to find ways of using average and range charts to directly monitor service sector or administrative data. As outlined above, there are many ways to arrange data into what look like subgroups, but not all of these will result in charts that are appropriate, useful, or meaningful. If the subgrouping is not rational, then the chart will not work correctly, and you will be in danger of misleading yourself and others.

Computations simply cannot correct the defects of bad subgrouping. Judgment is always required in order to organize the data into rational subgroups.

### Donald J. Wheeler

Dr. Donald J. Wheeler is a Fellow of both the American Statistical Association and the American Society for Quality, and is the recipient of the 2010 Deming Medal. As the author of 25 books and hundreds of articles, he is one of the leading authorities on statistical process control and applied data analysis. Contact him at www.spcpress.com.

### SO, WHY IS SO IMPORTANT?

Why is subgrouping used, taught and learned in almost all books & seminars? The article tells us when not to use it, but how to know when we must use it?

### Quick trick for assessing

Good article.  A quick “trick” to help identify the warnings that Wheeler gives about incorrect subgrouping is to look at the range chart.  For subgroup sizes less than 7, in theory it is likely that if you have rational subgroups you can have a subgroup range of 0 from time to time.  Even though there might not be a 0 on the R chart, you can expect that it is possible to see a 0 from time to time over the long haul.  In both examples provided, Figures 4 and 8 show ranges that look more like Xbar charts – distributed consistently above and below Rbar, but more importantly no range values remotely close to 0.  That alone should be a strong indicator that the subgrouping is not so rational.

### Getting Service Employees to Use Control Charts

Donald is correct. My observation, however, is that few service employees use any form of a control chart. Having attended many Institute for Healthcare Improvement and National Association of Healthcare Quality conferences and looked at hundreds of improvement posters, virtually all still use a bar chart for time series data.

First, let's get people using control charts, even if it's an XmR used when it isn't the best choice, then let's get them to understand rational subgrouping. With the Excel-based SPC software available today, there's no excuse for using bar charts when control charts are so readily available.

• Classifieds
• File Share
• Forum Topic
• Events