Saturday 27 November 2021

Corona tests vs symptoms

corona

Who is more likely to have covid? Someone who has a negative selftest,
but has cold-like symptoms, or someone with a positive test but who
has no symptoms?

Define the following:

C: patient has convid
T: patient tested positive
S: patient is symptomatic

We use the following data from the following sources

P(SCˉ)=1/200P(S|\bar C) = 1/200
from: https://www.cdc.gov/mmwr/volumes/70/wr/mm7029a1.htm and https://www.sciencedaily.com/releases/2012/06/120619225719.htm
combined to get symtpomatic common cold cases.
P(SC)=1/2P(S |C) = 1/2
from https://edition.cnn.com/2020/04/01/europe/iceland-testing-coronavirus-intl/index.html
P(C)=367639/11000000P(C) = 367 639/11 000 000
from https://www.worldometers.info/coronavirus/country/belgium/
P(TC)=0.97P(T|C) = 0.97
P(TˉCˉ)=0.85P(\bar T|\bar C) = 0.85
https://covid-19.sciensano.be/nl/procedures/snelle-antigeen-ag-testen-0
And lets assume that the accuracy of the test is independent of the fact of the patient has symptomes
The last to givens can be extrapolated to
P(TˉC)=0.03P(\bar T|C) = 0.03
P(TCˉ)=0.15P(T|\bar C) = 0.15
P(SˉCˉ)=0.995P(\bar S|\bar C) = 0.995
P(SˉC)=0.5P(\bar S |C) = 0.5
P(C)=0.0334P(C) = 0.0334
P(Cˉ)=0.9665P(\bar C) = 0.9665

Law of bayes says:
P(AB)=P(AB)P(B)P(A \land B) = P(A|B)P(B)

If A and B are independant under constant X that
P(XAB)=P(XAB)/P(AB)=P(ABX)P(X)/P(AB)=P(AX)P(BX)P(X)/P(AB)=P(AX)P(BX)/P(AB)P(X)=P(AX)P(BX)/(P(ABX)+P(ABXˉ))P(X)=P(AX)P(BX)/(P(ABX)P(X)+P(ABXˉ)P(Xˉ))P(Xˉ)=P(AX)P(BX)/(P(AX)P(BX)P(X)+P(AXˉ)P(BXˉ)P(Xˉ))P(X)=P(AX)P(BX)P(X)/(P(AX)P(BX)P(X)+P(AXˉ)P(BXˉ)P(Xˉ))=11+P(AXˉ)P(BXˉ)P(Xˉ)P(AX)P(BX)P(X)\begin{aligned}P(X|A \land B) &= P(X \land A \land B)/P(A \land B) \\ & = P(A \land B|X)P(X)/P(A \land B) \\ &= P(A|X)P(B|X)P(X)/P(A \land B) \\ &= P(A\land X)P(B \land X)/P(A \land B)P(X)\\ &= P(A\land X)P(B \land X)/(P(A \land B \land X) + P(A \land B \land \bar X))P(X) \\ &= P(A\land X)P(B \land X)/(P(A \land B|X)P(X) +P(A \land B|\bar X)P(\bar X))P(\bar X) \\ &= P(A\land X)P(B \land X)/(P(A|X)P(B|X)P(X) +P(A|\bar X)P(B|\bar X)P(\bar X))P(X) \\ &= P(A|X)P(B|X)P(X)/(P(A|X)P(B|X)P(X) +P(A|\bar X)P(B|\bar X)P(\bar X))\\ &= \frac{1}{1 + \frac{P(A|\bar X)P(B|\bar X)P(\bar X)}{P(A|X)P(B|X)P(X)}}\\ \end{aligned}

o(XAB)=P(AXˉ)P(BXˉ)P(Xˉ)P(AX)P(BX)P(X)o(X|A \land B) = \frac{P(A|\bar X)P(B|\bar X)P(\bar X)}{P(A|X)P(B|X)P(X)}

This gives

P(CSˉT)=11+P(SˉCˉ)P(TCˉ)P(Cˉ)P(SˉC)P(TC)P(C)\begin{aligned}P(C| \bar S \land T) &= \frac{1}{1 + \frac{P(\bar S|\bar C)P(T|\bar C)P(\bar C)}{P(\bar S|C)P(T|C)P(C)}}\\ \end{aligned}

Filling in the given numbers this has a chance of 10,09%

And
P(CSTˉ)=11+P(SCˉ)P(TˉCˉ)P(Cˉ)P(SC)P(TˉC)P(C)\begin{aligned}P(C|S \land \bar T) &= \frac{1}{1 + \frac{P(S|\bar C)P(\bar T|\bar C)P(\bar C)}{P(S|C)P(\bar T|C)P(C)}}\\ \end{aligned}

Filling in the given numbers this has a chance of 10,87%

So having symptoms while having a negative test gives you the same chance to have covid as not having symptoms and having a positive test.