64.2k views
5 votes
It is known that there only is 1% chance of getting a disease. a test is being devised to detect the disease. the probability that the test comes out positive if the patient has the disease is 0.98 and the probability that the test comes out negative if the patient does not have the disease is 0.95,

a.what is the probability that a random test comes out negative?
b.what is the probability that a patient really has the disease, if the test came out positive?

1 Answer

2 votes
Suppose
D is the event that a given patient has the disease, and
P is the event of a positive test result.

We're given that


\mathbb P(D)=0.01

\mathbb P(P\mid D)=0.98

\mathbb P(P^C\mid D^C)=0.95

where
A^C denotes the complement of an event
A.

a. We want to find
\mathbb P(P^C). By the law of total probability, we have


\mathbb P(P^C)=\mathbb P(P^C\cap D)+\mathbb P(P^C\cap D^C)

That is, in order for
P^C to occur, it must be the case that either
D also occurs, or
D^C does. Then from the definition of conditional probability we expand this as


\mathbb P(P^C)=\mathbb P(D)\mathbb P(P^C\mid D)+\mathbb P(D^C)\mathbb P(P^C\mid D^C)

so we get


\mathbb P(P^C)=0.01\cdot0.02+0.99\cdot0.95=0.9407

b. We want to find
\mathbb P(D\mid P). Now, we can use Bayes' rule, but if you're like me and you find the formula a bit harder to remember, we can easily derive it.

By the definition of conditional probability,


\mathbb P(D\mid P)=(\mathbb P(D\cap P))/(\mathbb P(P))

We have the probabilities of
P/
P^C occurring given that
D/
D^C occurs, but not vice versa. However, we can expand the probability in the numerator to get a probability in terms of
P being conditioned on
D:


\mathbb P(D\cap P)=\mathbb P(D)\mathbb P(P\mid D)

Meanwhile, the law of total probability lets us rewrite the denominator as


\mathbb P(P)=\mathbb P(P\cap D)+\mathbb P(P\cap D^C)

or in terms of conditional probabilities,


\mathbb P(P)=\mathbb P(D)\mathbb P(P\mid D)+\mathbb P(D^C)\mathbb P(P\mid D^C)

so that


\mathbb P(D\mid P)=(\mathbb P(D)\mathbb P(P\mid D))/(\mathbb P(D)\mathbb P(P\mid D)+\mathbb P(D^C)\mathbb P(P\mid D^C))

which is exactly what Bayes' rule states. So we get


\mathbb P(D\mid P)=(0.01\cdot0.98)/(0.01\cdot0.98+0.99\cdot0.05)\approx0.1653
User EthanB
by
6.0k points