Analyze OLS After Duplicating Every Observation

Read the full interview experience this question came from →

Quick Overview

Derive how exact row duplication affects OLS coefficients and standard errors. The coefficients stay fixed while naive uncertainty shrinks, exposing a violation of independence.

Analyze OLS After Duplicating Every Observation

Company: Snapchat

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

An ordinary least squares regression with an intercept is fit to (n) observations and (p) fitted coefficients, counting the intercept. A new dataset is created by copying every observation exactly once, so the new design matrix and outcome contain two identical copies of each original row. What happens to the fitted coefficients and their reported standard errors? Derive the answer for conventional homoskedastic OLS standard errors and explain why the numerical result can be misleading. ### Constraints & Assumptions - The original design matrix has full column rank. - The duplicated rows are exact copies, not new independent measurements. - Distinguish the software's naive independence calculation from inference that respects duplicate pairs. ### Clarifying Questions to Ask - Are standard errors computed with an estimated residual variance or a known error variance? - Does the software treat every copied row as independent? - Are robust or cluster-robust standard errors allowed? ```hint Scale the sufficient statistics After duplication, both (X^\top X) and (X^\top y) double, and the residual sum of squares doubles as well. ``` ### What a Strong Answer Covers - Algebra showing that the OLS coefficient vector is unchanged. - The finite-sample degrees-of-freedom effect on the naive standard errors. - The approximate (1/\sqrt{2}) shrinkage that software reports for large (n). - Recognition that exact copies add no independent information. - A dependence-aware alternative such as clustering by original observation. ### Follow-up Questions - What changes if only observations with large positive residuals are duplicated? - How would frequency weights differ from pretending duplicates are independent samples? - What happens to heteroskedasticity-robust standard errors under exact duplication?

Overview: Derive how exact row duplication affects OLS coefficients and standard errors. The coefficients stay fixed while naive uncertainty shrinks, exposing a violation of independence.

Read the full Snapchat Data Scientist interview experience this question came from

|Home/Statistics & Math/Snapchat
Snapchat logo
Snapchat
Aug 13, 2026
mediumData ScientistTechnical ScreenStatistics & Math
1
0

An ordinary least squares regression with an intercept is fit to (n) observations and (p) fitted coefficients, counting the intercept. A new dataset is created by copying every observation exactly once, so the new design matrix and outcome contain two identical copies of each original row.

What happens to the fitted coefficients and their reported standard errors? Derive the answer for conventional homoskedastic OLS standard errors and explain why the numerical result can be misleading.

Constraints & Assumptions

  • The original design matrix has full column rank.
  • The duplicated rows are exact copies, not new independent measurements.
  • Distinguish the software's naive independence calculation from inference that respects duplicate pairs.

Clarifying Questions to Ask Guidance

  • Are standard errors computed with an estimated residual variance or a known error variance?
  • Does the software treat every copied row as independent?
  • Are robust or cluster-robust standard errors allowed?

What a Strong Answer Covers Guidance

  • Algebra showing that the OLS coefficient vector is unchanged.
  • The finite-sample degrees-of-freedom effect on the naive standard errors.
  • The approximate (1/\sqrt{2}) shrinkage that software reports for large (n).
  • Recognition that exact copies add no independent information.
  • A dependence-aware alternative such as clustering by original observation.

Follow-up Questions Guidance

  • What changes if only observations with large positive residuals are duplicated?
  • How would frequency weights differ from pretending duplicates are independent samples?
  • What happens to heteroskedasticity-robust standard errors under exact duplication?
Loading comments...