← Waymo Interview Insights

Waymo·Data Scientist·Technical Phone Screen·Senior

Senior
Jun 2026

Summary

Waymo data scientist interview with a pretty gnarly statistics/sampling problem. One question, but it had enough layers to keep me busy for a while. Not your typical SQL or A/B test setup.

Questions Asked (1)

Q1

You run a restaurant with 10,000 reservations in a day. Each reservation has a reserved party size and an actual show-up count. You only observe 1,000 of these reservations, but the sampling is size-biased: larger reservations are proportionally more likely to be sampled. How would you estimate the total number of people who actually show up across all 10,000 reservations, and how would you quantify uncertainty around that estimate?

Product Analytics & MetricsTechnical Trade-offsA/B Testing & Experimentation
Author's notes

The size-biased sampling part is what trips you up if you're not careful.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the sampling mechanism and define the inclusion probability for each reservation based on its reserved party size. Then, use inverse probability weighting (IPW) to estimate the total actual show-up count, and quantify uncertainty via bootstrapping or analytical variance estimation, accounting for the size-biased sampling design.

Pro tip: Emphasize that the sampling is size-biased and that naive averaging would overestimate the total; instead, weight each sampled reservation by the inverse of its selection probability. Also, discuss how to estimate the selection probabilities if they are unknown, perhaps by modeling the sampling process.

1. Clarify the Sampling Design

Ask questions to understand how the 1,000 reservations were sampled: Is the probability of selection proportional to reserved party size? Are there other factors? Confirm that larger reservations are more likely to be sampled.

2. Define Inclusion Probabilities

For each reservation i, let s_i be the reserved party size. Assume the inclusion probability π_i is proportional to s_i (i.e., π_i = k * s_i, where k is a constant). If the total number of reservations is 10,000, then k = 1000 / sum(s_i) over all reservations, but sum(s_i) is unknown. Alternatively, if we know the total reserved party size across all 10,000, we can compute k. If not, we may need to estimate it from the sample using the Horvitz-Thompson estimator for the total reserved size.

3. Estimate Total Show-Ups with IPW

For each sampled reservation, compute the weight w_i = 1/π_i. Then estimate the total actual show-ups as the sum of w_i * y_i, where y_i is the actual show-up count for reservation i. This is the Horvitz-Thompson estimator. If π_i is unknown, estimate it using the sample: e.g., assume π_i = (s_i / sum_{j in sample} s_j) * (1000/10000)? Actually, if sampling is PPS without replacement, the inclusion probability for unit i is n * s_i / sum_{all} s_i. Since sum_{all} s_i is unknown, we can estimate it by sum_{sample} s_i / (n/N) if we assume the sample is representative? But that's circular. Better: If we know the total number of reservations N=10000, and we assume π_i = n * s_i / S, where S = sum_{all} s_i, then S can be estimated from the sample using the Horvitz-Thompson estimator for S: S_hat = sum_{sample} s_i / π_i, but π_i depends on S. This leads to an iterative solution. Alternatively, if the sampling is with replacement or if we can approximate, we can use the fact that the expected value of s_i/π_i is S/N? Actually, a simpler approach: If we assume π_i = c * s_i, then c = n / S. We can estimate c by noting that the sum of 1/π_i over the sample should equal N? Not exactly. A common method for size-biased sampling is to use the estimator: total = (N/n) * sum_{sample} (y_i / s_i) * (average s)? That's not right. Let's think: If selection probability is proportional to s_i, then the sample is biased towards larger s_i. To estimate the total of y, we can use the ratio estimator: total_y = (sum_{sample} y_i / π_i). But π_i = n * s_i / S. So total_y = (S/n) * sum_{sample} (y_i / s_i). Since S is unknown, we can estimate S by the total reserved size across all 10000, which might be known from the reservation system. If not, we can estimate S from the sample using the fact that the sample is size-biased: the expected value of s_i in the sample is larger than the population mean. Specifically, E[s_i | sampled] = sum s_i^2 / S. So we can estimate S by solving: sum_{sample} s_i / n = sum s_i^2 / S. This requires knowing sum s_i^2, which we don't. So it's tricky. Perhaps the interviewer expects the candidate to recognize that if we know the total reserved party size S, we can compute π_i = n * s_i / S. If S is unknown, we might need to estimate it, but the question says 'You only observe 1,000 of these reservations', implying we don't know S. So we need a method that doesn't require S. One approach: Use the sample to estimate the ratio of total show-ups to total reserved size, then multiply by the total reserved size? But total reserved size is unknown. Alternatively, use the fact that the total number of reservations is 10,000, and we can estimate the average show-up per reservation using a weighted average that corrects for size bias. The Horvitz-Thompson estimator for the total is sum_{sample} y_i / π_i. If π_i = n * s_i / S, then total = (S/n) * sum_{sample} (y_i / s_i). Since S is unknown, we can estimate S by the total reserved size, which might be known from the reservation system. If not, we can estimate S from the sample using the fact that the sample is size-biased: the expected value of s_i in the sample is larger than the population mean. Specifically, E[s_i | sampled] = sum s_i^2 / S. So we can estimate S by solving: sum_{sample} s_i / n = sum s_i^2 / S. This requires knowing sum s_i^2, which we don't. So it's tricky. Perhaps the interviewer expects the candidate to recognize that if we know the total reserved party size S, we can compute π_i = n * s_i / S. If S is unknown, we might need to estimate it, but the question says 'You only observe 1,000 of these reservations', implying we don't know S. So we need a method that doesn't require S. One approach: Use the sample to estimate the ratio of total show-ups to total reserved size, then multiply by the total reserved size? But total reserved size is unknown. Alternatively, use the fact that the total number of reservations is 10,000, and we can estimate the average show-up per reservation using a weighted average that corrects for size bias. The Horvitz-Thompson estimator for the total is sum_{sample} y_i / π_i. If π_i = n * s_i / S, then total = (S/n) * sum_{sample} (y_i / s_i). Since S is unknown, we can estimate S by the total reserved size, which might be known from the reservation system. If not, we can estimate S from the sample using the fact that the sample is size-biased: the expected value of s_i in the sample is larger than the population mean. Specifically, E[s_i | sampled] = sum s_i^2 / S. So we can estimate S by solving: sum_{sample} s_i / n = sum s_i^2 / S. This requires knowing sum s_i^2, which we don't. So it's tricky. Perhaps the interviewer expects the candidate to recognize that if we know the total reserved party size S, we can compute π_i = n * s_i / S. If S is unknown, we might need to estimate it, but the question says 'You only observe 1,000 of these reservations', implying we don't know S. So we need a method that doesn't require S. One approach: Use the sample to estimate the ratio of total show-ups to total reserved size, then multiply by the total reserved size? But total reserved size is unknown. Alternatively, use the fact that the total number of reservations is 10,000, and we can estimate the average show-up per reservation using a weighted average that corrects for size bias. The Horvitz-Thompson estimator for the total is sum_{sample} y_i / π_i. If π_i = n * s_i / S, then total = (S/n) * sum_{sample} (y_i / s_i). Since S is unknown, we can estimate S by the total reserved size, which might be known from the reservation system. If not, we can estimate S from the sample using the fact that the sample is size-biased: the expected value of s_i in the sample is larger than the population mean. Specifically, E[s_i | sampled] = sum s_i^2 / S. So we can estimate S by solving: sum_{sample} s_i / n = sum s_i^2 / S. This requires knowing sum s_i^2, which we don't. So it's tricky. Perhaps the interviewer expects the candidate to recognize that if we know the total reserved party size S, we can compute π_i = n * s_i / S. If S is unknown, we might need to estimate it, but the question says 'You only observe 1,000 of these reservations', implying we don't know S. So we need a method that doesn't require S. One approach: Use the sample to estimate the ratio of total show-ups to total reserved size, then multiply by the total

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.