Assess Routing Experiment Validity
WaymoData Scientist · Online AssessmentLast updated
This question evaluates experimental analysis and statistical hypothesis testing skills, including data preparation and joining, interpretation of p-values, and understanding of causal inference and threats to validity in A/B tests.
A ride-hailing team runs an A/B test in San Francisco in July 2024 for a new routing algorithm intended to reduce time to pickup, abbreviated TTP.
You are given two pandas DataFrames:
df_users:
user_id: unique user identifiervariant: experiment assignment, eithercontrolortreatment
df_rides:
ride_id: unique ride identifieruser_id: user identifierride_date: ride timestamp or datecity: ride citytime_to_pickup: numeric TTP in minutes
Tasks:
- Write Python code to filter to San Francisco rides in July 2024, join ride records to experiment assignments, run a Welch two-sample t-test comparing treatment versus control TTP, and return the p-value.
- Given the returned p-value, how would you decide whether the result is statistically significant?
- Is a statistically significant p-value conclusive proof that the new routing algorithm is better? If not, explain the main threats to validity.
- Propose a stronger experiment design and analysis plan for this routing algorithm.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.