“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
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)?
Both answers are wrong. The probability of NOT observing the car in 30 minutes is 1-0.95 = 0.05. Since a constant default probability is assumed, the probability of not seeing a car in 10 minutes is (1-0.95)^(1/3), and finally observing a car in 10 minutes we get 1-(1-0.95)^(1/3).
Just think about it, could the possibility of observing a car in 10 mins which is 98.33% according to garrincha’s calculation, be higher than that of observing a car in 30 mins?
when you calculated 98.33 you didn’t do it corectly … you pressed (1-0.95)^1 /3 and not (1-0.95) ^(1/3)
Think about it ?
I love that explanation JUST think about it - lol
Agree with garrincha. Assume the probability of survival in 10 min is p, then probability of suvival for 30 min is p^3 = (1-0.95)
So the probability of observing a car in 10 mins is
1-p= 1-(1-0.95)^(1/3)
Constant default probability means it’s always 0.95, regardless of how long you’re twiddling your thumbs on the sidewalk, counting cars.
.95/3
Both answers are wrong. The probability of NOT observing the car in 30 minutes is 1-0.95 = 0.05. Since a constant default probability is assumed, the probability of not seeing a car in 10 minutes is (1-0.95)^(1/3), and finally observing a car in 10 minutes we get 1-(1-0.95)^(1/3).
http://discuss.fogcreek.com/techinterview/default.asp?cmd=show&ixPost=713
none of the above answers is right.
Just think about it, could the possibility of observing a car in 10 mins which is 98.33% according to garrincha’s calculation, be higher than that of observing a car in 30 mins?
the correct answer is 1-(1-0.95)*3=1-0.15=0.85
when you calculated 98.33 you didn’t do it corectly … you pressed (1-0.95)^1 /3 and not (1-0.95) ^(1/3)
Think about it ?
I love that explanation JUST think about it - lol
0.95. The probabability won’t change because of the time
in 30 mins the probablity is 0.95
so 1 min it wud be 0.031
and for 10 min it wud be 10*0.031
Agree with garrincha. Assume the probability of survival in 10 min is p, then probability of suvival for 30 min is p^3 = (1-0.95)
So the probability of observing a car in 10 mins is
1-p= 1-(1-0.95)^(1/3)
There are two ways to solve it:
1)
If you divide the interval in 3 * 10 min intervals then
P(A) - Finding Car in 30 min = 0.95
P(B) - Finding Car in 10 min = X
P(B’) - Not Finding Car in 10 min = 1 - X
Given default probability, you can find a Car only in one of the 3 intervals. So:
P(B) = 0.95 = X * (1 - X) * (1 - X)
.. solving the above equation you can find the P(B)
2)
P(A) - same as above (30 min)
P(B) - same as above (10 min)
P(A|B) - Probability of finding a Car in 30 min given that you saw a car in first 10 min.
P(A|B) = P(A intersect B) / P(B) = 0.95 - given the constant default probability.
P (A intersect B) = 1/3 - only one of three possibilities
P(B) = 1 / (3 * 0.95) = 1 / 2.85 = 0.35 - Finding car in 10 min
Leave an Answer/Comment