← LinkedIn Interview Insights

LinkedIn·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

LinkedIn data science interview with a stats-heavy question about user behavior on a video platform. Single question but they wanted the full treatment: data slicing, metric definition, test selection, and code. Not a vibe check, they actually wanted to see you work through it.

Questions Asked (1)

Q1

A video platform wants to know if users' first uploaded videos tend to be shorter than their later uploads. How would you test this hypothesis? Walk through the data slice, the metric, the statistical test you'd use, and sketch out the SQL or pseudo-code.

A/B Testing & ExperimentationProduct Analytics & MetricsData Modeling
Author's notes

I went straight for a paired t-test comparing first video duration vs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the analysis as a within-user comparison: for each user, compare the duration of their first upload to the duration of their later uploads. Define the metric clearly (e.g., average duration of later uploads minus first upload duration), then use a paired statistical test (like a paired t-test or Wilcoxon signed-rank test) on the per-user differences. Finally, write SQL to extract the necessary data and compute the test statistic.

Pro tip: Mention that you would check for confounding factors like video category or user tenure, and consider segmenting by user type (e.g., casual vs. professional creators) to see if the effect holds across groups.

1. Define the data slice

Select users who have at least two uploads (so we can compare first vs. later). Decide on a time window (e.g., first 30 days after signup) and exclude outliers like videos with zero duration or extreme lengths.

2. Define the metric

For each user, compute the duration of their first upload and the average duration of their subsequent uploads (or median if skewed). The metric of interest is the difference: later_avg_duration - first_duration.

3. Choose the statistical test

Use a paired t-test if differences are normally distributed; otherwise, use the Wilcoxon signed-rank test. Report the mean difference, confidence interval, and p-value.

4. Write SQL/pseudo-code

Write a query to extract user_id, video_id, upload_timestamp, and duration, then use window functions to rank uploads per user. Compute first vs. later durations and aggregate per user.

5. Interpret and validate

Check if the difference is statistically and practically significant. Consider segmenting by user activity level or video category to ensure robustness.

Key Points to Mention

  • Within-user comparison (paired design) to control for user-level confounders
  • Handling of users with only one upload (exclude or analyze separately)
  • Choice of statistical test based on distributional assumptions
  • Use of window functions (e.g., ROW_NUMBER) in SQL to identify first upload
  • Consideration of outliers and data cleaning (e.g., zero-duration videos)
  • Practical significance vs. statistical significance (effect size)

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