← Google Interview Insights

Google·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Google data scientist interview, looked like a written technical screen covering a pretty wide range of stats and ML topics all at once. Four distinct problems in one sitting, from hand-computing a Welch t-test to choosing regularization methods for correlated predictors. Dense stuff.

Questions Asked (4)

Q1

Hand-compute a two-sided p-value using Welch's t-test for two samples (n1=20, mean1=5.2, sd1=1.1 vs n2=24, mean2=4.6, sd2=1.5). Walk through the t-statistic, Satterthwaite degrees of freedom, and the resulting p-value to three decimal places. Also explain why Welch's is the right call over a pooled t-test here.

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

The arithmetic is genuinely annoying to do by hand.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly stating the formula for Welch's t-statistic and Satterthwaite's degrees of freedom, then compute each component step-by-step with the given numbers. After obtaining the t-statistic and df, use a t-distribution to find the two-sided p-value, and finally explain why Welch's is preferred over the pooled t-test in this context.

Pro tip: Mention that Welch's t-test is the default in many statistical software packages (e.g., R's t.test) because it maintains Type I error rates even when variances are unequal, and it performs well even when sample sizes are unequal, as in this case.

1. State the hypotheses and test choice

Clearly define the null and alternative hypotheses (two-sided) and state that you will use Welch's t-test due to unequal variances and sample sizes.

2. Compute the t-statistic

Calculate the standard error using the formula SE = sqrt(s1^2/n1 + s2^2/n2), then compute t = (mean1 - mean2) / SE.

3. Calculate Satterthwaite degrees of freedom

Use the formula df = (s1^2/n1 + s2^2/n2)^2 / [ (s1^2/n1)^2/(n1-1) + (s2^2/n2)^2/(n2-1) ] and compute the value.

4. Determine the two-sided p-value

Using the t-statistic and df, find the two-sided p-value from a t-distribution (e.g., using a t-table or approximation) and round to three decimal places.

5. Justify Welch's over pooled t-test

Explain that Welch's t-test does not assume equal variances, is robust to unequal sample sizes, and controls Type I error better when variances differ.

Key Points to Mention

  • Welch's t-test formula for t-statistic and degrees of freedom
  • The assumption of equal variances is not met (sd1=1.1 vs sd2=1.5, ratio > 1.5)
  • Unequal sample sizes (n1=20, n2=24) further justify Welch's
  • Satterthwaite approximation for degrees of freedom
  • Two-sided p-value interpretation and rounding to three decimals
  • Welch's t-test is more robust and is the default in many software packages

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

Q2

For a Poisson process with rate λ=2 events per hour: first, find P[N(1.5) ≥ 3]. Second, given that exactly one event occurred in the first two hours, what is the probability that event happened within the first 0.5 hours? Name the property you're using.

A/B Testing & Experimentation
Author's notes

Part one is fine, just scale the rate to λ=3 for the 1.5-hour window and use the complement.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, compute the probability using the Poisson distribution with mean λt = 2 * 1.5 = 3. Then, for the conditional probability, recognize that given N(2)=1, the event time is uniformly distributed on [0,2] due to the memoryless property of the Poisson process. Finally, calculate the probability that the event occurred within the first 0.5 hours as 0.5/2 = 0.25, and explicitly name the property as the memoryless property (or independent increments).

Pro tip: When explaining the conditional part, emphasize that the uniform distribution of the single event time is a direct consequence of the memoryless property, which is a key concept in Poisson processes. This shows deep understanding beyond just plugging into formulas.

1. Identify the distribution and parameters

Recognize that N(t) follows a Poisson distribution with mean λt. For the first part, λ=2 and t=1.5, so mean = 3.

2. Compute P[N(1.5) ≥ 3]

Calculate 1 - P[N(1.5) ≤ 2] using the Poisson PMF: P(N=k) = e^{-3} * 3^k / k!. Sum for k=0,1,2 and subtract from 1.

3. Analyze the conditional probability

Given N(2)=1, the time of the event is uniformly distributed on [0,2] due to the memoryless property. So the conditional probability is the length of the interval [0,0.5] divided by the total interval [0,2].

4. Calculate the conditional probability

Compute P(event in first 0.5 hours | N(2)=1) = 0.5 / 2 = 0.25.

5. Name the property

Explicitly state that the property used is the memoryless property of the Poisson process (or the property that conditional on the number of events, the event times are uniformly distributed).

Key Points to Mention

  • Poisson distribution PMF: P(N(t)=k) = e^{-λt} (λt)^k / k!
  • Calculation of P(N(1.5) ≥ 3) = 1 - P(N(1.5) ≤ 2) with λt=3
  • Memoryless property of the Poisson process
  • Conditional distribution of event times given the number of events: uniform
  • Uniform distribution on [0,2] for the single event time
  • Final answer for conditional probability: 0.25

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

Q3

You have 200 standardized predictors with block correlations around 0.9 and n=500. Choose between LASSO, Ridge, and Elastic Net for a task that requires both prediction accuracy and some interpretability. Explain the trade-offs, how you'd tune λ and α using nested cross-validation, and what the high within-group correlations do to selection stability and prediction error.

Technical Trade-offsData ModelingProduct Analytics & Metrics
Author's notes

This is the question I spent the most time on and still felt shaky leaving it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem: with 200 predictors, n=500, and block correlations ~0.9, you need a regularized linear model that balances prediction and interpretability. Compare LASSO, Ridge, and Elastic Net, arguing that Elastic Net is likely best because it handles correlated groups while still performing some selection. Then explain nested CV for tuning λ and α, and discuss how high within-group correlations affect selection stability and prediction error.

Pro tip: Emphasize that with such high correlations, LASSO's selection is unstable and may arbitrarily pick one predictor per group, while Elastic Net's L2 component encourages grouping and stability. Also mention that Ridge often has the best prediction error but no sparsity, so Elastic Net offers a practical compromise.

1. Clarify the trade-off between prediction and interpretability

Explain that Ridge minimizes prediction error but keeps all predictors, LASSO gives sparse models but unstable selection under high correlation, and Elastic Net combines both penalties to balance the two goals.

2. Recommend Elastic Net with justification

Argue that Elastic Net is preferable because its L2 component handles correlated groups by shrinking coefficients together, while the L1 component still yields some sparsity for interpretability.

3. Describe nested cross-validation for tuning λ and α

Outline an outer loop for unbiased performance estimation and an inner loop for hyperparameter tuning (grid search over λ and α) using cross-validation, ensuring no data leakage.

4. Discuss the impact of high within-group correlations

Explain that correlations ~0.9 cause LASSO to arbitrarily select one variable per group, leading to unstable selection across resamples; Elastic Net mitigates this by grouping correlated variables, improving stability at the cost of slightly less sparsity.

5. Conclude with practical recommendations

Suggest using Elastic Net with nested CV, and if interpretability is paramount, consider post-selection inference or grouping methods; if prediction is paramount, Ridge might be sufficient.

Key Points to Mention

  • Bias-variance trade-off: Ridge has low variance but high bias (no sparsity), LASSO can be unstable with correlated predictors, Elastic Net balances both.
  • Grouping effect: Elastic Net tends to include or exclude correlated predictors together, improving selection stability.
  • Nested cross-validation: outer loop for performance estimation, inner loop for hyperparameter tuning to avoid optimistic bias.
  • Tuning λ and α: use grid search over α (mixing parameter) and λ (regularization strength) with inner CV, then evaluate on outer test folds.
  • Selection stability: high correlations lead to arbitrary variable selection in LASSO; Elastic Net's L2 penalty encourages stable grouping.
  • Prediction error: Ridge often has lower prediction error when many predictors are relevant; Elastic Net can achieve similar error with sparsity.

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

Q4

You have 25 paired observations per subject, the two measurements have unequal variances, and the data shows mild non-normality. Which test do you use: paired t-test, Welch's t-test, or a nonparametric alternative? Justify your assumption choices and state what effect size you'd report.

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

Welch's t-test doesn't apply here because the pairing structure matters and you'd be throwing away information.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify that the paired structure means you should analyze within-subject differences, not use Welch's t-test (which is for independent groups). Assess whether the mild non-normality and unequal variances of the original measurements affect the distribution of the differences; with n=25, the paired t-test is likely robust if the differences are not severely skewed or heavy-tailed. If the differences show strong non-normality or outliers, use a nonparametric alternative like the Wilcoxon signed-rank test, and report an appropriate effect size (Cohen's dz for the t-test, r for Wilcoxon).

Pro tip: Emphasize that the paired t-test is on the differences, so unequal variances of the two measurements are irrelevant; what matters is the distribution of the differences. Also, mention that with n=25, the Central Limit Theorem provides reasonable robustness unless non-normality is extreme.

1. Identify the correct test family

Recognize that the data are paired (repeated measures on the same subject), so the analysis should focus on within-subject differences. Welch's t-test is for independent samples and is therefore inappropriate.

2. Check assumptions for the paired t-test

The paired t-test assumes that the differences are approximately normally distributed. Unequal variances of the two measurements do not violate this assumption. With n=25, mild non-normality is usually acceptable due to the robustness of the t-test.

3. Evaluate the distribution of differences

If the differences are severely non-normal (e.g., strong skewness, outliers), consider a nonparametric alternative such as the Wilcoxon signed-rank test. Otherwise, proceed with the paired t-test.

4. Choose and justify the test

State your decision: if differences are roughly symmetric without extreme outliers, use the paired t-test; if not, use Wilcoxon signed-rank. Justify based on robustness and the specific data characteristics.

5. Report appropriate effect size

For the paired t-test, report Cohen's dz (mean difference divided by standard deviation of differences). For Wilcoxon, report the matched-pairs rank-biserial correlation or r = Z/√N.

Key Points to Mention

  • Paired t-test operates on differences, so unequal variances of the two measurements are irrelevant.
  • Welch's t-test is for independent samples, not paired data.
  • With n=25, the paired t-test is robust to mild non-normality unless differences are heavily skewed or have outliers.
  • Wilcoxon signed-rank test is the nonparametric alternative for paired data when normality is questionable.
  • Effect size for paired t-test: Cohen's dz; for Wilcoxon: rank-biserial correlation or r.
  • Always inspect the distribution of differences (e.g., histogram, QQ plot) before deciding.

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