COVID repeated test

probability

A COVID test has an accuracy of 99% for sick person (meaning a sick person will get a COVID+ result with a chance of 99%) and an accuracy of 93% for non-sick person (meaning a non-sick person will get a COVID- result with a chance of 93%). Also suppose that 1 person in a million, is sick. If a person gets $n$ COVID+ results, what is the chance that they are sick?
Note that test results won't affect each other and so they are independent.


my try: I solved this for 1 test result using conditional probability and got this:
$$P(A|B)=\frac{P(A\cap B)}{P(B)} = \frac{99\%\times 10^{-6}}{99\%\times 10^{-6} + 7\%\times 999,999\times10^{-6}}$$
Then I tried to expand the results for two tests. I mean to find the chance of being sick if we know the first and second tests are positive.
I tried to use the 3 event extension of Bayes' theorem:
$$P(A|B,C) = \frac{P(B|A,C)P(A|C)}{P(B|C)}$$
assuming A is "being sick", B is first positive test and C is the second positive test. But couldn't find $P(B|A,C)$ and that is where I am stuck and cannot go further.
I would be thankful if you help me.

Best Answer

A COVID test has an accuracy of $\textbf v$ for sick person (meaning a sick person will get a COVID+ result with a chance of $\textbf v$) and an accuracy of $\textbf f$ for non-sick person (meaning a non-sick person will get a COVID- result with a chance of $\textbf f$). Also suppose that the disease prevalence is $\textbf p.$ Note that test results won't affect each other and so they are independent.

enter image description here

Legend. $$P(\text{actually sick} \mid \text{all $n$ results are positive})\\ =\frac{P(\text{actually sick and all $n$ results are positive})}{P(\text{all $n$ results are positive})}\\ =\frac{pv^n}{pv^n+(1-p)(1-f)^n}. $$ (The denominator corresponds to Branches 1 and 3 in the above diagram.)

P.S. That boldfaced assumption is not in general true: for example, the second of two successive COVID swab tests on the same subject is more probable than the first to register negative, due a lower concentration of antigens in the second reagent tube.