A calcuator for Bayes theorem. This calculator works off-line. (IE4)

Enter data into the boxes small white, small black, large white, large baleck. You are trying to precdict a small ball. You know the total proportions of small to large. You know the ratio (liklihood ratio) of small white to small black. You pick a white what are the chances that you have a small?
Distribution of balls in bag
small large
Sensitivity of small for white = Specificity of small for white = LR=sensitivity/(1 - specificity)
Liklihood ratio for a small given a white = Pretest odds for small = Prevalenc of small =
Calculated post test odds (if white)= (Pre-test odds x liklihood ratio)
Actual post test odds = (small white / large white)

In the context of this demonstration programme sensitivity is the accuracy with which a white predicts a small. Specificty is the accuracy with which all the small balls are identified using white. For disease and a "diagnostic test" change small for disease and white for diagnostic test.

Programme written by DJR Hutchon copyright Requires Internet Explorer 4.0 or above (or eqivalent) for calculator to work. This calculator is for educational use. It is believed accurate but no responsibility for accuracy of the results is accepted by the author. David J R Hutchon BSc, MB, ChB, FRCOG Consultant Obstetrician, Memorial Hospital, Darlington, England.