I disagree that I got the numbers mixed up. OP says sensitivity is .98 which is the true positive rate which is P(T+ | D+).
Also in your last post you saybut specificity is P(T- | D-)Specificity (P(T+|D-)
Silly, silly, silly me! I never checked your guys numbers. I made the mistake of trusting your arithmetic over mine. Probably because you usually seem correct and there were two of you. I was just getting ready to type out a huge reply with how I used the Simple Bayes Theorem based on odds. Then I went back to write out the results every way you could calculate them and was going to reference your calculations. That is when I saw you both had your numbers mixed up. I will show you below. If you are interested in my approach, Google search: Bayes Likelihood Ratio, you will get hundreds of thousands of hits. Also, below I once again included the calculation for repeated testing.
The formula is correct you just switched numbers around. It should be:
Original Information:
Prevalence or Pre-Test Probability or Prior: 0.0001
Given the increased sample size of 1,000,000
Sensitivity (P(T+|D+): 90/100 = 0.90
Specificity (P(T+|D-): 979902/999900 = .98
Positive Likelihood Ratio (+LR): SEN/(1-SPEC): 0.90/0.02 = 45
Simple Bayes Theorem based on Odds:
P(D+|T+) = Pre-Test Odds * +LR = Post-Test Odds
Post-Test Odds: (0.0001/(1+0.0001)) * 45 = 0.0045
Post-Test Probability: 0.0045 / (1-0.0045) = 0.0045
Formula For Serial Tests:
Post-Test Odds = Pre-test Odds * +LR1 * +LR2
+LR due to repeat test will always by 45 in this case, so:
0.0001 * 45 * 45
~ 0.167, after two positive tests.
_____________________________________________________________________
Lastly, a very very simple way to get at the Post-Test Probability after a test is just to report the Positive Predictive Value, which is just the first cell in the 2x2 classification table divided by the first row total.
Stop cowardice, ban guns!
I disagree that I got the numbers mixed up. OP says sensitivity is .98 which is the true positive rate which is P(T+ | D+).
Also in your last post you saybut specificity is P(T- | D-)Specificity (P(T+|D-)
I don't have emotions and sometimes that makes me very sad.
Well there is the issue, I was switching the two numbers around in my head. You typically present the SEN before the SPEC in results and I was erroneously switching them in my calculations. I will repost #46
Stop cowardice, ban guns!
Yup, writing that out definitely helped me figure out where my issue was. You two were totally right!
Original Information:
Prevalence or Pre-Test Probability or Prior: 0.0001
Given the increased sample size of 1,000,000
Sensitivity (P(T+|D+): 98/100 = 0.98
Specificity (P(T-|D-): 899910/899912 = .90
Positive Likelihood Ratio (+LR): SEN/(1-SPEC): 0.98/0.10 = 9.8
Simple Bayes Theorem based on Odds:
P(D+|T+) = Pre-Test Odds * +LR = Post-Test Odds
Post-Test Odds: (0.0001/(1+0.0001)) * 9.8 = 0.00098
Post-Test Probability: 0.00098 / (1-0.00098) = 0.00098
Formula For Serial Tests:
Post-Test Odds = Pre-test Odds * +LR1 * +LR2
+LR due to repeat test will always by 9.8 in this case, so:
0.0001 * 9.8 * 9.8
~ 0.0096, after two positive tests.
Stop cowardice, ban guns!
Tweet |