## How many bugs are left? The Lincoln Index

You’re working on some software, and you have some QA folks testing it. How do you know how many bugs are left? You know the bugs that the testers find, but how can you estimate the number that aren’t yet found?

If your testers work independently, and if your feature is not under continuous development (i.e. you’re not adding bugs), (and maybe a couple of other ifs) you can use a thing called the Lincoln Index.

It’s quite simple.

Assume that there are N total bugs (found and as-yet-unfound).

Tester *a* finds A bugs. A = P_{a}N, where P_{a} is the probability of *a* finding a bug.

Similarly, tester *b* finds B bugs. B = P_{b}N, by the same reasoning.

There will be some bugs found by both testers, call that number C. It is evident that C = P_{a}P_{b}N. (The probability that both find a bug is the product of the individual probabilities.)

Now:

AB / C = P_{a}NP_{b}N / P_{a}P_{b}N = P_{a}P_{b}N^{2} / P_{a}P_{b}N = N^{2} / N = N

So a simple calculation gives us an estimate for N, the total number of bugs.