|Adventures in math: finding a red dot in a book, Marilyn vos Savant is wrong!
||[May. 5th, 2013|11:43 am]
Let's consider the following problem, which is based on reality and caused a 15 minute argument lately: You're given a book and told it has a 90% chance of having one red dot in it (and a 10% chance of having no red dot). If you read the first half of the book and don't find a red dot, what is the probability the red dot is in the second half of the book?
To join in our argument, your choices are 90% or something less than 90%.
My stance (which I think is correct!) was that the chances go down the more you read. There are two equivalent ways to think about this:
- Assuming the location of the red dot is distributed uniformly throughout the book, before you start reading the book the chances that the red dot is in the first half of the book are 45%, in the second half 45%, and not at all is 10%. Once you know it's not in the first half of the book you can eliminate that first 45% chance, so the chances it's in the second half are (.45)/(.45+.1) = .45/.55, or around 82%.
- You can formalize this by using Bayes' theorem. Let's set up our events:
A = red dot is in book
B = red dot is not in first half of book
So the probability we want is P(A|B). (meaning the probability that A is true given that B is true)
Some values we're going to need:
P(A) = .9
P(B|A) = .5 (this is where the assumption that the distribution of the red dot is uniform comes in)
P(B|not A) = 1 (if the red dot isn't in the book, it's not in the first half!)
P(B) = P(B|A)*P(A) + P(B|not A)*P(not A)
= .5*.9 + 1*.1
So, by Bayes' theorem, P(A|B) = (P(B|A) * P(A))/(P(B)) = .5*.9/.55=.45/.55, which is the same result as we got above. You can see that Bayes' theorem is really just formalizing the logic we were using in the first case!
You can generalize this - if the red dot isn't in the first x of the book (for x between 0 and 1), then P(B|A) = 1 - x, and we end up with
((1-x)*.9)/((1-x)*.9 + .1)
So for x = 0 this is .9, as we expect (since we haven't read anything) and for x = 1 this is 0 (since we know it's not in the book). And here's the Wolfram Alpha plot of the function!
I was reading Parade this morning, and Marilyn Vos Savant's column had a math problem, which made me say goody! Here's the column. Unfortunately her answer is wrong. The problem with counting the combinations this way is that we're overcounting some of them. In her example, 5 is the number that you know is in the combination, and in step 1 we count the numbers 5000-5999. But then in the next step we count 0500-9599, keeping the 5 constant, and this double counts the numbers from 5500-5599. Similarly the third and fourth steps overcount, and the combination 5555 is counted four times!
The correct way to do this problem in the general case is to use the Inclusion-exclusion principle, but an even easier way is to read "at least one 5" as "everything except no 5's". So there are 10^4 total combinations, and 9^4 of them have no 5's, so the number of combinations that have at least one 5 is 10^4-9^4=3439, significantly less than 4000.