Testing Whether Cancellation Rates Differ Between Two Cities
Last updated: November 29, 2026
Quick Overview
City A had 1,200 rider cancellations out of 20,000 requests last week and City B had 1,350 out of 20,000. Is the difference statistically significant, and what would make you distrust the test?
Uber
November 29, 20260
0
0 solved
City A had 1,200 rider cancellations out of 20,000 requests last week and City B had 1,350 out of 20,000. Is the difference statistically significant, and what would make you distrust the test?
Comparing proportions across markets is routine for Uber data scientists, and the interviewer uses it to check the mechanics of a two-proportion z-test plus judgment about independence and confounding.
What the Interviewer Expects
- Set up null and alternative hypotheses
- Compute pooled proportion, standard error and z
- Interpret the p-value correctly
- Raise independence concerns (repeat riders, clustered days)
- Point out that city differences are observational, not causal
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 compute a confidence interval for the difference?
- What if the same riders made many requests?
- How would you compare 30 cities at once?
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 each request is independent (it is not if riders retry after cancelling) and whether the weeks are comparable (weather, events). Proceed with a standard test, then critique it....
Approach
versus .
, .
Pooled .
$SE = \sqrt{\hat p (1 - \hat p)\left(\dfrac{1}...