MANOVA: multivariate analysis of variance and Wilks' lambda

Updated

MANOVA (multivariate analysis of variance) compares group means on two or more responses at the same time. Instead of asking "do the grades differ in strength?" and then "do they differ in elongation?", it asks one question: do the grades differ in the pair (strength, elongation)? Because it uses the correlation between the responses, it can detect differences that no single-response ANOVA sees, and it controls the overall false-alarm rate with one test.

When to use it

  • Each unit gives several related measurements: strength and elongation, length and width, two dimensions of the same feature, several properties of one batch.
  • The responses are correlated, so separate tests double count shared information and miss differences in combinations.
  • You want one overall test before looking at individual responses, so the chance of a false alarm stays at 5% rather than growing with each extra response.

For one response, use one-way ANOVA or the general linear model. To find which combination of responses separates the groups and use it to classify new units, see discriminant analysis. To summarize many correlated responses without groups, see principal components.

How it works

One-way ANOVA splits the variation of one response into between-group and within-group sums of squares. MANOVA does the same with matrices. With p responses and g groups, the H matrix (hypothesis) holds the between-group sums of squares and cross-products, and the E matrix (error) holds the within-group ones. The diagonals are the ordinary ANOVA sums of squares; the off-diagonals carry the correlations.

The most common test statistic is Wilks' lambda, the share of the generalized variance that the groups leave unexplained:

Λ = det(E) / det(E + H)

Λ is near 1 when the group means are equal and near 0 when they are far apart relative to the within-group scatter. For two responses there is an exact F test:

F = [(1 − √Λ) / √Λ] · (N − g − 1) / (g − 1), with 2(g − 1) and 2(N − g − 1) degrees of freedom

Three other statistics come from the eigenvalues λᵢ of E⁻¹H: Pillai's trace V = Σ λᵢ/(1 + λᵢ), the Hotelling–Lawley trace U = Σ λᵢ, and Roy's largest root λ₁. Wilks' lambda is Π 1/(1 + λᵢ). With two groups all four give the same p-value; otherwise they differ a little. Pillai's trace is the most robust when the assumptions are shaky.

The assumptions are those of ANOVA extended to several responses: independent units, responses roughly multivariate normal within each group, and similar covariance matrices across groups. The within-group degrees of freedom (N − g) must exceed the number of responses, and in practice each group should have more units than responses.

Example

A molder compares three grades of ABS for a snap-fit clip. Six tensile bars of each grade are molded in random order and tested for tensile strength (MPa) and elongation at break (%):

GradeStrength (MPa)Elongation (%)
A53.4, 49.9, 49.8, 54.2, 51.1, 53.819.4, 16.4, 15.6, 19.3, 17.1, 17.2
B49.7, 52.5, 53.9, 51.8, 54.1, 54.913.9, 15.7, 18.0, 14.9, 17.0, 17.6
C52.1, 48.5, 51.0, 51.8, 49.5, 51.917.2, 14.4, 19.3, 18.5, 17.9, 19.8

Values are listed in the same bar order, so the first bar of grade A had 53.4 MPa and 19.4%. The grade means are A (52.03, 17.50), B (52.82, 16.18) and C (50.80, 17.85). Within a grade, bars that are strong also stretch more: the pooled within-grade correlation is 0.81.

Separate one-way ANOVAs find nothing:

ResponseF (2, 15)P
Strength1.900.184
Elongation1.590.236

The matrices are E = [[49.02, 37.58], [37.58, 43.64]] and H = [[12.40, −9.65], [−9.65, 9.27]]. MANOVA on both responses together:

TestStatisticFDFP
Wilks' lambda0.29445.904, 280.001
Pillai's trace0.71454.174, 300.008
Hotelling–Lawley trace2.36687.694, 26< 0.001

Roy's largest root is 2.354, and it carries 99.5% of the separation, so one combination of the responses does almost all the work. Scaled to a within-grade standard deviation of 1, that combination is 0.908·strength − 0.953·elongation, close to strength minus elongation.

Discriminant score by ABS grade-202Score (0.908·strength − 0.953·elongation, centered)ABC
Discriminant score by ABS grade

How to read the results

  • The grades differ, but not in either property alone. Wilks' Λ = 0.294 (p = 0.001): the grades explain about 70% of the generalized variance of the pair, while each ANOVA alone sees nothing.
  • The difference lies in the balance of the two properties. Grade B is a little stronger and less ductile than its strength would suggest; grade C is the opposite. Since strength and elongation rise together from bar to bar, the difference between them scatters little within a grade: its pooled standard deviation is 1.08, against 1.81 MPa for strength and 1.71% for elongation alone. Against that small scatter, the trade-off between grades stands out.
  • Follow up with pairwise tests. Two-grade Hotelling T² tests with Bonferroni adjustment give B versus C p < 0.001, A versus B p = 0.053 and A versus C p = 0.24. The clearest contrast is B, the stiffer grade, against C, the more ductile one.
  • Do not reuse the score as a test. The discriminant score is chosen to separate these 18 bars as well as possible, so its own ANOVA p-value is far too optimistic. The MANOVA tests above already account for that choice.
  • For the clip, the decision depends on which property limits the design: a snap fit that cracks during assembly needs elongation, so grade B's trade-off is the one to watch.

Common mistakes

  • Running only separate ANOVAs. They miss differences in combinations, as here, and with many responses they inflate the false-alarm rate.
  • Adding responses that do not matter. Every response costs degrees of freedom. Include the ones that answer the question.
  • Ignoring unequal covariance matrices with unequal group sizes. The tests are fairly robust with equal group sizes; with unequal ones, check the group covariances and prefer Pillai's trace.
  • Stopping at the overall test. A significant MANOVA says the groups differ somewhere. Look at the discriminant combination and pairwise tests to see where.
  • Too few units. Each group needs more units than responses, and power falls quickly as responses are added.

Frequently asked questions

What does Wilks' lambda mean?

The share of the generalized variance of the responses that the groups do not explain. Values near 1 mean no group effect; values near 0 mean strong separation. Here Λ = 0.294.

Which MANOVA test should I report?

Wilks' lambda is the most common. Pillai's trace is the most robust to unequal covariances and is a good default for unbalanced data. When they disagree, the data sit near the decision line.

Why can MANOVA be significant when every ANOVA is not?

Because the groups can differ along a combination of responses in which the within-group scatter is small. Each ANOVA looks at one response with its full scatter and misses it.

Is MANOVA the same as running a Bonferroni-adjusted ANOVA per response?

No. Bonferroni controls the false-alarm rate but still looks at one response at a time. MANOVA uses the correlations and tests combinations of responses.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab