← Agoda Interview Insights

Agoda·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Got a probability question during what felt like a technical screen for a data scientist role at Agoda. Classic geometry-of-probability problem, the kind you see in stats textbooks but somehow still trips you up under pressure.

Questions Asked (1)

Q1

Two people each arrive at a random time within a one-hour window. What is the probability that they are at the same place within 15 minutes of each other?

Algorithms & Data StructuresProduct Analytics & Metrics
Author's notes

I knew this problem from school but blanked on how to set it up cleanly under pressure.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem geometrically by representing each person's arrival time as a point in a unit square, then identify the region where the absolute time difference is at most 15 minutes. Calculate the area of that region and divide by the total area to get the probability.

Pro tip: After solving, mention that this is a classic 'meeting problem' and that the same geometric approach generalizes to any waiting time w, with probability 1 - (1 - w)^2 for a 1-hour window. This shows you can abstract the solution and apply it to similar problems.

1. Define the sample space

Let X and Y be the arrival times of the two people, each uniformly distributed on [0, 60] minutes. The sample space is the square [0,60] x [0,60] with area 3600.

2. Identify the favorable region

The condition 'within 15 minutes of each other' means |X - Y| ≤ 15. This region is a diagonal band of width 15√2 around the line X = Y.

3. Compute the area of the favorable region

The area of the band is the total square area minus the areas of the two triangles where |X - Y| > 15. Each triangle has legs of length 45, so area = 0.5 * 45 * 45 = 1012.5. Total unfavorable area = 2025. Favorable area = 3600 - 2025 = 1575.

4. Calculate the probability

Divide the favorable area by the total area: 1575 / 3600 = 0.4375, or 43.75%.

5. Generalize and interpret

Note that for a waiting time w (in minutes) within a 60-minute window, the probability is 1 - (1 - w/60)^2. For w=15, this gives 1 - (0.75)^2 = 0.4375. Discuss how this applies to real-world scenarios like meeting up or customer arrivals.

Key Points to Mention

  • Uniform distribution of arrival times
  • Geometric probability approach using a unit square
  • Equation |X - Y| ≤ 15 for the condition
  • Area calculation: total area minus two right triangles
  • General formula: P = 1 - (1 - w/T)^2 for window T and waiting time w
  • Assumption of independence between the two arrival times

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