# Hypothesis testing with Baysian methods: How many animals must I test to be sure that a disease isn't present?

I colleague has come to me with a question which I have answered for him but the only statistics I have done was what I did at school and a one semester course on Bayesian methods at university, so I wanted to post the question here and see if my answer is correct.

• I have a population of $10,000$ animals.
• I want to test for a disease for which I have a test which is $100$% effective.
• If the disease is present in the population then prevalence of the disease will be $20$%.

How many tests must I perform to be sure to $3\sigma$, and $5\sigma$ significance that the disease is not present?

I suggested applying Bayes theorem, I have typed up my attempted solution here

• The long Bayesian interlude seems unnecessary, one can go directly to if the disease is present, then the probability of $n$ negatives in a row is $(0.8)^n$. – André Nicolas Nov 15 '13 at 20:25
• That's kind of obvious now you say it, I should have realised that when I got to my result! Thankyou! – rgvcorley Nov 15 '13 at 20:36
• You are welcome. When one has a powerful tool such as Bayesian ideas, it is tempting to use it. – André Nicolas Nov 15 '13 at 20:55