Thread:TheHumanAmbassador/@comment-26907577-20200128211255/@comment-32182236-20200205154641

Okay, now let's move on to three possibilities.

Let's say that, for some reason, we wanted to know what color the traffic light was, when a certain car reached it.

There's three possibilities that we'll use:It was red, it was yellow, or it was green. (Sure, there's a fourth possibility, that it's broken and thus is black, but we'll ignore that for now. Maybe I'll add it back in if I need an example for four possibilities.)

In this case, we'd assign each possibility, say, a 33% chance.

But we already have a few things we know about lights. We already know that yellow is the least common color by far, and red tends to be more common than green.

So giving them all 33% prior probability wouldn't work.

I'm pretty sure, though, that if we started with 33%, and then altered the probabilities based on previous times the light was spotted, we'd eventually reach the actual values.

Now, as this is a hypothetical example, I'm not going to actually look into the statistics:Instead, I'll simply use the values of 50% for red, 40% for green, and 10% for yellow.

Now, Bayes' theorem only allows us to test one hypothesis at a time. So let's just say that.. we know the car decided to stop.

..Okay, perhaps your first iteration of the formula works better after all. It's more generalizable.

Because calculating P(E) wouldn't work as before.

Differing hypothesis each give different probabilities. For instance, red gives the highest probability of the driver stopping, followed by yellow, followed by green.

We'll test the hypothesis that it was green, in this case:I'll show you what I mean. I'll use my old formula for now-I want to show you where it breaks.

P=AB/AB+CD

Prior probability is .4. The probability of the driver stopping at green is quite low indeed (though it might rise if we later learn that they're using a phone.. Turns out when two pieces of evidence aren't independent, using Bayes' Theorem becomes a lot harder to do right. Perhaps the best thing to do is to calculate each value individually, for all pieces of evidence combined together.. And then use Bayes' Theorem once.) ...We'll just say it's .1, in this case.

So that's A and B figured out, and we can figure out C by remembering that A+C=1.

P=.04/.04+.6D

But in the case of D, that's where things break. The probability of the driver stopping would also depend on whether the light is red or yellow-More likely at red. (It's mainly based on when it turned yellow. But these details don't matter in our hypothetical...) We can't just give an estimate for D willy-nilly.

So we have to break that up, into two terms of its own.

The formula will end up looking like this in the three-hypothesis extension...

P=AB/AB+CD+EF

And A+C no longer equal 1. Instead, A+C+E=1.

We'll say there's a 90% chance of stopping on red, and a 50% chance of stopping on yellow.

P=.04/.04+.9(.5)+.5(.1)

P=.04/.04+.45+.5

P=.04/.99

P=0.04040404...

So about a 4.04% chance that the light was green.

But what about the other two possibilities? Is there a way to adjust the probabilities when there's three hypothesis?

I wouldn't just rule it out and say it's impossible. Instead, we'll look back at the simpler case of 2.

When there were two hypothesis, the idea was simple. Once we adjusted the tested hypothesis' probability, we altered the other one so that the two added up to 1. So we need to do something similar.

Now that the green hypothesis went down in probability, the other two should go up.

But how much, and by what? Sure, we know that P(red)+P(yellow) should equal 1-P(green), but that still gives a degree of freedom. How do we resolve this?

My first thought was simply increasing them both by the same scalar value.

As in.. we have to make sure that both old!P(red) and old!P(yellow) are multiplied by the same value. This would give one, unique solution, and it also works no matter how many hypotheses there are.

But I see a problem with that-The evidence supports a red light more than it did a yellow light, and doing that makes it look like the evidence supported both the same. (If the evidence actually DID support them both the same, though, this is a nice shortcut.)

So, I'm trying to find out how to resolve this problem. Would just testing the other two hypothesis the same way fix things? I'd say probably not, because that would lower the green hypothesis' probability even lower.

What about eliminating the green hypothesis altogether for the time being, multiplying both red and yellow by the same scalar factor to get the testing probability of red, and THEN testing for one of the two hypothesis on its own? After that, we would divide it by the same factor to keep the green hypothesis at the same value.

...I'm not sure if that works or not.