TL;DR
Multicollinearity is the situation in a regression where two or more predictors move together so closely that they carry almost the same information. The model can still predict well, but the separate effect of each predictor becomes unstable, with large uncertainty and sometimes the wrong sign. It matters because people read individual coefficients as "the effect of this variable", and that reading breaks down here.
Builds on: Linear Regression, Linear Independence · Leads to: ridge regression, variance inflation
Where it's used
- Housing prices. A model of house price might include both floor area in square metres and the number of rooms. Bigger houses usually have more rooms, so the two predictors are strongly correlated. The model can price houses well, but the separate effect of "one more room" is hard to pin down.
- Economics and social science. Income, education and occupation are often correlated. A study that wants the effect of education alone has to deal with the fact that education and income rise together in the data.
- Biology and medicine. Measurements such as body mass and waist size are closely linked. Researchers who include both in a model should expect their separate coefficients to be shaky. This is a statistical point about models, not advice about any person's health.
How it works
Here is a tiny data set for a regression with two predictors, and , and one outcome, . The predictor is exactly twice .
| 1 | 2 | 3 |
| 2 | 4 | 5 |
| 3 | 6 | 7 |
- Write the model. . We want and .
- Look at the predictors. Every row has . The two columns carry the same information. Any change in comes with an exactly matched change in .
- Ask what the data can say. Many different pairs of effects fit the data equally well. For example, and both give the same predictions, since and are identical on this data.
- Check the arithmetic. The method of least squares needs to invert a matrix built from the predictors. Here that matrix has determinant zero, so it cannot be inverted, and the coefficients are not uniquely determined.
- Conclude. The predictions are fine, but the split of credit between and is not decided by the data at all.
Check: real data is rarely this exact. The more the predictors agree, the closer the determinant comes to zero, and the less certain the split becomes. The next sections show how to measure that.
flowchart LR A[Predictors x1 and x2 move together] --> B[Their columns are nearly parallel] B --> C[Matrix to invert is nearly singular] C --> D[Coefficients have large uncertainty] D --> E[Predictions still fine, single effects unstable]
The math
Write the data as a matrix with rows (observations) and columns (a column of ones for the intercept plus the predictors). The ordinary least squares solution is
The matrix , the transpose of times , is the one that must be inverted. Multicollinearity is a statement about how close it is to being singular.
Step 1 in symbols: the matrix is nearly singular
For the tiny data set, the entries of for the two predictors are the sums of squares and cross-products. To keep the matrix , this step leaves out the intercept column. With the intercept, the matrix is also singular, because is still a linear dependence.
So the matrix is . Its Determinant is . A matrix with determinant zero has no inverse, which is the exact version of "the data cannot separate the two effects". Nearly collinear data gives a determinant close to zero, not exactly zero.
Step 2 in symbols: how much each coefficient wobbles
If the errors have variance , the variance of the -th coefficient is
When is nearly singular, its inverse has very large diagonal entries, so the variance is large. A large variance means a large standard error.
Step 3 in symbols: the variance inflation factor
To measure this for one predictor, regress on all the other predictors and record the of that regression, written . The variance inflation factor is
If is unrelated to the others, and . If is almost a linear function of the others, is near 1 and the VIF is large. The variance of is the variance it would have with no correlation, multiplied by .
Worked examples
Use the tiny data set above, where .
- Regress on . Since is exactly , the fit is perfect.
- So .
- The VIF is , which is infinite.
- The determinant of was zero in the walkthrough, so no unique solution exists.
Interpretation: when one predictor is an exact multiple of another, the model cannot say which of the two has the effect. Statistical software usually drops one of them or reports an error for this reason.
Let and . Both have mean 2.5.
- Deviations from the mean: gives . gives .
- Cross product: .
- Sums of squares: and .
- The of regressing on is .
- The VIF is .
Interpretation: the standard error of each coefficient is inflated by the square root of about 55, which is roughly 7.4 times larger than it would be with uncorrelated predictors. The two predictors look different on paper, but this data cannot tell their effects apart.
This example is illustrative. A model of house price has floor area and number of rooms as predictors. Regressing rooms on the other predictors gives , so .
- The variance of the rooms coefficient is 5 times what it would be with uncorrelated predictors.
- The standard error is multiplied by .
- If the rooms coefficient would have had a standard error of 1,000 units of price, it now has about 2,236.
- Compare this with a confidence interval: an estimate that looks clearly positive can become indistinguishable from zero.
Interpretation: the price of an extra room is still estimated, but the estimate is far less precise. Predictions for typical houses are fine; claims about the exact price of one room are weak.
Try it: in a model with predictors and , regressing on gives . What is the VIF for , and by what factor is its standard error multiplied?
Answer: . The standard error is multiplied by .
Common mistakes and tradeoffs
It is tempting to think multicollinearity makes the model wrong. In fact the predictions can be accurate, because the combined effect of the correlated predictors is still well determined. The damage is to the separate coefficients and their significance tests.
It is tempting to think high correlation always breaks a regression. In fact the problem depends on the question. If you only want to predict, correlated predictors are often harmless. If you want the effect of one predictor with the others held fixed, it matters a lot.
It is tempting to think a VIF above 10 is a strict cutoff. In fact 10 is a rough rule of thumb from practice, not a law. What matters is whether the inflated standard errors are big enough to change your conclusions.
It is tempting to think that dropping one of the correlated predictors is always the fix. In fact it can remove the problem but also bias the remaining coefficient, since it now absorbs the effect of the dropped variable. Dropping is a choice about what question the model answers.
When to act: when you need stable individual coefficients and some of the VIFs are large, and the predictors have a clear meaning you can justify keeping or dropping.
When it matters less: when the model is for prediction only, or when the correlation is weak.
Alternatives: combine correlated predictors into one (for example, an index or the first principal component), collect more varied data, or use ridge regression, which adds a penalty that stabilises the inverse of at the cost of some bias.
History
The problem was studied long before it had a name. Early in the twentieth century, economists and statisticians fitting several regressors to time series found coefficients that changed wildly with small changes in the data. The Norwegian economist Ragnar Frisch, in work from the early 1930s, used the term "multicollinearity" for the situation of near-linear relations among predictors. Later statisticians developed diagnostics, such as the VIF, to measure it, and ridge regression, proposed in the 1970s, gave a standard remedy.
Recap
- Multicollinearity is when predictors in a regression carry nearly the same information.
- It makes nearly singular, so the coefficients are poorly determined.
- The variance of each coefficient is inflated by .
- Predictions can still be good; individual effects and their tests are what suffer.
- Remedies include dropping or combining predictors, collecting more varied data, and ridge regression.
Read next: penalized least squares, which shows one way to stabilise the solution when the predictors are correlated.
Check yourself
QuestionRecall: what does it mean for the matrix to be nearly singular, and why does that matter for regression?Show answer
It means its determinant is close to zero, so its inverse is very large in some directions. The least squares solution depends on that inverse, so the coefficients become unstable: small changes in the data can move them a lot, and their standard errors grow.
QuestionA predictor has when regressed on the other predictors. What is its VIF, and by what factor is its standard error multiplied?Show answer
. The standard error is multiplied by .
QuestionWhy can a model with strongly correlated predictors still predict new data well?Show answer
Because the data constrains the combined effect of the correlated predictors even when it cannot split that effect between them. Predictions depend on the combination, so they can remain accurate while the individual coefficients stay uncertain.
QuestionA researcher drops one of two correlated predictors to fix the problem. Explain the risk of this choice in a scenario where both predictors affect the outcome.Show answer
The remaining predictor now picks up part of the effect of the dropped one, because they are correlated. Its coefficient becomes biased, so it no longer measures the effect it was meant to measure, even though its standard error is smaller.