Problem 1: Before the patient is given the test, the probability that they have the virus is 4%, P(virus)=4%=0.04. The accuracy of the test is test_accuracy=98%=0.98. We apply the formula from the medical test example:
Therefore, we have the following:
This means that there is a probability of about 67% that the patient has the virus, ...