Applying Bayes law

52 Views Asked by At

I'm completely lost on how to do this:


James tries to sell Adam on an analysis, LoopFinder, that announces if a program has an infinite loop. LoopFinder has a false positive rate of 5% (i.e. 5% chance LoopFinder announces there is an infinite loop given the program has none). Otherwise, LoopFinder is correct when a program does have an infinite loop. To prove LoopFinder is worth his investment, Adam randomly generates a set of 98 programs and manually verifies 16 of them have infinite loops. James then runs LoopFinder on those 98 programs.


On one program in the suite, LoopFinder announces there is an infinite loop. What is the probability that program actually has an infinite loop?

How could we approach this?

1

There are 1 best solutions below

0
On

Out of the 98 programs, 16 are actually infinite loops and the rest 82 are finite.

Hence, $P$(infinite)=$\frac{16}{98}$ and $P$(finite)=$\frac{82}{98}$

Let the event of LoopFinder declaring a program as having an infinite loop be called +ve.

So, $P$(+ve|infinite)=1 (always true) and $P$(+ve|finite)=5%=$\frac{1}{20}$.

We need to calculate, $P$(infinite|+ve).

You should be able to use Bayes Theorem and take it from here.