1.

A programmer has a 95% chance of finding a bug every time she compiles his code, and it takes her three hours to rewrite the code every time she discovers a bug. Find the probability that she will finish her program by the end of her workday. (Assume that a workday is 9 hours)(a) 76%(b) 44%(c) 37%(d) 28%I got this question in unit test.I'd like to ask this question from Geometric Probability topic in chapter Discrete Probability of Discrete Mathematics

Answer»

The correct ANSWER is (d) 28%

To explain I would say: In this INSTANCE, a success is a BUG-free compilation, and a failure is the discovery of a bug. The programmer needs to have 0, 1 or 2 failures, so her PROBABILITY of finishing the program is: P(X=0) + P(X=1) + P(X=2) = (0.95)^0(0.1) + (0.95)^1(0.1) + (0.95)^2(0.1) = 0.28% = 28%.



Discussion

No Comment Found

Related InterviewSolutions