Showing posts with label probability. Show all posts
Showing posts with label probability. Show all posts

Thursday, August 7, 2014

The Monty Hall Problem

Suppose you're on a game show, and you're presented with three closed doors. Behind one of the doors is a car, and behind the other two are goats. You pick a door, let's say door 1. Before opening that door, the host, Monty Hall, opens a different door, let's say door 2, revealing a goat, and asks you if you want to switch which door you choose. Should you switch?

Counter-intuitively, the standard answer is yes. There is a 2/3 probability that the car is behind door 3, and only a 1/3 probability that the car is behind door 1. I'll prove it with math.

Bayes theorem says. In English, the probability of a hypothesis H given a piece of evidence E is equal to the probability of the evidence given the hypothesis times the prior probability of the hypothesis divided by the prior probability of the evidence

Let's define a few variables. We'll say C1, C2 and C3 stand for the car being behind door 1, 2 or 3, respectively. We'll also say O1, O2 and O3 stand for Monty opening door 1, 2 or 3, revealing a goat.

So, what we're interested in finding is P(C3|O2) or P(C1|O2). So, let's plug our variables into the equation.


Ok, so what are each of those terms? Well, P(O2|C3) = 1. Monty can't open the door you chose, and he's not going to open the door with the car. That only leaves one option. P(C3) = 1/3. With no information, we have to assume there's equal probability for the car to be behind each door.

By the law of total probability,, since Monty can choose either door 2 or door 3. P(O2|C2) = 0, since Monty won't open the door with the car behind it. Thus

Plugging those numbers back into the equation, we get. By the same logic,.

Here's another way to think about it. When you pick door 1, it either has the car behind it (probability 1/3) or it doesn't (probability 2/3). When Monty opens door 2, it doesn't change those probabilities. There's still a 1/3 probability your door has the car, and a 2/3 probability your door doesn't have the car. Since door 2 now has a probability 0 of having the car, that means door 3 must have the whole 2/3rds.

But what's really interesting to me about the Monty Hall problem is that it's not just dependent on what Monty does, it's also dependent on why he does it. Everything I've said is true for the standard problem, in which Monty always opens a door, and always reveals a goat. But if those things change, Monty can perform exactly the same actions, and get exactly the same results, but we'll still get different probabilities.

For example, suppose Monty only opens another door if you picked the door with the car. You pick door 1, and Monty opens door 2, revealing a goat. Should you switch? In that case, you definitely don't want to switch, because Monty wouldn't have opened a door at all if you had guessed incorrectly the first time. In this case, P(O2|C3) = 0, so P(C3|O2) = 0, and P(O2) = P(O2|C1)*P(C1), so P(C1|O2) = 1.

Alternatively, suppose Monty always opens a door, but opens one of the two you didn't pick at random. Again, you pick door 1, and Monty opens door 2, revealing a goat. It's possible Monty could have opened door 2 and revealed the car, but not this time. In this case, the probability that the car is behind door 1 and the probability that the car is behind door 3 are both 1/2. The reason is that he's twice as likely to open a goat door if you've chosen the car door than if you had not chosen the car door, so you do get information about the door you chose.

You can also find that using Bayes' theorem as before. P(O2|C2) = 0, since the goat can't be behind the door with the car. P(O2|C1) = P(O2|C3) = 1/2, since there's a 1/2 probability that Monty will open door 2, regardless of which door the car is behind.


But what if you don't know what strategy Monty is following? What if all you know is that there's a car behind one of the three doors, you picked door 1 and Monty opened door 2, revealing a goat. Maybe he's making a decision based on one of the three strategies I just described. Maybe he's using some other strategy. How do you calculate the probabilities then? What decision should you make?

I honestly have no idea.

Wednesday, January 4, 2012

Justified True Belief?

Epistemology is the branch of philosophy interested in the study of knowledge. One of the foundational questions of epistemology is "What does it mean to know something?". A common answer is that knowledge is justified true belief. In order to know something, you have to believe it, have a good reason for believing it and it has to actually be true.

That sounds pretty good, but there are problems with it. It's possible to construct scenarios in which all three conditions are apparently met, but it doesn't seem like anything was "known".

There's also the question of what counts as justification. But I think there's another, more fundamental, problem with this definition. One I don't think I've ever seen anyone else point out.

No definition of knowledge should include the condition of being true.

To do so is to make the term inapplicable in any situation remotely resembling real life. The reason for that is because of the answer to another fundamental question of epistemology: "Is it possible to be absolutely certain of something?". The answer to that is no. (Of course, others disagree, and I should probably write another post explaining why I think that.) All we can do is get more and more evidence for something, getting closer and closer to 100% certainty, but never actually reaching it.

In toy examples, whether a given fact is true or not is simply assumed/given. So if a hypothetical character has a justified belief, we can say whether that character knows it or not, because of our god-like omniscience. But in real life, no one has that omniscience.

Consider the same question - Is a belief knowledge or not - applied to yourself. Do I know the sun will rise tomorrow, or do I just believe it? Well, I certainly think it's true that the sun will come up. I wouldn't believe it if it I didn't think that, tautologically. But if that's the standard, then I ought to consider every belief I have to be knowledge. If I didn't believe they were true, I wouldn't believe them.

And if we apply that standard to other people, then our evaluations of whether someone else knows something or merely believes it, simply becomes a question of whether they agree with you or not.

I propose a simpler definition: Knowledge is belief that is held with a high degree of confidence.

This definition fits very well into a Bayesian framework. Degree of confidence is simply probability. If you believe something is true with a probability greater than, say, 99.9%, you can be said to know it. This also handily deals with the question of what counts as justification - that's just Bayesian evidence.

Thursday, March 17, 2011

There is Evidence for God

Something many atheists claim is that there is no evidence for god or religion. Not one single bit of evidence at all. But that's not true. It's frequently talked about as if it were an all or nothing kind of thing. As if all the evidence points one way or the other. But, it's possible for there to be evidence for something that's false.

There is evidence for god. It's weak evidence, and clearly overwhelmed by the evidence against, but it's still there. It's not nothing.

The biggest piece of evidence I can think of is that the vast majority of people believe in god. And this is not argumentum ad populum, but rather a probabilistic, Bayesian point of view. Which is more likely? The probability that so many people would believe in god given that god exists, or the probability that so many people would believe in god given that god doesn't exist? I think people are more likely to believe in something true rather than something false, especially if it interacts with them personally. Of course, people are willing to believe all sorts of crazy shit, so it's not much more likely. Which is why it's very weak evidence.

Wednesday, December 8, 2010

Chance vs. Luck

Chance exists. Luck does not.

What's the difference?

Chance is merely unpredictability. Things happening for little or no reason. Bad things happening to good people. Winning the lottery, or getting cancer.

Luck is chance that takes sides. Chance that can be swayed by a charm, or a ritual or that's just attracted to some people over others.

It's more complicated in that people can get lucky, but they can't be lucky. Getting lucky just means that, by chance, something fortunate happened to you. You pulled the lever and got the jackpot. But being lucky would mean that you would actually be more likely to get the jackpot than other people who are not lucky.