+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 25

Thread: Sensitivity/Specificity

  1. #1
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Sensitivity/Specificity




    Here is my question:

    The sensitivity of a screening test is 0.95 and it's specificity is 0.85. The rate of the disease for which the test is used is 0.002. What is the positive predictive value of the test?

    I assume the word rate means prevalence? I took .95 minus .85/.95 to get an answer of .055

    Does anyone know if this is correct?

  2. #2
    Points: 5,259, Level: 46
    Level completed: 55%, Points required for next Level: 91
    SiBorg's Avatar
    Posts
    255
    Thanks
    71
    Thanked 25 Times in 22 Posts

    Re: Sensitivity/Specificity

    PPV = (sens x prior) / [(sens x prior) + (1 - spec) x (1 - prior)]

    sens = sensitivity; spec = specificity; prior = prior probability

    = 0.95 x 0.002 / [(0.95 x 0.002) + (1 - 0.85) x (1 - 0.002)]

    = 0.0019 / [0.0019 + (0.15 x 0.998)]

    = 0.0019 / [0.0019 + 0.1497]

    = 0.0019 / 0.1516

    = 0.0125

    = 1.25%

  3. #3
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Sensitivity/Specificity

    Note that PPV is just the probability you really do have the disease given that the test was positive. So once again this is a Bayes theorem question.

  4. #4
    Points: 5,259, Level: 46
    Level completed: 55%, Points required for next Level: 91
    SiBorg's Avatar
    Posts
    255
    Thanks
    71
    Thanked 25 Times in 22 Posts

    Re: Sensitivity/Specificity

    Quote Originally Posted by Dason View Post
    Note that PPV is just the probability you really do have the disease given that the test was positive. So once again this is a Bayes theorem question.
    Yes, this question can be more robustly answered using the reasoning in Dason's post to your other question about Bayes theorem. The PPV formula quoted is derived from Bayes theorem and to understand it you would need to use first principles as described in Dason's post.

  5. #5
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    Oh boy! Ok when I get home I better see if I can give this a shot! Thank you guys...

  6. #6
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    In your equation that you typed out here (which is Bayes) you put 1 - 0.85 for the complement of A yet you use .95 for A...Im confused on this part....

  7. #7
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Sensitivity/Specificity

    Not quite. .95 was the sensitivity (If we let D+ be "has the disease" and T+ be "tests positive for the disease") then what this says is P(T+|D+) = .95.

    .85 was the specificity which tells us that P(T-|D-) = .85. So P(T+|D-) = (1-.85).

  8. #8
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    Ok Dason...I am looking at the actual formula for Bayes. I see that I need to have a number for A, BlA, the complement of A and the complement of BlA....or as you have stated issuing "D" and "T". I was using .95 for A and 0.002 for BlA and then .05 for the complement of A and 0.998 for the complement of BlA but then I have nowhere to put the .85

    I am sorry...I know I am not grasping this at all!

    To make sure...Bayes is:

    P(A) x P(BlA) / P(A) x P(BlA) + P(complement A) x P(complement BlA)

  9. #9
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    Here is one of the ten ways I have tried this...

    .95 x .002 / (.95x.002) + (.15x.05) =
    .202

    But the second post said my answer should be .0125?

  10. #10
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    Lol ok! I get the correct answer of 0.0125 if I use:

    Sensitivity x prevalence/ (sensitivity x prevalence) + (1-specificity)(1-prevalence)

    Should I be using this because I can't get the correct answer using Bayes....

  11. #11
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Sensitivity/Specificity

    You implied that

    P(A|B) = P(A) x P(BlA) / (P(A) x P(BlA) + P(complement A) x P(complement BlA))

    But that's not what Bayes theorem says. Using your notation

    P(A|B) = P(A) x P(BlA) / (P(A) x P(BlA) + P(complement A) x P(B l complement A))

  12. #12
    Points: 934, Level: 16
    Level completed: 34%, Points required for next Level: 66

    Location
    Winnipeg, Manitoba
    Posts
    85
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Sensitivity/Specificity

    Ya, what I did Dason was Google the formula for positive predictive value and used that which I noticed is what was done in the 2nd post of this thread. Is that answer correct?

    I can't figure out where to put what numbers in the Bayes theorem because no matter where I put them I can't come up with 0.0125 and I'm assuming that's the answer I'm looking for...?

  13. #13
    Points: 5,259, Level: 46
    Level completed: 55%, Points required for next Level: 91
    SiBorg's Avatar
    Posts
    255
    Thanks
    71
    Thanked 25 Times in 22 Posts

    Re: Sensitivity/Specificity

    Sounds right to me. Ok - so let's try to put some actual numbers in here for you. Lets pretend that 100000 people took this test. Now we know that 10% are actually HIV positive.

    So that means that 10000 people are HIV positive. We also know the sensitivity is .999 which is the proportion of those 10000 people that are going to get a positive test back. So 10000*.999 = 9990 people have a positive test AND are HIV positive. Which means that 10 people have a negative test AND are HIV positive. Do you see why that last sentence is true?

    We can do something similar for those people that are HIV negative. There are 90000 HIV negative people out of the 100000 (do you see why this is?) and we have a specificity of .9999. Specificity is the proportion of those that are actually HIV negative that get a negative test. So .9999*90000 = 89991 people are HIV negative AND have a negative test. Can you work out how to get how many people are HIV negative and have a positive test?

    So from this we should be able to make a table

    [Dason's table here]

    Can you see how to answer the original question using this table?

    Just so you know I'm going to head to bed so I won't be answer any more questions until morning. Good luck!
    Right. I'm no Bayesian expert so using Dason's original posting let's try and work this through.

    PPV = number who test positive who are truly positive. Let's say 10000 people took the test. We know that rate of disease is 0.002 = 0.2%. Therefore 10000 x 0.002 = 20 have the disease. We know that the sensitivity is 0.95 which is proportion of those 20 that are going to get a positive test back. So 20 x 0.95 = 19 people have a positive test AND the disease. And 20 - 19 = 1 person has a negative test but has the disease.

    We can do the same for disease negative. There are 9980 disease negative people. Specificity is 0.85 (i.e proportion negative that get a negative result). So 9980 x 0.85 = 8,483 disease negative with a negative result. Negative and positive test are 9980 - 8483 = 1,497.

    So we can make a table..... (actually I can't make a table using this but here's my attempt) (I prettied it up for you. I hope you don't mind - Dason)

    \begin{tabular}{|l|rr|}\hline&Have disease &Don't have disease \\\hline +ve & 19 & 1497\\-ve & 1 &8483\\\hline\end{tabular}

    So.....

    total number who test positive = 19 + 1497 = 1516

    Proportion of those who test positive who have the disease (PPV) = 19 / 1516 = 0.0125 = 1.25% [QED]

    You can see now where the last lines of the second post come from 0.0019 / (0.0019 + 0.1497)

    I hope that this is clearer now...... it certainly is for me!

    Thanks to Dason (and kelly g for posting the question) as I have learned something today.
    Last edited by Dason; 01-29-2012 at 05:44 PM. Reason: Made the table nicer

  14. #14
    TS Contributor
    Points: 7,284, Level: 56
    Level completed: 67%, Points required for next Level: 66

    Location
    MD, USA
    Posts
    465
    Thanks
    8
    Thanked 11 Times in 11 Posts

    Re: Sensitivity/Specificity

    And what is upsetting is that a lot of doctors have no idea about this.

    With a surgery/no surgery question the 'game theory' opponent of the doctor is 'nature' and the patient's genetic (dis)advantages and lifestyle.
    I'd hope these MDs would at least use software to give them the odds and the best decision to make. They can always ignore what the software says but having this info is a dominant strategy.

  15. #15
    Devorador de queso
    Points: 95,889, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,937
    Thanks
    307
    Thanked 2,630 Times in 2,246 Posts

    Re: Sensitivity/Specificity


    I agree. But we probably don't want to throw away the doctor's opinion completely. We could merge all of the information together using a Bayesian analysis.

+ Reply to Thread
Page 1 of 2 1 2 LastLast

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats