Z Virus

The world had been harmed by a widespread Z-virus, which already turned 10% of the world's population into zombies.

The scientists then invented a test kit with the sensitivity of 90% and specificity of 70%: 90% of the infected people will be tested positive while 70% of the non-infected will be tested negative.

If the test kit showed a positive result, what would be the probability that the tested subject was truly zombie?

If the solution is in a form of a b \frac{a}{b} , where a a and b b are coprime positive integers, submit your answer as a + b a+b .


The answer is 5.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Relevant wiki: Bayesian Theory in Science and Math

According to Bayes' Theorem , P ( A B ) = P ( B A ) P ( B ) P ( A ) . P(A \mid B) = \frac{P(B \mid A)} {P(B)} P(A). \ _\square for events A A & B B .

Let A A be the event of true zombie patient and B B be the event of positive test.

Then we already know that the sensitivity (positive if zombie) = P ( B A ) P(B \mid A) = 90%.

And P ( A ) P(A) = 10%.

All we need to know is P ( B ) P(B) to evaluate the desired P ( A B ) P(A \mid B) .

Since the positive results may involve true positive (called B + B+ ) or false positive (called B B- ), we can combine these independent probability as followed ( A -A is non-infected event.):

P ( B + ) = ( P ( B A ) ( P ( A ) P(B+) = (P(B \mid A) (P(A) ) = (90%)(10%) = 9%

P ( B ) = ( P ( B A ) ( P ( A ) P(B-) = (P(B \mid -A) (P(-A) ) = (100% - 70%)(90%) = 27%.

P ( B ) = P ( B + ) + P ( B ) P(B) = P(B+) + P(B-) = 36%.

Hence, P ( A B ) = 9 36 = 1 4 P(A \mid B) = \dfrac{9}{36} = \dfrac{1}{4}

Thus, a + b = 5 a+b = 5 .

Why didn't the question just ask us to state the percentage? Is there some sort of value to a+b?

Marc Gacy - 4 years, 2 months ago

Log in to reply

Totally agree

Yuekun Zhang - 3 years, 2 months ago

according to you ans should be: (90 x 10)/36 check out please.

Raj Miglani - 4 years, 5 months ago

Log in to reply

These numbers are percentages though, not pure numbers. % is there as well.

Worranat Pakornrat - 4 years, 4 months ago

That also may be a result of not using the units (%) in the formulas and being confused of what you got. My result was 0.25 and I thought to myself "Hmm, that's 25%", when in actuality is 0.25% 😔

Rudenco Yehoslav - 10 months, 2 weeks ago
Mark Feeney
Mar 21, 2018

let A A = person is a zombie

let B B = test result was true

We want P ( A B ) = P ( B A ) P ( B ) × P ( A ) P(A|B) = \frac{P(B|A)}{P(B)} \times P(A)

P ( B A ) = P(B|A) = "test result was true for an actual zombie" = 9 10 = = \frac{9}{10} = 90%, as given in the question.

P ( B ) P(B) = "got a true test result". The test returns true 90% of the time for actual zombies, and 30% (false positives) of the time for non-zombies. 1 10 \frac{1}{10} th of the population are zombies and 9 10 \frac{9}{10} ths are non-zombies, so: P ( B ) = ( 9 10 × 1 10 ) + ( 3 10 × 9 10 ) = 36 100 = 9 25 P(B) = (\frac{9}{10}\times\frac{1}{10}) + (\frac{3}{10}\times\frac{9}{10}) = \frac{36}{100} = \frac{9}{25}

P ( A ) = 1 10 P(A) = \frac{1}{10} as given in question.

So, P ( A B ) = 9 10 9 25 × 1 10 = 25 100 = 1 4 P(A|B) = \frac{\frac{9}{10}}{\frac{9}{25}}\times\frac{1}{10} = \frac{25}{100} = \frac{1}{4} .

1 + 4 = 5 1+4 = 5 .

Thank you for this! You explained in a less convoluted way.

Esha Kochhar - 3 years, 2 months ago

I figured it out but kept trying to submit 1 + 4 rather than 5. I guess I was taking a + b to literally.

Ian Leslie - 3 years, 1 month ago

good explanation.. thanks!

Ad C - 2 years, 1 month ago
Rachith P
Oct 6, 2017

The problem can be solved without actually applying Bayes' Theorem though one might argue that it's the same in the end. This is just an other perspective into the problem. The problem can be broken down into a simple probability equation, P(E) = A B \frac{A}{B} , where A is the number of required outcomes of the event E and B is the total number of possible outcomes of an event E.

In this case, A is the true number of zombies according to the test being positive. B is the total number of zombies according to the test being positive.

In the question it is given that test kit is 90% sensitivity meaning for every 100 actually infected people, the test will show only 90 peoples' result as positive. 70% specificity meaning, out of every 100 non infected people, 30 peoples' result will be shown as positive.

Let the total population of the world be 100, this would mean that 10 are actually infected.Thus, 90 are not infected.

So B would be (number of actually infected)(percentage of them being positive after the test) + (number of non-infected people )(percentage of them being positive after the test), B = 10x0.9 + 90x0.3 = 36 and A would be (number of actually infected)(percentage of them being positive after the test) = 10x0.9 = 9

So we have the answer as P(E) = A B \frac{A}{B} = 9 36 \frac{9}{36} =0.25

the second method tells us how the actual meaning is of P(B) is. BTW thanks for this !

Farhan ali - 3 years, 4 months ago

I don't think 0.25 is the right answer. Are you still there?

David Grybowski - 1 year, 2 months ago

Log in to reply

0.25 is equivalent to 1/4 so given a+b with regards to 1+4 the answer is 5 ( as required to be an integer)

Olorunyomi Madamori - 1 year, 1 month ago

Thanks for this, I initially calculated .36, but with your answer I see that .36 is the probability that anyone in the population gets a positive test result. The likelihood that an actual zombie got a positive test result would be the likelihood that a zombie gets a positive test, which is .09, divided by the likelihood of anyone in the population getting a positive test result. Thanks!

asdf qwer - 11 months, 1 week ago

I want to provide a visual explanation for this problem. In the diagram above we have a square with side length 1 1 . This square represents the whole population. The green \color{#20A900}\text{green} part of this diagram (light and dark green) represents the amount of people that are infected. The area of this region is 0.1 0.1 because 10% of people are infected. The blue \color{#3D99F6}\text{blue} part of this diagram (light and dark blue) represents the amount of people that are not infected. The area of this region is 0.9 0.9 because 90% of people are not infected.

Notice we have light and dark regions.

The light green region represents the amount of infected people we expect to test negative. The area of this region is 0.01 0.01 because from the 10% of people are infected we expect the test to fail 10% of the time.

The dark green region represents the amount of infected people we expect to test positive. The area of this region is 0.09 0.09 because from the 10% of people are not infected we expect the test have a success 90% of the time.

The light blue region represents the amount of not infected people we expect to test negative. The area of this region is 0.63 0.63 because from the 90% of people are not infected we expect the test to have a success 70% of the time.

The dark blue region represents the amount of not infected people we expect to test positive. The area of this region is 0.27 0.27 because from the 90% of people are not infected we expect the test to fail 30% of the time.

Here we are interested in the darker regions. These regions contains all people we expect to test positive. This whole region has an area of 0.36 0.36 . Inside this region we can find the people who are infected and the people who are not infected. The dark green region is the region where all infected people test positive.

It means that the probability of a person being infected given that the test was positive will be 0.09 0.036 = 1 4 \frac{0.09}{0.036}=\frac{1}{4} . The answer for the problem will be 1 + 4 = 5 1+4=\boxed{5} .

Think for a moment about what exactly the diagram tells. When we say "the probability of being infected given the test was positive" means we should shrink our sample in order to fit the conditions. The condition says that the test was positive. What we do is to look only for the people we expect to test positive. Inside this group we will find infected and not infected people. We just need to know the proportion and it is done!

Châu Nguyễn
May 11, 2020

Let Z = Event that person has the Z-virus. P(Z) = 0.1

Z' is the complement of Z.

P = Event that person is tested positive.

P' is the complement of P.

P (P|Z) = P (P ∩ Z) / P(Z) = P (P ∩ Z) / 0.1 = 0.9

P (P|Z') = P (P ∩ Z') / P(Z') = P (P ∩ Z') / 0.9 = 0.3

=> P(P) = 0.9 * 0.1 + 0.3 * 0.9 = 0.9 + 0.27 = 0.36

The probability that the tested subject was truly zombie given that they had a positive result:

P (Z|P) = P (P ∩ Z) / P(P) = (0.9 * 0.1) / 0.36 = 1 / 4

I found a tree diagram helpful in visualising this.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...