A passenger arrives uniformly at random within a 60-minute window: what is the probability the arrival falls in the final 10 minutes?
answer
- flat density, no favoured position
- probability is a length ratio
- f(x) = 1 / (b - a)
- ten minutes out of sixty
basics
~10 sOne sixth, about 16.7%. A continuous uniform distribution has a flat density, so probability is proportional to interval length: the last 10 minutes out of 60 give 10/60 = 1/6.
solid answer
~50 sFor a continuous uniform variable on `[0, 60]` the density is constant at `1 / (b - a) = 1/60` per minute, so probability depends only on how wide an interval is, never on where it sits. The last 10 minutes span `10 * (1/60) = 1/6`, roughly 16.7% — exactly the same as the first 10 minutes or any other 10-minute stretch. The CDF is linear, `F(x) = x / 60`, so `P(50 < X <= 60) = F(60) - F(50) = 1 - 5/6 = 1/6`. The mean is the midpoint `(a + b) / 2 = 30` and the variance is `(b - a)^2 / 12 = 300`, giving a standard deviation of about 17.3 minutes. Two things worth saying out loud: the density value 1/60 is not itself a probability, and the probability of arriving at any single exact instant is zero.
go deeper
Be ready to answer with a length ratio in one step and to state the density 1/(b-a), the mean (a+b)/2 and the variance (b-a)^2/12 from memory.
Expect to explain why probability equals area under a flat density, sketch the linear CDF, and derive the variance rather than quote it.
Show that you know when a uniform assumption is doing real work — modelling an arrival inside a scheduled window versus pretending genuinely clustered arrivals are spread evenly.
Own the framing question: the uniform is the honest expression of no information about position, so justify it as a deliberate prior-like choice rather than a default nobody checked.
## What the continuous uniform distribution says A continuous uniform distribution on an interval `[a, b]` is the formal way to say "any point in this range is as likely as any other". Its probability density function is flat: ``` f(x) = 1 / (b - a) for a <= x <= b, and 0 outside ``` For a 60-minute window, `a = 0`, `b = 60`, so `f(x) = 1/60` for every minute in the window. The height is chosen so that the total area under the density equals 1, which is the defining requirement of any density: `60 * (1/60) = 1`. ## Why the answer is a length ratio For a continuous variable, probability is area under the density, not the height of the density. Because the height is constant here, area over a sub-interval is just height times width: ``` P(c <= X <= d) = (d - c) / (b - a) ``` The final 10 minutes are the interval `[50, 60]`, so `P = (60 - 50) / (60 - 0) = 10/60 = 1/6 ≈ 0.167`. The same arithmetic gives 1/6 for `[0, 10]` and for `[25, 35]`. Under a uniform law, position is irrelevant and only width matters — that is the whole content of the model. ## The CDF The cumulative distribution function accumulates that area from the left: ``` F(x) = 0 for x < a F(x) = (x - a)/(b - a) for a <= x <= b F(x) = 1 for x > b ``` So `F(x) = x/60` on the window: a straight line from 0 to 1. Interval probabilities are differences of the CDF, `P(50 < X <= 60) = F(60) - F(50) = 1 - 0.8333 = 0.1667`. A linear CDF is the visual signature of a uniform distribution, just as a flat density is. ## Mean, variance and their derivations By symmetry the mean sits at the midpoint: ``` E[X] = (a + b) / 2 = 30 minutes ``` For the variance, the second moment of a uniform is `E[X^2] = (a^2 + ab + b^2) / 3`, and subtracting the squared mean collapses to a clean form: ``` Var(X) = (b - a)^2 / 12 = 3600 / 12 = 300 SD(X) = sqrt(300) ≈ 17.3 minutes ``` The `/12` is worth memorising because it appears constantly: the spread of a uniform grows linearly with the width of its support, and its standard deviation is about 28.9% of that width. ## Two traps **A density is not a probability.** Densities have units of "probability per unit of x", so they can exceed 1. A uniform on `[0, 0.5]` has density 2 everywhere, which is perfectly legal — the area is still `0.5 * 2 = 1`. Only integrals of the density are probabilities, and those never exceed 1. **Single points have probability zero.** `P(X = 30) = 0` for any continuous variable, because a point has zero width and therefore zero area. This is why `P(X < 30)` and `P(X <= 30)` are equal for continuous distributions, unlike the discrete case where the endpoint carries real mass. It does not mean the outcome is impossible — it means probability lives in intervals. ## Where it shows up The uniform is the base case for reasoning about "arrives at random", "rounding error is somewhere in the last digit", or "a scheduled job starts somewhere inside its window". It is also the raw material for generating other distributions: a uniform draw on `[0, 1]` fed through the inverse of any CDF produces a draw from that distribution, which is why a uniform generator is the primitive underneath simulation. In an interview, the expected move is to recognise the flat density immediately, answer with a length ratio rather than an integral, and state mean and variance from memory.
- What is the variance of a uniform distribution on [0, 60], and where does the formula come from?It is `(b - a)^2 / 12 = 3600/12 = 300`, so the standard deviation is about 17.3 minutes. The derivation is `E[X^2] - (E[X])^2` with `E[X^2] = (a^2 + ab + b^2)/3` and `E[X] = (a + b)/2`; the algebra collapses to `(b - a)^2 / 12`. Spread therefore scales with the width of the support, not with where the support sits.
- Why can a probability density exceed 1 when a probability cannot?A density is probability per unit of x, not probability. A uniform on `[0, 0.5]` has density 2 everywhere, and the total area is still `0.5 * 2 = 1`. Only the area under the curve over an interval is a probability, and that is always between 0 and 1. Height without width carries no probability at all.
- For a uniform arrival in the 60-minute window, what is the probability of arriving exactly at minute 30?Zero. A single point has zero width, so it encloses zero area under the density. That is a general fact for continuous distributions and is why `P(X < 30)` equals `P(X <= 30)` here. Zero probability is not impossibility — it just means all the probability lives in intervals, not in points.
It is like throwing a dart blindfolded at a 60-centimetre ruler: no centimetre is favoured, so the chance of hitting any stretch is just that stretch's share of the ruler's length.
saying these in an interview costs you the question
- Reads the density value 1/60 as a probability
- Says a late interval is likelier because time has passed
- Claims P(X = 30) is small but nonzero
- Gives the variance as (b - a)^2 / 2
- Cannot state the mean without integrating