Permutation Test for Median Google Maps Route Latency
Last updated: November 29, 2026
Quick Overview
A Google Maps backend change was benchmarked on 10 routing requests before and 10 after; latencies are skewed with occasional multi-second outliers. Use a permutation test to decide whether median latency changed.
0
0
0 solved
A Google Maps backend change was benchmarked on 10 routing requests before and 10 after; latencies are skewed with occasional multi-second outliers. Use a permutation test to decide whether median latency changed.
Infrastructure engineers on Maps and Cloud often have small, messy benchmark samples, and some Google loops ask SWE candidates for practical statistics. The interviewer checks that you can pick a robust statistic, implement a resampling test correctly, and explain what the p-value means.
What the Interviewer Expects
- Explain why the median is a better summary for skewed latency
- Describe the exchangeability assumption under the null
- Implement the permutation test with a correct p-value
- Interpret a borderline result honestly
- Recommend how to get a more decisive benchmark
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 design the benchmark so a paired test applies?
- How many permutations do you need for a stable p-value near 0.05?
- How would you test a change in p99 instead of the median?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Ask whether the before and after runs used the same 10 routes (that would allow a paired test) and whether runs were interleaved in time so machine load affects both. Assume independent requests and u...
Approach
Under the change does nothing, so the 20 latencies are exchangeable: any split into two groups of 10 is equally likely. Compute the observed difference in medians, then shuffle the pooled sample...