KatInterview

Chance That Two Random Lamp Schedules Overlap

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsgeometric-probabilityuniform-distributioninterval-overlap

Last updated

Two independent events start at uniformly random times in a 30-day window and last 9 and 12 days. Find the probability that their active periods share at least one moment.

Two decorative lamps are switched on at random moments, independently of each other, within the next 30 days.

  • The amber lamp is switched on at a time uniformly distributed over the 30-day window. Once on, it stays lit for exactly 9 days.
  • The green lamp is switched on at a time uniformly distributed over the same 30-day window. Once on, it stays lit for exactly 12 days.

Only the switch-on times are restricted to the 30-day window. A lamp that is switched on late may remain lit after day 30.

Question: What is the probability that there is at least one moment when both lamps are lit at the same time?

What is expected:

  1. State your modelling assumptions (continuous time, what is random).
  2. Turn "the lamps are lit together" into a precise condition on the two start times.
  3. Compute the exact probability, and explain why your method is valid.
  4. Briefly describe how you would check the result, and how the answer changes for general window and duration values.

Hints

Hint 1

Let A and G be the two switch-on times. Both are uniform on [0, 30] and independent, so the pair (A, G) is uniform on a square. Probability then becomes a ratio of areas.

Hint 2

Two intervals overlap exactly when each one begins before the other ends. Write this as two inequalities and combine them into a single bound on A - G.

Hint 3

It is easier to compute the complement. The non-overlap region consists of two right triangles in opposite corners of the square. Find their leg lengths from the durations and the window length.