We are testing for a disease D that we think is present, D+, with probability 0.4, and absent, D-, with probability 0.6. We believe that a test has sensitivity P{T+|D+}=0.75 and specificity P{T-|D-}=0.8.

Siemensueqw

Siemensueqw

Answered question

2022-11-21

Bayes' Theorem in Conditional Probability
We are testing for a disease D that we think is present, D+, with probability 0.4, and absent, D-, with probability 0.6. We believe that a test has sensitivity P { T + | D + } = 0.75 and specificity P { T | D } = 0.8.
Q1: What is our probability that the disease is present if we perform the test and it is positive, T+, and our probability the disease is absent if that test is negative, T-?
My ans:
We can apply Bayes' formula to calculate P { D + | T + } and P { D | T }.
P { D + | T + } = 5 / 7
P { D | T } = 24 / 29
Q2: Suppose we perform three tests, conditionally independent given D. Given each possible number of positive test results, 0, 1, 2, or 3, what is our probability that the disease is present?
My ans:
Let k denote the number of positive test results.
We know that P{ [exactly] k successes in n trials | p } = ( n C k ) x ( p k ) × ( ( 1 p ) n k ), hence we can calculate P { k = 0 | D + }   a n d   P { k = 0 | D }.
We can then apply Bayes' formula to calculate P { D + | k = 0 }.
P { D + | k = 0 } = 0.692
Using the same approach for k = 1 : 3, we derive:
P { D + | k = 1 } = 0.5
P { D + | k = 2 } = 0.308
P { D + | k = 3 } = 0.165
Would really appreciate it if someone can verify whether my reasoning and answers are correct.

Answer & Explanation

Neil Short

Neil Short

Beginner2022-11-22Added 17 answers

Step 1
Consider any k of the n tests show +ve results. The probability of the tests showing k + v e results for any random person is
P ( k  +ve's ) = P ( D + ) ( n k ) p k ( 1 p ) n k + P ( D ) ( n k ) ( 1 q ) k q n k
where p represents the sensitivity and q represents the specificity of the test.
Now, the probability that the chosen person has the disease given that k of n tests showed up positive is
P ( D + |   k +ve's ) = P ( D + ) ( n k ) p k ( 1 p ) n k P ( D + ) ( n k ) p k ( 1 p ) n k + P ( D ) ( n k ) ( 1 q ) k q n k
Step 2
You can now enter n = 3 and k = 0 , 1 , 2 , 3 to get the required answers:
P ( D + |   k = 0 ) 0.02
P ( D + |   k = 1 ) 0.196
P ( D + |   k = 2 ) 0.746
P ( D + |   k = 3 ) 0.972
which also follow the expected trend.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in High school probability

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?