← Google Interview Insights

Google·Data Scientist·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Went through a technical screen for a DS role at Google that went pretty deep into OLS inference. One question but it had like four sub-parts and felt like a grad school exam more than an interview.

Questions Asked (1)

Q1

In OLS regression, walk through how you'd test whether a single feature is statistically relevant: set up the hypothesis test and t-statistic with its exact standard error formula and degrees of freedom, explain why the test statistic actually follows a t-distribution under classical assumptions, give intuition for why using an estimated sigma makes things noisier than a Z-test, and describe how heteroskedasticity or clustered data changes the test and the reference distribution.

A/B Testing & ExperimentationProduct Analytics & MetricsTechnical Trade-offs
Author's notes

This wrecked me a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first setting up the hypothesis test and deriving the t-statistic with its standard error and degrees of freedom, then explain the theoretical reason it follows a t-distribution under classical assumptions, and finally discuss how violations like heteroskedasticity or clustering affect the test and reference distribution. Use clear, step-by-step reasoning and connect each part to the underlying statistical theory.

Pro tip: Emphasize that the t-test is exact under normality and homoskedasticity, but in practice with large samples or robust methods, the distinction between t and Z becomes less critical; however, for clustered data, the effective degrees of freedom can be much smaller, so using a t-distribution with adjusted df is crucial to avoid overconfidence.

1. Set up the hypothesis and test statistic

State the null hypothesis that the coefficient for the feature is zero versus the alternative that it is not. Define the t-statistic as the estimated coefficient divided by its standard error.

2. Provide the exact standard error formula and degrees of freedom

Give the formula for the standard error of the coefficient: sqrt(sigma^2 * (X'X)^{-1}_{jj}), where sigma^2 is the estimated error variance. The degrees of freedom are n - k, where n is the sample size and k is the number of parameters including the intercept.

3. Explain why the statistic follows a t-distribution

Under classical assumptions (normal errors, homoskedasticity, independent observations), the numerator is normally distributed and the denominator involves the square root of an independent chi-squared random variable divided by its degrees of freedom, yielding a t-distribution.

4. Give intuition for the t vs. Z difference

Using an estimated sigma introduces extra variability, making the test statistic more dispersed than a standard normal. The t-distribution has heavier tails to account for this uncertainty, especially in small samples.

5. Discuss heteroskedasticity and clustered data

Heteroskedasticity makes the usual standard error formula biased; use heteroskedasticity-robust (White) standard errors, and the test statistic is still compared to a t-distribution (or normal in large samples). Clustered data requires cluster-robust standard errors, and the reference distribution is often a t-distribution with degrees of freedom equal to the number of clusters minus one, or a normal approximation if clusters are many.

Key Points to Mention

  • Null hypothesis: beta_j = 0; alternative: beta_j != 0 (or one-sided).
  • t-statistic = (beta_hat_j - 0) / SE(beta_hat_j).
  • SE(beta_hat_j) = sqrt(sigma_hat^2 * [(X'X)^{-1}]_{jj}), where sigma_hat^2 = RSS/(n-k).
  • Degrees of freedom = n - k (or n - k - 1 depending on parameterization).
  • Under classical assumptions, (beta_hat_j - beta_j)/SE follows t_{n-k} because numerator is N(0,1) and denominator is sqrt(chi^2_{n-k}/(n-k)) independent.
  • Heteroskedasticity: use robust SEs; clustered data: use cluster-robust SEs and t-distribution with G-1 df (G = number of clusters).

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