← Google Interview Insights

Google·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Google Data Scientist interview with a statistics-heavy question about linear regression in high-dimensional settings. Pretty technical for what felt like a screening round, but it was a clean, well-scoped problem.

Questions Asked (1)

Q1

You train a linear regression model with 500 predictors and only 600 observations. What problem are you likely to run into, why does it happen, and how does L1 regularization help?

Technical Trade-offsData Modeling
Author's notes

The overfitting part came naturally.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by identifying the core problem: with more predictors than observations, the model is overparameterized and prone to overfitting. Explain why this happens (multicollinearity, high variance, non-unique solutions) and then describe how L1 regularization addresses it by adding a penalty that drives some coefficients to zero, effectively performing feature selection and reducing variance.

Pro tip: Mention that L1 regularization yields sparse solutions, which is particularly useful when you suspect only a subset of the 500 predictors are relevant. Also, note that while L1 helps with overfitting, it introduces bias, so cross-validation is essential to tune the regularization strength.

1. Identify the problem

State that with 500 predictors and 600 observations, the model is likely to overfit due to high dimensionality relative to sample size. This leads to poor generalization on unseen data.

2. Explain why it happens

Discuss the curse of dimensionality: with many predictors, the design matrix may be ill-conditioned or singular, causing multicollinearity and unstable coefficient estimates. The model has enough flexibility to fit noise, resulting in high variance.

3. Introduce L1 regularization

Describe L1 regularization (Lasso) as adding a penalty equal to the absolute value of coefficients to the loss function. This constrains the coefficients and encourages sparsity by shrinking some to exactly zero.

4. Explain how L1 helps

L1 regularization performs feature selection by zeroing out irrelevant predictors, reducing model complexity and variance. It also helps with multicollinearity by selecting one predictor among correlated ones, leading to a more interpretable and generalizable model.

5. Conclude with practical considerations

Mention that the regularization strength (lambda) must be tuned via cross-validation. Also note that L1 introduces bias but can significantly reduce variance, improving test performance.

Key Points to Mention

  • Overfitting due to high dimensionality (p > n)
  • Multicollinearity and unstable coefficient estimates
  • L1 regularization (Lasso) adds absolute penalty to loss function
  • Sparsity: L1 drives some coefficients to zero, performing feature selection
  • Bias-variance tradeoff: L1 increases bias but reduces variance
  • Need for cross-validation to tune regularization parameter

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.