Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read this Google Interview Question.

Q:If the probability of observing a car in 30 minutes on a highway is 0.95, what is the probability of observing a car in 10 minutes (assuming constant default probability)?

A:The trick here is that .95 is the probability for 1 or more cars, not the probability of seeing just one car. The prob. of NO cars in 30 minutes is 0.05, so the prob of no cars in 10 minutes is the cube root of that, so the prob of seeing a car in 10 minutes is one minus that, or ~63%

My question is, if The probability of NO cars in 30 minutes is 0.05, why the probability of no cars in 10 minutes is the cube root of that ??

Which algorithm used in this question?

share|cite|improve this question
Do you know the distribution from which you got the probability? I don't see how you could answer the question otherwise. – gary Jul 18 '11 at 8:29
up vote 5 down vote accepted

The unstated (or, rather, very vaguely stated) assumption in the problem is that the probabilities of observing a car during any given non-overlapping time intervals of equal length are equal and independent.

(Of course, this assumption can't really be true in practice, even if "observing a car" is taken to be a point event — for example, if the road has $n$ lanes and you observe a different car within each of $n$ consecutive 1 millisecond intervals, you're not going to observe another one within the next millisecond — but it can be a fairly good approximation if the intervals are of moderate length and the road not very busy.)

This assumption (almost; see comments) implies that the arrival of cars is (assumed to be) a Poisson process. More specifically, it implies that the probability of no cars arriving within any given 10 minute interval is the same. Since we know that the probability of no cars arriving within a 30 minute interval equals the product of the probabilities of no cars arriving in each of the three consecutive 10 minute intervals within it, the answer follows.

To be specific, let $A$, $B$ and $C$ denote the events "no cars are observed within the first / second / third 10 minutes" respectively. Then we have

$$ \mathrm{Pr}[A \text{ and } B \text{ and } C] = \mathrm{Pr}[A] \cdot \mathrm{Pr}[B \text{ if } A] \cdot \mathrm{Pr}[C \text{ if } A \text{ and } B].$$

Since the events $A$, $B$ and $C$ are independent by assumption, we get

$$ \mathrm{Pr}[A \text{ and } B \text{ and } C] = \mathrm{Pr}[A] \cdot \mathrm{Pr}[B] \cdot \mathrm{Pr}[C],$$

and, since by assumption $\mathrm{Pr}[A] = \mathrm{Pr}[B] = \mathrm{Pr}[C]$,

$$ \mathrm{Pr}[A \text{ and } B \text{ and } C] = \mathrm{Pr}[A]^3.$$

We know that $\mathrm{Pr}[A \text{ and } B \text{ and } C] = 0.05$, and we want to solve for $\mathrm{Pr}[A]$ (which, by assumption, equals the a priori probability of observing no cars within any given 10 minute interval), so we take the cube root of both sides and get

$$ \mathrm{Pr}[A] = \sqrt[3]{\mathrm{Pr}[A \text{ and } B \text{ and } C]} = \sqrt[3]{0.05} \approx 0.3684.$$

Subtract that from one to get $\mathrm{Pr}[\text{not } A] \approx 0.6316$.

share|cite|improve this answer
After posting this, I happened to come across a remark elsewhere saying that the assumption I gave may not actually be strong enough to imply that the process is Poisson; apparently there are "quasi-Poisson" processes which have independent Poisson distributed event counts over disjoint intervals, with mean proportional to the interval length, but which are not actually Poisson processes. In any case, this shouldn't affect the rest of the answer, for which the weaker assumption is sufficient. – Ilmari Karonen Jul 18 '11 at 14:13
Just to be sure, I edited the assumption to make sure it actually implies exactly the conditions I need (independence and equality). – Ilmari Karonen Jul 18 '11 at 14:25

The question seems rather ambiguous, but let's assume cars arrive as a Poisson process rate $\lambda$. If this is the case, the distribution of the time (from now) to the first arrival of the car is exponential with parameter $\lambda$. Therefore probability of no cars arriving is $P(T>t) = exp(-\lambda t)$. Thus

$P(T>10min) = \exp(-\lambda \times 10) = \exp(-\lambda*30/3) = \exp(-\lambda*30))^{\frac{1}{3}} = \sqrt[3]{P(T>30min)}$

Alternatively you could approximate by a binomial model. Suppose in 10 minutes the chance of no car arriving is $p$. Then in thirty minutes (assuming each period is independent) the probability of no cars passing is $p^3$. Whence, $p=\sqrt[3]{0.05}$.

share|cite|improve this answer

Let's say that the probability of no cars in 30 minutes can be decomposed as (you assume constant probability)

P10 = probability of no cars in 10 minutes

P30 = P10 * P10 * P10 = P10^3 = 0.05

Thus P10 = cuberoot(0.05)

share|cite|improve this answer
Note that this was possible only because of the constant assumption over probability. – Mauro Jul 18 '11 at 8:36
I already asking why P30 =P10^3 .. – Soner Gönül Jul 18 '11 at 8:46
@Soner, because probability of (A and B) equals (probability of A) times (probability of B), provided A and B are independent events - and the hidden-but-plausible assumption is that what happens in any one 10-minute interval is independent of what happens in any other (non-overlapping) 10-minute interval. – Gerry Myerson Jul 18 '11 at 12:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.