Expected Number of Record Traffic Days in a Year

Last updated: November 29, 2026

Quick Overview

If daily peak traffic values for a Google service were i.i.d. with a continuous distribution, how many days in a year would set a new all-time record (counting day 1), and how should you react to an alert that fires on every new record?

Google
Statistics & Math
Data Scientist
Google
November 29, 2026
Data Scientist
Technical Screen
Statistics & Math
Medium

0

0

0 solved


If daily peak traffic values for a Google service were i.i.d. with a continuous distribution, how many days in a year would set a new all-time record (counting day 1), and how should you react to an alert that fires on every new record?

This tests linearity of expectation with a practical twist about alerting on new highs, a common setup in Google monitoring. The interviewer looks for the exchangeability argument, the harmonic number result, and a sensible view of what records imply about trend.

What the Interviewer Expects
  • Define indicator I_k for day k being a record
  • Use exchangeability: P(I_k = 1) = 1/k
  • Sum to H_365, about 6.5
  • Note the variance and that records slow down logarithmically
  • Explain that many more records signal a trend
Key Topics to Cover
linearity of expectation
exchangeability
harmonic numbers
records
trend detection
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • What is the variance of the number of records?
  • With an upward trend, how does the record count change?
  • Are the record indicators independent?
  • How would you design a better alert than 'new all-time high'?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Values X1,…,XnX_1, \dots, X_n i.i.d. continuous (no ties), n=365n = 365. Day kk is a record if Xk>max⁡(X1..Xk−1)X_k > \max(X_1..X_{k-1}); day 1 counts. We want E[Rn]E[R_n] and an interpretation....

Approach

Write Rn=∑kIkR_n = \sum_k I_k. Among the first kk values, each is equally likely to be the largest by exchangeability, so P(Ik=1)=1/kP(I_k = 1) = 1/k. Linearity does the rest....


Submit Your Answer
Markdown supported