2015-01-15

Thinking about how many poisoned mushrooms are red.

Question: In a forest 20% of mushrooms are red, 50% brown and 30% white. A red mushroom is poisonous with a probability of 20%. A mushroom that is not red is poisonous with a probability of 5%. What is the probability that a poisonous mushroom in the forest is red? ¹

Answer: 50%.

Which is well and good, but I wanted to understand why, and my ability at math is somewhere between 0 and taking off my shoes to count. 

This type of problem depends on being able to figure out probability, and is done using Bayes' Theorem.²

Let:

RM = Red Mushrooms

BM = Brown Mushrooms

WM = White Mushrooms

PX = Poisoned!

P(RM|PX) = P(RM) * P(PX|RM) ➗ P(PX|RM) * P(RM) + P(PX|WM+BM) * P(WM+BM)

P(RM|PX) = .20 * .20 ➗ .20 * .20 + .05 * .80

P(RM|PX) = .04 ➗ .04 + .04 = 4/8 = .5 = 50%

Yuck. Math.  

So, for anyone else struggling to understand it, my thought process using words is:

If you have 20 red mushrooms (20%), 4 (20% of 20%) of them may be poisonous. 

If you have 80 mushrooms (50%+30%) that are a combination of white and brown, but no reds, 4 (5% of 80%) of them may also be poisonous.

In a given set of 100 (100%) of these mushrooms, where 20% are red and 80% aren't, 8 total will have a probability of being poisonous.

And 4 of those 8 are red... or half.  

Same thing as the equation but with words and sentences and stuff.  Now I'm certain to make it through the forest and find out where these bread crumbs lead... no doubt certainly somewhere delicious.

¹ http://dlab.sauder.ubc.ca/sjdm/journal/11/11808/jdm11808.html

² https://www.mathsisfun.com/data/bayes-theorem.html