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(S∣Cˉ)=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(S∣C)=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(T∣C)=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(T∣Cˉ)=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(A∧B)=P(A∣B)P(B)P(A \land B) = P(A|B)P(B)

If A and B are independant under constant X that
P(X∣A∧B)=P(X∧A∧B)/P(A∧B)=P(A∧B∣X)P(X)/P(A∧B)=P(A∣X)P(B∣X)P(X)/P(A∧B)=P(A∧X)P(B∧X)/P(A∧B)P(X)=P(A∧X)P(B∧X)/(P(A∧B∧X)+P(A∧B∧Xˉ))P(X)=P(A∧X)P(B∧X)/(P(A∧B∣X)P(X)+P(A∧B∣Xˉ)P(Xˉ))P(Xˉ)=P(A∧X)P(B∧X)/(P(A∣X)P(B∣X)P(X)+P(A∣Xˉ)P(B∣Xˉ)P(Xˉ))P(X)=P(A∣X)P(B∣X)P(X)/(P(A∣X)P(B∣X)P(X)+P(A∣Xˉ)P(B∣Xˉ)P(Xˉ))=11+P(A∣Xˉ)P(B∣Xˉ)P(Xˉ)P(A∣X)P(B∣X)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(X∣A∧B)=P(A∣Xˉ)P(B∣Xˉ)P(Xˉ)P(A∣X)P(B∣X)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(C∣Sˉ∧T)=11+P(Sˉ∣Cˉ)P(T∣Cˉ)P(Cˉ)P(Sˉ∣C)P(T∣C)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(C∣S∧Tˉ)=11+P(S∣Cˉ)P(Tˉ∣Cˉ)P(Cˉ)P(S∣C)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.