1

A classic example often used for explaining Bayes theorem is through the use of the disease sensitivity example.

p(A = 1) = Have disease = 0.01
p(A = 0) = Not have disease = .99
p(T = 1 | A = 1) = Have disease given test positive = .95
p(T = 0 | A = 0) = Not have disease Given test is negative = 0.05

$$\frac{p(T = 1 | A = 1) * p(A = 1)}{p(T = 1 | A = 1) * p(A = 1) + p(T = 0 | A = 0) * p(A = 0)}$$

which goes out to be

$$\frac{.01 * .95}{.01 * .95 + .05 * .99} = \frac{.0095}{.0095 + .0495} = \frac{.0095}{.059} = 0.16$$

However one thing I am having trouble finding is an explanation of how the p(T = 1 | A = 1) is calculated. How does one determine the effectiveness of the test?

I was thinking of brute forcing the value by using a sample data and adjusting the p(T = 1 | A = 1) until I achieved obtained the maximum accuracy possible. But there has to be a more appropriate method.

Another method was to flip the calculation and instead calculate the probability of the accuracy of the test.

p(T = 1) = Test is correct = 0.5
p(T = 0) = Test is not correct = 0.5
p(A = 1 | T = 1) = Test is positive given person has disease = 1
p(A = 0 | T = 0) = Test is negative given person has no disease = 0

but I run into a logical road block here as diseases are 0 or 1 (have it or don't) which results in the following

$$\frac{p(A = 1 | T = 1) * p(T = 1)}{p(A = 1 | T = 1) * p(T = 1) + p(A = 0 | T = 0) * p(T = 0)} = \frac{0.5 * 1}{0.5 * 1 + 0.5 * 0} = 1 $$

  • Welcome to MSE. Regarding "However one thing I am having trouble finding is an explanation of how the p(A = 1 | T = 1) is calculated. How does one determine the effectiveness of the test?", my understanding is there's often some sort of basically infallible method to determine whether or not the person has a disease (e.g., some other test, often much more expensive & slower, but very accurate, such as actually seeing the disease on a slide sample). Thus, they can use this other method to determine the effectiveness of the test being checked. – John Omielan Jul 30 '19 at 02:06
  • 1
    The basic formula for conditional probability is $P(A,|,B)P(B)=P(A\cap B)$. However you have a lot of expressions of the form $P(A,|,B)P(A)$, which seems to make no sense. For this reason I am having a lot of trouble understanding your post. – David Jul 30 '19 at 02:09

0 Answers0