This statistical problem was from the book "Fooled by Randomness" by N N Taleb. It was used to show how we are often fooled by the tests we do in medical practice when we do not take into account the pre-test probability of the disease in the person being tested. When we do an exercise stress test for example, the significance of ST segment or T wave changes during the test will depend on whether we are testing a man who has chest pain or a young woman who is asymptomatic.
In the given problem the disease has a prevalence of 1 in 1000. Therefore we can expect one true positive in a population of 1000 people. Because it has a 5 percent false positive rate, we can also expect an additional 50 people who do not have the disease to test positive (in the same population). Therefore, in a population of 1000 people, we can expect 1 true positive out of every 51 positives. Hence the chance that a person with a positive test has the disease is 1 out of 51 which is equal to 1.96 percent. Such a positive test therefore has a less than 2 percent chance of really reflecting the presence of disease. Will you treat such a person for the disease? Food for thought.
My congratulations to those who got the correct answer. According to the book, most of the doctors (in UK) who answered this problem got it wrong.