+ Reply to Thread
Page 1 of 4 1 2 3 4 LastLast
Results 1 to 15 of 49

Thread: Help with Bayesian question please

  1. #1
    Points: 71, Level: 1
    Level completed: 43%, Points required for next Level: 29

    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Help with Bayesian question please




    Just got a question with Bayes problem, I always struggle to understand the actual question in Bayes problems so that could be why I'm stuck, but would really appreciate your help

    It's about a diagnostic test,
    specificity of 0.90 and sensitivity of 0.98. population prevalence is 1/10 000

    Question is what is the prob. that a person who has got two consecutive positive results is ill?

    and another one is support you want the prob. of a person being ill after one positive test result to be 0.80, keeping sensitivity and prevalence constant. What is the minimal level of specificity to guarantee that outcome?

    Thanks guys!

  2. #2
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Help with Bayesian question please

    For the first I think you may just multiply the SEN times itself.

    I thik you need to write out the second question verbatim, I am missing something.
    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    jamessuh36 (07-23-2015)

  4. #3
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Help with Bayesian question please

    hi,
    there is a rather easy way to calculate the numbers: imagine you test one million people. You have in total 100 with the illness, out of those 98 will be recognized. You also have a 10% false alarms so in total 100 098 positive cases oit of which 98 are real so the probability is 98/100098 of being actually ill after a first test.

    Now imagine repeating the test with those who tested positive the first time - you have 100098 cases out of which 98 are real. Of thos 96 will be recognized by the test ( 98*0.98) and you will again have a 10% false alarms i.e. 10000. So your probability of being ill will be 96/10096.

    As for the second question: again taking the case of one million you will get 98 real cases plus x false alarms. In order to get a probability of 0.8 of being a real case after one test you need to solve 98/(98+x) =0.8 for x and you get x= 245. so out of 1 million tests you are allowed to have 245 false alarms .

    Regards

  5. The Following User Says Thank You to rogojel For This Useful Post:

    JesperHP (07-23-2015)

  6. #4
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Help with Bayesian question please

    rogojel, I like your style, but you are going to have to sell me on this one. I admit that I did not give it enough thought last night. What I meant to say was square PPV, so 90/19,998 - given your numbers. I will investigate this further, but I don't know that you need to assume a whole population took the test and adjust the pre-test probability for the second test. I say this just based on the presented wording. You would perhaps do that if a the test was applied to a whole, sample, but I may be wrong. Though if you adjusted the numbers based on 1 person, then I would imagine that there would not be a noticeable difference and you would get the same probability, thus square the PPV.
    Stop cowardice, ban guns!

  7. #5
    Devorador de queso
    Points: 95,705, 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,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Help with Bayesian question please

    Is this a homework question?
    I don't have emotions and sometimes that makes me very sad.

  8. #6
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Help with Bayesian question please

    No Dason, peoples lives are on the line. We have to solve this ASAP, but first I have to go to a baseball game.
    Stop cowardice, ban guns!

  9. #7
    Devorador de queso
    Points: 95,705, 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,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Help with Bayesian question please

    Well I just ask because they should find out from their professor if they are supposed to assume that the readings are iid with the same specificity and sensitivity. In real life I wouldn't assume that consecutive draws are independent.
    I don't have emotions and sometimes that makes me very sad.

  10. #8
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Help with Bayesian question please

    I get what you are saying, but jamesuh36 needs us, and I love the number 36 - who doesn't.


    I am assuming that the test are independent and the outcome of the first does not change the pretest probability of the second test. And the probability after the first test is 0.0045. So given this, I believe you would take 0.0045*0.0045.
    Stop cowardice, ban guns!

  11. #9
    Omega Contributor
    Points: 38,303, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,993
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Help with Bayesian question please

    I am ranting, but you could take


    pre-test odds * +LR = .0004 * 45 = 1.8% then multiply again by 45 to account for the second test and get: 81%


    That approach would take into account prior 0.0004 and new prior 1.8%, AKA the results of the first test.
    Stop cowardice, ban guns!

  12. #10
    Devorador de queso
    Points: 95,705, 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,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Help with Bayesian question please

    I don't get .0045 as the answer and I don't believe you are correct in saying that you would just square the PPV.

    What you would do is repeat the calculation but you would square the sensitivity and specificity and use those as the "new" sensitivity and specificity.
    I don't have emotions and sometimes that makes me very sad.

  13. #11
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Help with Bayesian question please

    hi hlsmith,
    this is a way to do the bayes calculations in an easy way. You do not actually assume sampling any number, you just have to imagine a large enough population that your probability numbers come out as integers e.g. for a prevalence of 10^-4 imagining 10^6 samples is just handy because you get exactly 100 true cases, and so on. To me this way of calculating seems quite easy to follow and it should give the same probabilities as a rigorous Bayes-based calculation.

    I have the method from the book Risk by Gerd Gigerenzer , he devised it as a way to enable doctors to use bayes calculation in practice.

  14. #12
    Devorador de queso
    Points: 95,705, 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,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Help with Bayesian question please

    I like the method of using integers and thinking of them as cases to make it more concrete. But with that said I think your math got mixed up somewhere along the line - I'm getting different answers.
    I don't have emotions and sometimes that makes me very sad.

  15. #13
    TS Contributor
    Points: 12,227, Level: 72
    Level completed: 45%, Points required for next Level: 223
    rogojel's Avatar
    Location
    I work in Europe, live in Hungary
    Posts
    1,470
    Thanks
    160
    Thanked 332 Times in 312 Posts

    Re: Help with Bayesian question please

    hi Dason,
    you are right, the numbers are slightly off.
    if I test 1 000 000 cases, there are 100 true illnesses and 999 900 healthy cases. Out of those 99 990 wil be falsely identified as ill. So the probability of being ill if tested positively is 98/(99990+98) ...and so on. I forgot to deduct the true illnesses from the tested population. I hope it works now.

    regards

  16. The Following User Says Thank You to rogojel For This Useful Post:

    jamessuh36 (07-23-2015)

  17. #14
    Devorador de queso
    Points: 95,705, 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,931
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    Re: Help with Bayesian question please

    That looks better to me.
    I don't have emotions and sometimes that makes me very sad.

  18. The Following User Says Thank You to Dason For This Useful Post:

    rogojel (07-23-2015)

  19. #15
    Points: 71, Level: 1
    Level completed: 43%, Points required for next Level: 29

    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Help with Bayesian question please


    Hey guys, thanks for your help.
    To answer some of the questions you guys had/talked about,

    - it is a homework problem lol
    - we do need to assume that it's independent
    - i dont think ppv comes into this question just yet, or am I wrong on that one? because we haven't had a class on PPV yet

    Cheers

+ Reply to Thread
Page 1 of 4 1 2 3 4 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