Probability of a Car Passing By

Question: The probability of a car passing a certain intersection in a 20 minute windows is 0.9. What is the probability of a car passing the intersection in a 5 minute window? (Assuming a constant probability throughout)

Answer: This is one of the basic probability question asked in a software interview. Let’s start by creating an equation. Let x be the probability of a car passing the intersection in a 5 minute window.

Probability of a car passing in a 20 minute window = 1 – (probability of no car passing in a 20 minute window)
Probability of a car passing in a 20 minute window = 1 – (1 – probability of a car passing in a 5 minute window)^4
0.9 = 1 – (1 – x)^4
(1 – x)^4 = 0.1
1 – x = 10^(-0.25)
x = 1 – 10^(-0.25) = 0.4377

That was simple eh. Ready for a challenge? Have a look at some of the other probability questions.

If you like this post, please Digg it or thumbs up on stumble upon. :)

Get a free subscription to Oracle magazine published by Oracle Corp.
 Powered by Max Banner Ads 

Related posts:

  1. 10 Google Interview Puzzles
  2. Pick a Random Byte
  3. The Ant Problem
  4. Boys and Girls
3 Comments

3 Responses

  1. Car Charity says:

    Blog looks really good mate, keep it up! The information is delivered solidly! :)

  2. Gijs says:

    Isn’t this only valid if ‘a car passing by’ is meant to mean ‘one or more cars passing by’ instead of ‘exactly one car passing by’?

  3. Doggie says:

    That is a valid point. I guess I should have phrased the question as “at least one car passing by”. :)

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>