Saturday, October 1, 2011

The Abstract Power of Mathematics

Yesterday, as I was walking home, I stepped upon an acorn just to hear the popping sound it makes. Stirred by a moment of pique, I picked it up to investigate what was inside. To my disgust, I saw a couple of maggot/grubby things, which made me feel bad about stepping on it, and all the other acorns upon which I have trod. This got me to wondering, how likely is it that a given acorn has a grub in it?

Since the first one I investigated had a grub in it, I got the impression that it would probably be a fairly likely thing. If only one in every hundred contained a grub, it would be terribly improbable that the first one I examined would just happen to have one. However, I wasn't interested enough to try to remember how conditional probability worked, so I just went home.

After I got home, I went to pay my rent. Walking out of the rental office I saw a maintenance van, which was apparently number 1 in their fleet. Since the van I saw was labelled one, I started wondering about the size of their fleet. If you see a van with a certain number, you can assume the fleet is at least that large, but it doesn't tell you how big it actually is. So, seeing a van with number one seems to indicate a small fleet, otherwise I would be much more likely to see a van with a large number. When I realized that this was, basically, the same problem that had occurred to me earlier, with the grubs in acorns, I decided that who was I to ignore coincidence, and decided to work out the conditional probabilities.

Most of the time people think about probability knowing, approximately, how likely outcomes are and they want to figure out what will happen. For example, if you roll a six sided die, you would be interested in knowing what number you roll. Conditional probability works in reverse, if you know you are in one of a few scenarios and you know what happens, you try to figure out what the likelihood is that you are in a specific scenario. For example, if someone rolls a six sided, eight sided, or twenty sided die and they tell you that they roll a 7, you know they didn't roll the six sided die. For more information on determining conditional probabilities see below*

For simplicity, I decided to assume one out of every so many acorns has grubs. This ignores a large number of cases, for example 2 out of every 3 have them, but we can round those to the nearest considered case. I made this assumption both because it simplifies the calculations, and because it makes the acorn problem: the first acorn I see has grubs when 1 out of n do, the same as the van problem: the van I see is number 1 out of a fleet of n total vans.

One would sort of expect lower numbers in the fleet or higher grub frequency to be the most likely scenario. But, it turns out, if you consider fleets of any number of vans to be possible, then even a fleet of one van, the most likely, turns out to be statistically impossible, or a 0 probability event, if you remember my first post on probability. This is because, although the van's number is 1 100% of the time, or 1/1, if the fleet size is one, the probability of the van's number being one over all possible scenarios turns into the infinite sum of 1/1+1/2+1/3+1/4... which diverges**

Anyway, I suppose the main point of this post is not conditional probability, or the odd things that happen when you let infinity enter things, but rather how wonderful it is that math can take two, ostensibly different problems, like vans in a fleet and grubs in an acorn, and unify them into one, underlying concept.

*Calca I: Conditional Probability

Suppose that you know something happened, say someone rolled a 7 on a die, but you don't know exactly what circumstances led to this occurring, they either rolled a die with 8 sides or a die with 10 sides. To figure out how likely a scenario is given a known outcome, one simply divides the likelihood of the known outcome in that given scenario by the sum of the likelihoods of that outcome in all possible scenario.

For example, the 7 will roll 1/8 of the time on an 8 sided die and 1/10 of the time on a 10 sided die, so the likelihood that an 8 sided die was rolled to obtain the 7 is: (1/8)/(1/8+1/10), or 5/9. This makes a certain amount of sense, the 8 sided die is more likely to produce a 7 than the 10 sided die, so if a 7 rolled, we should think the 8 sided scenario more likely than the 10 sided one.

**Calca 2: The Series 1/n

If we try to find the probability that a fleet only has one van, given that we saw the van numbered 1, out of scenarios allowing the fleet to have any number of vans, we run into a problem. The numerator should be the probability of the observed event in the specified scenario, namely seeing van number 1 in a fleet of one van, or 1/1. However, the denominator should be the sum of the probability of seeing van number one over all scenarios, which is (1/1+1/2+1/3+1/4+...).

To get a feel for how to handle this sum, let us ignore the first term, 1/1. The next term, 1/2, contributes 1/2 towards the total. The next two terms, 1/3 and 1/4, are each greater than or equal to 1/4, and so together will contribute something at least 1/2 in size. The next four terms, 1/5, 1/6, 1/7, and 1/8, are each at least 1/8, so together they will contribute something at least 1/2 in size. Continuing on this way, we notice that the next 2^n terms are always at least 1/(2^(n+1)), and so together contribute something of at least size 1/2. Thus we can think of the sum as being larger than an infinite number of 1/2's being added together. This implies that the sum cannot be a finite number, so the conditional probability of the 1 van fleet scenario is 1 divided by a limit which approaches infinity, so the probability goes to zero.


Max said...

I wanted to congratulate you on writing out a nice math post on conditional probability, which is a notoriously tricky concept, without writing out formulas. Your explanation of why the harmonic series diverges is exquisite.

Kenny said...

Thank you, sometimes I think that I enjoy talking about mathematical concepts much more than I actually enjoy talking about mathematics ;) I've always found that, unless I already know what the formula is representing, reading a formula is much less enlightening than hearing the concept described, so I try to take that into account when I write mathematics for non-mathematicians.

However, I cannot take credit for the harmonic series explanation. That idea I stole from one basic calculus textbook or another.