2.1.15 · D5Data Preprocessing & Feature Engineering
Question bank — Correlation analysis and multicollinearity
This is a rapid-fire trap bank for the parent topic. Each line is a question ::: answer reveal. Cover the answer, commit to a guess, then check — the value is in catching why your instinct misfires, not in scoring points.
Before you start, a one-line refresher of the two symbols that show up everywhere below:
Recall What do
and VIF each measure? is the Pearson correlation coefficient — one number in for a pair of features, measuring linear co-movement. VIF (Variance Inflation Factor) is a number for one feature, measuring how predictable it is from all the others together.
True or false — justify
A perfect correlation of means the two features are independent.
False. only rules out a linear relationship; over a symmetric range gives while is fully determined by .
If every pairwise correlation between features is small (say ), the dataset is free of multicollinearity.
False. Multicollinearity can be multi-way: makes perfectly predictable while each pairwise can stay modest. That is exactly why we need VIF, not just the correlation matrix.
A VIF of 1 means the feature is useless for prediction.
False. VIF means the feature is uncorrelated with the other features (), i.e. it carries independent information — that is a good thing, not a useless one.
High multicollinearity always lowers the model's (predictive fit).
False. Multicollinearity leaves overall fit/ largely intact; it wrecks the individual coefficient estimates (huge standard errors, sign flips), not the predictions.
Correlation is symmetric, so VIF must be symmetric too.
False. , but VIF is a per-feature quantity from regressing one feature on all the rest — VIF VIF in general. See VIF logic in the parent note.
The condition number and the correlation matrix always agree on whether collinearity is "severe."
Mostly but not guaranteed. Condition number captures the global near-singularity of the whole design matrix, which can be triggered by combinations no single pairwise reveals.
Standardizing features to unit variance changes their correlations.
False. Correlation is already scale-invariant (that is the whole point of dividing covariance by ), so linear rescaling leaves untouched. It does change the condition number of the raw design matrix, though.
Removing one of two perfectly correlated features loses information.
False. If exactly, one feature is a linear function of the other, so it adds zero new information — dropping it is lossless. This is the basis of feature selection for redundant columns.
Multicollinearity is a problem you must fix before doing PCA.
False. PCA thrives on correlation — it rotates correlated features into uncorrelated principal components, so collinearity is the raw material PCA consumes, not an obstacle to it.
Spot the error
", so causes 90% of ."
Two errors. measures association, not causation; and is not a percentage of anything — the variance explained is , not .
"VIF."
The denominator uses (coefficient of determination), not : VIF. Dropping the square changes both the scale and the sign-insensitivity.
"The condition number of is ."
No — because squares the singular values, . The rule-of-thumb thresholds (, ) refer to , so applying them to 's eigenvalue ratio flags far too many matrices.
" can be for extremely strong relationships."
Impossible. By Cauchy–Schwarz, , forcing . Any value outside means a computation bug.
"To measure how inflates variance, I regress (the target) on ."
Wrong target. VIF regresses the feature on all the other features — the response never enters a VIF calculation.
"Two features have , so they are unrelated."
The opposite: is the strongest possible linear relationship (perfectly anti-correlated). It is that signals no linear relation.
"Ridge removes multicollinearity from my data."
Ridge doesn't remove collinearity from the data; it tolerates it by adding a penalty that stabilizes , shrinking coefficients so small data changes no longer cause wild swings.
Why questions
Why divide covariance by instead of using covariance directly?
Covariance has units of , so its magnitude depends on scale and is uncomparable across pairs. Dividing removes units and bounds the result to , making strengths comparable. See covariance.
Why does VIx blow up to infinity as ?
VIF; as the feature becomes perfectly predictable from the others, , the denominator , and the coefficient variance divides by (nearly) zero — the estimate becomes infinitely uncertain.
Why does multicollinearity cause coefficient sign flips?
When features are near-collinear, is near-singular, so is huge and unstable; tiny data perturbations move the fitted coefficients enormously, sometimes across zero. This ties to the no-perfect-collinearity assumption.
Why can a model have high but no individually "significant" coefficients under multicollinearity?
The features jointly explain well (high ), but because they overlap, the data can't attribute the effect to any single one — each coefficient's standard error is inflated, so none clears its significance test.
Why does adding a redundant feature hurt the variance side of the tradeoff?
A redundant feature adds an extra unstable parameter without new information, raising the model's estimation variance while doing nothing for bias — a pure variance cost.
Why does Lasso handle multicollinearity differently from Ridge?
Lasso's penalty can drive redundant coefficients exactly to zero, effectively selecting one feature from a correlated group, whereas Ridge shrinks them together toward small but nonzero values.
Why is the condition number defined with singular values rather than raw entries of ?
Singular values measure how much the matrix stretches or squashes vectors along its principal directions; their ratio directly quantifies how much input error in gets amplified when solving for .
Edge cases
What is when one feature is constant (zero variance)?
Undefined — puts a zero in the denominator. A constant column has no variation to co-move with, so correlation simply doesn't exist; drop the column.
What VIF does a perfectly collinear feature get, and what does software report?
In theory VIF (). In practice the regression is rank-deficient, so software may report a giant finite number or error out — treat any VIF above ~10 as a red flag regardless.
Two features are identical duplicates. What is their , and what happens to ?
exactly, and becomes singular (two identical columns), so does not exist — ordinary least squares has no unique solution.
With only data points, what is the correlation between any two features?
Always exactly — two points always lie on a straight line, so is degenerate and meaningless. You need comfortably larger than the number of features for stable estimates.
A feature is a nonlinear transform of another, e.g. . Will correlation flag the redundancy?
Not reliably. only sees the linear part, so a strong nonlinear dependence can show a modest while the feature is genuinely redundant — always inspect scatter plots, not just .
What is the condition number of a design matrix with perfectly orthogonal (uncorrelated) standardized features?
— all singular values are equal, so nothing is amplified. This is the best-conditioned case and the ideal target when engineering features.
If two features have but the model still behaves unstably, what should you check?
A three-or-more-way linear dependence (e.g. ) invisible to pairwise — compute VIF and the condition number, which catch multi-way collinearity that the correlation matrix misses.