Skip to content

Home / Statistical Tools / Control Charts / T² and Generalized Variance / How-To

How-To

This walkthrough charts two correlated dimensions of a moulded part and finds a subgroup that neither dimension's own chart could have found. Every number below is one you can check against your own sheet.

Sample Data

Ten subgroups of three parts, measured for Length and Width in millimetres. The two dimensions move together, because a hotter cavity grows both: the correlation within subgroups works out at 0.9896.

Press Copy for Excel, then paste the table into a blank worksheet.

Length Width
50.20 20.16
49.80 19.80
49.70 19.80
49.86 19.87
50.40 20.31
49.92 19.97
50.08 20.13
50.14 20.07
49.66 19.71
49.74 19.80
50.24 20.18
50.32 20.26
50.16 20.14
49.62 19.72
49.98 19.96
49.92 19.89
50.36 20.27
49.84 19.93
50.42 20.32
49.90 19.90
49.92 19.96
49.91 19.84
50.33 20.16
49.91 19.82
49.66 19.73
50.04 20.03
50.12 20.09
50.22 20.18
49.70 19.78
50.14 20.10

Rows 2 through 31 are the thirty parts, three to a subgroup, in run order. Rows 2 to 4 are subgroup 1, rows 5 to 7 subgroup 2, and so on to rows 29 to 31 for subgroup 10.

Look at the two columns before you run anything. Length runs from 49.62 to 50.42 and Width from 19.71 to 20.32, and nothing in either column stands out. Hold on to that.

Steps

  1. Put the data in Excel

    Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. The header row lands in row 1 and the 30 parts in rows 2 through 31.

  2. Launch the chart

    QXL Stat Tools > Control Charts > Multivariate > T² and Generalized Variance.

  3. Select the data

    On the Data tab, move Length and Width into Variable Columns (select 2 or more):. Set Subgroup size: to 3. Leave Stage Column (Optional) and X-Axis Labels (Optional) empty.

  4. Leave everything else alone

    On Estimation, leave Estimate Limits From at All subgroups, the alpha box empty and Transformation at None. Leave the Historical Parameters tab empty, which is what makes this a Phase I chart. Press Finish.

Check the parameters first

The Mean Vector and Covariance Matrix table, in its own band at column AC, is headed Mean (estimated) and Covariance (estimated). If these match, everything else will.

Length Width
Mean (estimated) 50.0070 19.9960
Covariance (estimated), Length row 0.076320 0.059040
Covariance (estimated), Width row 0.059040 0.046640

That covariance is the averaged within-subgroup one, not the covariance of the thirty rows about the grand mean. It is the average of the ten subgroups' own covariance matrices, entry by entry.

Its correlation is 0.9896, which is 0.059040 / sqrt(0.076320 x 0.046640). That single number is why this chart is worth running on this data.

The T² panel

Line Value
UCL 15.5474
Centre 1.3624
LCL 0

The limit is [p(m-1)(n-1) / (mn - m - p + 1)] x F_alpha(p, mn - m - p + 1) with p = 2, m = 10 and n = 3, so the scale is 2 x 9 x 2 / 19 = 1.894737 and the F has 2 and 19 degrees of freedom. The centre is that same scale at the F's median rather than at its upper tail, which is why it is 1.36 and not half the limit.

The ten plotted points:

Subgroup Length mean Width mean
1 49.9000 19.9200 0.5923
2 50.0600 20.0500 0.6344
3 49.9600 19.9700 0.4195
4 50.1000 20.0800 0.7907
5 49.9200 19.9400 0.6936
6 50.0400 20.0300 0.2653
7 50.0800 20.0600 0.3852
8 50.0500 19.9400 24.7787
9 49.9400 19.9500 0.2818
10 50.0200 20.0200 0.6095

Subgroup 8 is out of control and nothing else is close. Its T² is 24.7787 against a limit of 15.5474, and the largest of the other nine is 0.7907, which is a twentieth of the limit.

Why no single-variable chart would have found it

Look at subgroup 8's two means. Length 50.0500 against a grand mean of 50.0070, and Width 19.9400 against 19.9960. Both are ordinary. Every one of its six measurements sits inside the range the other nine subgroups cover, on both variables: 49.91, 50.33 and 49.91 against a Length range of 49.62 to 50.42, and 19.84, 20.16 and 19.82 against a Width range of 19.71 to 20.32.

Run an Xbar chart on Length and another on Width and both are quiet. Nothing is far from its own centre, and nothing is near its own limit.

What is wrong is the pair. The estimated covariance says Width tracks Length with a slope of 0.059040 / 0.076320 = 0.773585, so at a Length mean of 50.0500 the expected Width mean is

19.9960 + 0.773585 x (50.0500 - 50.0070) = 20.0293

and the subgroup came in at 19.9400, about 0.09 mm low for its Length. That gap is small in Width's own units and large in the metric the covariance defines, because the two dimensions almost never disagree. T² measures the second thing.

The decomposition table

Below the summary table, headed Out-of-Control Decomposition (T²):

Point Variable Contribution P-Value
8 Length 24.5770 0.0000410
8 Width 24.7060 0.0000397

Both variables are named, and that is the correct answer here. Neither dimension is at fault on its own. The signal is the relationship between them, so removing either one destroys it: drop Length and the remaining Width deviation is unremarkable, drop Width and the remaining Length deviation is unremarkable.

Notice that the two contributions add to 49.28 and T² is 24.78. They do not sum to the total and they are not meant to: each is the amount that variable adds given the other, so with a correlation of 0.99 each one is nearly the whole thing and the two overlap almost completely. A decomposition whose parts sum to about twice the total is the signature of exactly this case, two variables that normally agree and this time did not.

Compare that with what a decomposition looks like when one variable really is at fault. If Length alone had drifted, its contribution would be large and Width's would be small, and the table would name one variable rather than two.

The Generalized Variance panel

Line Value
UCL 0.000569
Centre 0.000074
LCL 0

The constants at p = 2 and n = 3 are b1 = 0.5 and b2 = 1.25, so 3 sqrt(b2) = 3.354102 and b1 - 3 sqrt(b2) = -2.854102. A negative lower limit is floored at 0, which is why the LCL is 0 rather than a small positive number: at this subgroup size the chart cannot signal a spread that has shrunk.

The ten plotted determinants:

Subgroup 1 2 3 4 5 6 7 8 9 10
Determinant 0.000108 0.000063 0.000212 0.000008 0.000039 0.000192 0.000043 0.000006 0.0000001 0.000008

Nothing is out of control on this panel, and that is the finding rather than the absence of one: the joint spread did not change, only the joint mean.

The values look tiny and that is expected. A determinant of a 2 by 2 covariance is in the fourth power of a millimetre, and it is very small here because the two dimensions are nearly collinear within every subgroup: |S| = s_L^2 s_W^2 (1 - r^2), and with r near 1 the bracket is near 0. Subgroup 9's 0.0000001 is that effect at its extreme, three parts whose two dimensions moved almost exactly in step.

Things to try next

  • Run Hotelling T² and Generalized Variance separately on the same data. Both sheets carry the same numbers as the combined one; only the amount drawn changes. The Generalized Variance sheet has no decomposition table, because that table belongs to the T² panel.
  • Run an Xbar-R chart on Length and another on Width. Neither signals. Putting those two sheets beside this one is the clearest demonstration of what the multivariate chart adds.
  • Change subgroup 8's Width readings to 19.94, 20.26 and 19.92, a tenth of a millimetre higher across the board, and run again. T² at subgroup 8 falls from 24.7787 to 0.0744, the quietest point on the chart, because Width now sits where the correlation says it should for that Length. Both single-variable charts move slightly and still signal nothing either way, which is the whole point: they cannot see the difference between the two versions of this data and the T² chart cannot miss it.
  • Set Estimate Limits From to First N subgroups: 7 and run again. The parameters now come from the first seven subgroups only, subgroup 8 is judged against a baseline it took no part in, and all ten points are still plotted.
  • Add a third variable and watch the decomposition table gain a row per out-of-control point. With three variables a single misbehaving one becomes tellable apart from a broken relationship.

See Also