Runs Test for Streaks in YouTube Music Shuffle Play
Last updated: November 29, 2026
Quick Overview
Users complain that YouTube Music shuffle plays long streaks from one artist. In a 40-track session alternating between two artists' songs, you observe only 8 runs (maximal streaks). Test whether this sequence is consistent with a random shuffle.
0
0
0 solved
Users complain that YouTube Music shuffle plays long streaks from one artist. In a 40-track session alternating between two artists' songs, you observe only 8 runs (maximal streaks). Test whether this sequence is consistent with a random shuffle.
Shuffle fairness is a product question with a statistics core, and Google interviewers like seeing a candidate pick a test that matches the complaint. The runs test directly targets streakiness rather than overall balance.
What the Interviewer Expects
- Define runs and why they measure streakiness
- Give the mean and variance of runs under randomness
- Compute the z statistic
- Explain that people perceive randomness as too streaky
- Suggest how to evaluate shuffle across many sessions
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- How would you test a whole day of sessions rather than one?
- Many users want an 'anti-streak' shuffle; how would you design and evaluate it?
- How would you handle more than two artists?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Assume the 40 tracks consist of 20 from artist A and 20 from artist B, and a fair shuffle makes every ordering equally likely. A run is a maximal block of consecutive tracks from one artist. Too few r...
Approach
For and items, under a random ordering the number of runs has and is app...