← Google Interview Insights

Google·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Google data or analytics interview, one question about handling correlation when your data has outliers. Pretty short on details but the question itself is the kind of thing that trips people up if you only know the textbook answer.

Questions Asked (1)

Q1

How would you measure correlation when the dataset contains outliers?

Product Analytics & MetricsTechnical Trade-offs
Author's notes

My first instinct was Pearson and I almost just said it out loud before catching myself.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that outliers can distort Pearson correlation, then discuss robust alternatives like Spearman or Kendall rank correlations, or robust covariance methods. Emphasize that the choice depends on the nature of the outliers and the underlying data distribution, and that you would validate with visualizations and sensitivity analysis.

Pro tip: Mention that you would first investigate whether outliers are errors or genuine extreme values, as this determines whether to remove, transform, or use robust methods. Also, highlight that you would communicate the impact of outliers on correlation to stakeholders to ensure informed decisions.

1. Identify and Understand Outliers

Detect outliers using visualization (boxplots, scatterplots) and statistical methods (z-scores, IQR). Determine if they are data errors or legitimate extreme values.

2. Choose Robust Correlation Measures

Select appropriate methods: Spearman's rank correlation, Kendall's tau, or robust covariance estimators (e.g., MCD, M-estimators) that are less sensitive to outliers.

3. Consider Data Transformations

Apply transformations like log or winsorization to reduce outlier impact if the relationship is monotonic but not linear, or if outliers are extreme but valid.

4. Validate and Compare Results

Compute correlation with and without outliers, and using different methods. Assess stability and interpret differences in context of the business problem.

5. Communicate Findings and Trade-offs

Explain the chosen method, its assumptions, and the impact of outliers on the correlation. Discuss implications for decision-making and potential next steps.

Key Points to Mention

  • Pearson correlation is sensitive to outliers; Spearman and Kendall are more robust.
  • Robust covariance estimators like Minimum Covariance Determinant (MCD) or M-estimators.
  • Data transformations (log, winsorization) can mitigate outlier effects.
  • Visualization is crucial for understanding outliers and relationships.
  • Sensitivity analysis: compare correlation with and without outliers.
  • Context matters: outliers may be meaningful and should not be automatically removed.

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