11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 Sampling the ImaginaryLots of books on Bayesian statistics introduce posterior inference by using a medical testingscenario. To repeat the structure of common examples, suppose there is a blood test thatcorrectly detects vampirism 95% of the time. is implies Pr(positive|vampire) = 0.95. It’sa very accurate test. It does make mistakes, though, in the form of false-positives. 1% of thetime, it incorrectly diagnoses normal people as vampires, implying Pr(positive|mortal) =0.01. e final bit of information we are told is that vampires are rather rare, being only 0.1%of the population, implying Pr(vampire) = 0.001. Suppose now that someone tests positivefor vampirism. What’s the probability that he or she is a bloodsucking immortal?e correct approach is just to use Bayes’ theorem to invert the probability, to computePr(vampire|positive). e calculation can be presented as:Pr(vampire|positive) =Pr(positive|vampire) Pr(vampire),Pr(positive)where Pr(positive) is the average probability of a positive test result, that is Pr(positive) =Pr(positive|vampire) Pr(vampire) + Pr(positive|mortal) ( 1 − Pr(vampire) ) . Performing thecalculation in R:PrPV

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!