Let $T$ be the event that a test comes up positive. Let $C$ be the event that an individual has coronavirus.
The problem tells us that
- $P(C) = 0.1$
- $P(T|C) = .95$
- $P(T^C|C^C) = .95$
First, by the complement rule, $P(T|C^C) = 1 - P(T^C|C^C) = 1 - .95 = .05$. Also by the complement rule, $P(C^C) = 1-P(C) = 1 - 0.1 = 0.9$
To apply Bayes' Theorem, we first need the probability of a positive test. We notice that ${C, C^C}$ is a partition of the sample space. Writing the law of total probability,
$$P(T) = P(C)P(T|C) + P(C^C)P(T|C^C) = (0.1)(0.95) + (0.9)(0.05) = 0.14$$
Finally, we write down Bayes' Theorem:
$$P(C|T) = \frac{P(T|C)P(C)}{P(T)} = \frac{(0.95)(0.1)}{0.14} = 0.68$$.
Note: As is often the case in problems like this, the test appears very accurate, but observing a positive result doesn't lead to a very high posterior probability of having the disease.