0

Looking for some guidance for using Baysian probability for consecutive independent tests.

Using the traditional example of disease testing efficacy (say the 1% of the population are infected and the test is 95% accurate), I would like to understand the approach should a person chose to get a second test.

  1. What is the probability of having the disease given both tests are positive?
  2. What is the probability of having the disease if they get a different test and that test is only 90% accurate?

My intuition says that the first test result is not part of the input (prior) to the second test but I can't get it right in my head. For the second test, should I partition the sample space based on the probability of being infected based on the first test? =:-/

Thanks

Bryon
  • 227

1 Answers1

1

My intuition says that the first test result is not part of the input (prior) to the second test but I can't get it right in my head. For the second test, should I partition the sample space based on the probability of being infected based on the first test? =:-/

The assumption should be that the two test results are conditionally independent when given the disease state of the same person. Otherwise, you cannot solve the problem. So if we let the two test results be Bernoulli variables $T_1,T_2$, and disease state be $D$, then: $$\mathsf P(T_1{\,=\,}s,T_2{\,=\,}t\mid D{\,=\,}d)~=~\mathsf P(T_1{\,=\,}s\mid D{\,=\,}d)\,\mathsf P(T_2{\,=\,}t\mid D{\,=\,}d)$$

The rest is just the usual applications of Bayes' Theory and substitution for provided values.

say the 1% of the population are infected and the test is 95% accurate)

That is $\mathsf P(D{\,=\,}1)=0.01$ and for each $k\in\{1,2\}$: $~\mathsf P(T_k{\,=\,}1\mid D{\,=\,}1)=0.95, \mathsf P(T_k{\,=\,}0\mid D{\,=\,}0)=0.95$.

What is the probability of having the disease given both tests are positive?

$\mathsf P(D{\,=\,}1\mid T_1{\,=\,}1,T_2{\,=\,}1)$

What is the probability of having the disease if they get a different test (results) and that test is only 90% accurate?

$\mathsf P(D{\,=\,}1\mid (T_1{\,=\,}1,T_2{\,=\,}0)\cup(T_1{\,=\,}0,T_2{\,=\,}1))$

Graham Kemp
  • 129,094
  • Thanks. I see it now. I forgot about the fact it is a repeated trial of an independent test with only two possible outcomes. So hard to remember how to connect all these probability concepts! :-) (Note: In your answer, the second case wasn't different test results, it was a completely different test provider that has a different test sensitivity. But I get your point.) – Bryon Sep 21 '21 at 00:26
  • Actually, for the second case, is a Bernoulli trial the correct approach? In the second case the probability of the two outcomes is different. Shouldn't there be a different approach? – Bryon Sep 24 '21 at 22:48
  • They are still conditionally independent Bernoulli variables, they are just not identically distributed. All you have to do is adjust for the different success rate. @Bryon – Graham Kemp Sep 25 '21 at 00:11
  • So P(TaTb|D) will be P(Ta|D) x P(Tb|D) in both cases? 0.95^2 and 0.95x0.9? – Bryon Sep 25 '21 at 04:20