p(test_positive|itchyballitis) = 0.95
p(test_positive|!itchyballitis) = 0.05
p(itchyballitis) = 0.01
p(test_positive) = p(test_positive|itchyballitis) * p(itchyballitis) + p(test_positive|!itchyballitis) * p(!itchiballitis)
= 0.95 * 0.01 + 0.05 * 0.99
= 0.059
p(itchyballitis|test_positive) = (p(test_positive|itchyballitis) * p(itchyballitis)) / p(test_positive)
= (0.95 * 0.01) / 0.059
= 0.161
Edit: If anyone else is thinking of writing math stuff in a comment, don’t do what I did. Read http://wiki.lesswrong.com/wiki/Comment_formatting first! Also, thanks Vladimir_Nesov.
It’s more intuitive to use odds. Prior odds are 1:99, likelihood ratio (strength of evidence) given by a positive test is 95:5, so posterior odds are (1:99)*(95:5)=19:99, or probability of 19⁄118 (about 16%).
Use backslash before stars \* to have them in the comment * without turning text into italics.
p(test_positive|itchyballitis) = 0.95
p(test_positive|!itchyballitis) = 0.05
p(itchyballitis) = 0.01
p(test_positive) = p(test_positive|itchyballitis) * p(itchyballitis) + p(test_positive|!itchyballitis) * p(!itchiballitis)
= 0.95 * 0.01 + 0.05 * 0.99
= 0.059
p(itchyballitis|test_positive) = (p(test_positive|itchyballitis) * p(itchyballitis)) / p(test_positive)
= (0.95 * 0.01) / 0.059
= 0.161
Edit: If anyone else is thinking of writing math stuff in a comment, don’t do what I did. Read http://wiki.lesswrong.com/wiki/Comment_formatting first! Also, thanks Vladimir_Nesov.
It’s more intuitive to use odds. Prior odds are 1:99, likelihood ratio (strength of evidence) given by a positive test is 95:5, so posterior odds are (1:99)*(95:5)=19:99, or probability of 19⁄118 (about 16%).
Use backslash before stars \* to have them in the comment * without turning text into italics.