Google · Statistics & Data Analysis
Prove OLS invariance to linear transforms
TrueInterview
October 7, 2026 · 1 min read
Fit Model 1 as . Then fit Model 2 with , where is an invertible matrix. a) Show that the OLS fitted values coincide for Model 1 and Model 2 for any invertible , and derive the coefficient mapping . b) If ridge () or lasso () is used instead of OLS, will the coefficients and fitted values remain unchanged under this ? Give the conditions precisely (e.g., ridge is invariant to orthonormal transforms but not to arbitrary rescalings; lasso is invariant only to signed permutations, not to general rotations). c) For ridge, write the solutions and show when is unchanged; for lasso, supply a concrete counterexample where the fitted values differ.
This question is designed to probe linear regression invariance under invertible linear transformations, multivariate linear algebra, and the effect of ridge and lasso regularization on coefficient and prediction stability in the Statistics & Math domain.
This problem was reported from a Google Data Scientist interview experience.