Friday, February 20, 2009

Let's Make a Deal or No Deal

Dear Dr. Math,
On the show Deal or No Deal, if the contestant gets to the point of only having two cases left they have the option to switch cases. Should they switch or not? Is this the same as the Monty Hall problem?
Daniel G.


As Scott Bakula would say, Oh boy. I guess there was no way I was going to get away with writing a math advice blog and not having to explain the Monty Hall Problem at some point. For those of you out there who may be unfamiliar with the MHP, here's the way it goes:

You are presented with three doors and told that behind one door is a car and behind the other two are goats. (Here we're assuming you want the car and not the goats, but in these tough economic times maybe they should be reversed.) You pick a door and then the host, the venerable Monty Hall, always opens one of the other two doors to reveal a goat. He then offers you the chance to switch to the remaining third door. It turns out that it's always in your best interests to switch, given the available information. Doing so improves your chance of winning from to .

Now, I see some of you reaching for that email button, getting ready to fire off an angry letter about how it just can't be true that switching is better than not switching. After all, there are two remaining doors and you don't know which has the car, so aren't your odds 50-50? It's impossible! Believe me, I sympathize, but hold it right there. Plenty of people, even professional mathematicians, have said the same thing as you. Whole books and websites have been devoted to this topic, people have written simulators that you can try out for yourself, the advice columnist Marilyn vos Savant essentially made her career by being right about this problem and explaining why. The MHP is math's version of an optical illusion--you can stare at it and stare at it, but until you actually get the ruler out and measure, you won't be convinced. The sad truth is: Ellen Tigh's a cylon, Darth Vader built C3PO, and switching doors in the Monty Hall Problem improves your chance of winning from to .

Instead of opening up all the old wounds the MHP has inflicted over the years, let me try to offer my own perspective on how I think about the problem (inflicting all-new wounds!), and then maybe we can take those same ideas and apply them to the Deal or No Deal question to show why it's different.

Let's back the train up all the way to the station and talk a little about what probability is--what it means. Warning: Heavy Philosophy-Type Stuff Ahead. As I've mentioned previously, my opinion is that probability is a way to quantify the uncertainty we have about the state of the world. Therefore, it's highly dependent on what information we feel that we possess about the things we observe and what consequences the information may have. For example, everyone's favorite "random" activity is flipping a coin--assuming it's a "fair coin", the probability is that it will come up heads and that it will come up tails. But what does that really mean? Physically, we can model all the variables that go into the action of flipping a coin--weight distribution of the coin, air resistance, amount and location of force applied to the coin, the direction the coin is tossed, elasticity of the landing surface, etc. If somehow we could measure all of these things between the time the coin was tossed and the time it landed, and if we had access to a powerful enough computing device, we could predict whether the coin would come up heads. At the very least, we could guess ("calling it in the air") and improve our chances to more than . Going back a step, the only parts of this system unknown to us ahead of time are the variables due to the tossing itself--the human element of thumb against coin. If, for example, we knew that the person tossing the coin were an amazingly skilled athlete who could control his hand and arm motions with extreme precision and who had practiced the technique of tossing a coin enough that he could reliably make it come up heads, we again could improve upon our 50-50 guess. As a third possibility, consider the case where the coin has already been flipped but we haven't seen the outcome yet (the referee's still holding it); if somebody could sneak a peek at part of the coin and tell us what they saw, we could update our information and make a better guess.

So, what is the "real" probability? In my view, and this might be hard to swallow at first, the answer is there isn't one--the question itself is flawed. "Wait a minute," I can hear you objecting, "Can't we just perform experiments and measure the frequency of heads? Flip a coin a hundred times and about 50 of those will be heads, etc.?" The problem there is that you're observing a different event each time. You can never step in the river twice, nor flip the same coin. All the repetition does is validate the predictive power of your mental model that says that the factors that go into flipping coins are beyond your comprehension and result in the heads side and the tails side being equally likely. As an alternative, say, you could have the mental model (shared by many people) that those hundred coin flips were predestined to occur the way they did and that through meditation/prayer/drugs/etc. you can actually see into the future and predict the outcome of the next flip. It happens that the first model tends to be more successful than the second (or any others) in this instance, but we should be careful to separate the things we're assuming from the things we observe. As E.T. Jaynes wrote in Probability Theory: The Logic of Science, trying to verify the probability of an event by performing experiments "would be like trying to verify a boy's love for his dog by performing experiments on the dog."

See, part of the problem with the way we humans interpret the world is that the physical laws we rely on--for example, that two colliding objects obey the law of conservation of momentum--can quickly outpace our abilities to calculate their consequences--say, the motions of every molecule of a balloon-full of air. We use probability as a way of approximating the behavior of these complex systems instead of having to understand them completely, but that doesn't mean that the events "are" random. A more powerful being might see things differently, the way adults see tic-tac-toe differently from the way little kids do. But we seem to be stuck with this uncertainty about complex systems. And there's really no system on Earth more complex than a human, which brings us back to the MHP.

In the setup to the Monty Hall Problem, we've assumed some things, all of which pertain to the actions of other people. First, there is the assumption that the car is equally likely to be behind any of the three doors (actually, assumption zero is that there even is a car at all). Presumably, some producer or somebody chose which door to put it behind--it's possible they might have had a preference for door #1, for example, because it's closer to the loading dock or looks better on TV. If we had records of thousands of shows, we might gain some insight into their decision process and detect some bias. But we're assuming otherwise. Secondly, and this is the real key, we have the assumption that Monty Hall knows which door has the car behind it. As a consequence, we can deduce that by opening up the remaining door (or one of the two remaining doors, if we initially chose the one with the car), he has added information to the set of things we know about the game. Namely, we know that if the car had been behind one of the other two doors, he would have been forced to open the door he did--that's essentially why switching gives us a chance of winning. If the other door had opened by chance, say a gust of wind blew it open and we happened to see the goat, then we'd have no reason to conclude anything about whether we should switch, because we just as easily could have seen the car. So, by knowing what Monty knows, we can improve our chances. In coin terms, it's as though we had a prearranged deal with the referee where if the coin is tails, he just tells us half the time and stays quiet the other half, and if the coin is heads he always stays quiet--so if he doesn't speak, we know there's a chance the coin is heads.

Now, on Deal or No Deal, hosted by the incomparable Howie Mandel, the situation is somewhat different. For those who haven't seen the show, it works like this: a contestant picks one of 26 briefcases, each containing a different dollar amount. He/she then opens some or all of the remaining briefcases and decides whether to keep going or sell the initial case. In the extreme situation in which he/she keeps going all the way to the end and there are only two cases left, the contestant has the option to keep the original case or switch. Let's you and I pretend that we were on the show. For simplicity, let's assume that initially 25 of the 26 cases had $0, and the one remaining case had $1 million. Also, let's assume that we opened 24 cases and inside each one was a big fat $0 (we got to say "NO DEAL!" a bunch of times, which was fun; also, they brought out Ellen Degeneres at some point). What does that mean about our prospects? Should we switch? Well, our assumptions, again, were (1) all cases were equally likely to contain the million dollars, and (2) nobody on the show knew which case was which. Under those assumptions, it doesn't matter if we switch or not, since the probability is of each case having the million. It's just like the Monty Hall Problem if Monty didn't know which door had the car behind it--nobody has given us any additional information with which to prefer one case over the other. If, however, we knew that Howie knew which case had the winner, and he had started the show by opening all the other cases, then we should absolutely switch in a heartbeat, because it would improve our chance of winning from to . It's all about what information Howie gives us. Also, if he could give us Anya's phone number while he's at it, that would help us out, too.

-DrM

Wednesday, February 18, 2009

Trig or Treat

Dear Dr. Math,
This is a question I thought of while pondering the air intake of a wood stove. The air intake is a series of holes, covered or uncovered by a sliding metal plate with equal sized holes.
Imagine 2 circles with equal radius, R. Slide one circle over the other. Express, in terms of R, how far one circle has to occlude the other such that half of the area is covered.

Bob H., Ashland, OR

Dear Bob,

Here's a picture of the problem, if I understand it correctly:




For legal reasons, before we get to the solution, I feel I should warn all you readers out there: what follows may involve some high-school level trigonometry, which I understand many of you have intentionally purged from your brains to make room for Grey's Anatomy plots. Part of the reason I like this question so much is that it shows that these concepts may very well have some relevance (outside of the very important pursuit of measuring the heights of buildings using a sextant) despite your high school math teacher's best attempts to convince you otherwise. Those readers who are subject to trigonometry-induced seizures should turn back now.

OK, with that out of the way, let's blow up part of the picture and label some of the relevant objects. The goal is to get a handle on this shady part of town:



First, there's the radius, R, which we've assumed is the same for the two circles. Let's call the angle formed by the center and two points of intersection . Note: this has nothing to do with thetans (or does it?). Splitting this angle down the middle forms two right triangles with an angle of . According to the rules of trigonometry, the height of each triangle is and the width is , as I've labeled here:

Now, the strategy I'd like to employ to compute the area of that funny little almond-shaped region, which I'll call C, is to think of it as consisting of two pieces, each of which is the difference between a pie-slice of the circle, A, and a triangle, B. In pictures:



The reason this helps is that circles and triangles are shapes whose areas we know how to compute. "Funny little almond shapes," not so much.

The area of the circular slice is in proportion to the whole area of the circle as the angle is to the whole angle of a circle, 360° (a quarter of a circle takes up 90°, for example). So in terms of R and , that's and so .
Now, the area of the whole triangle is , which in this case is . So, . By a sneaky trick I learned in trigonometry class, I can rewrite this as .

If we throw all these things into the hopper, we get that the area of the almond-shaped piece, C, is , and so . I can feel some of you starting to panic out there, but just take a deep breath and try to relax. Put on some Enya or something--maybe that song she wrote about trigonometry.

What were we doing? Oh yeah, right; now we have a formula for computing the area of the overlapping part of the two circles, which only depends on the angle . The question was, When is this area equal to half the area of the circle?, so we need to solve for . Half the area of the circle is ; therefore, the equation we need to solve is:



which, after we divide through by and clean up a bit leaves us with:

.

It's interesting to pause here and note that R completely vanished from the equation. This means whatever configuration we come up with as an answer must have the same angle, independent of the radius.

OK. So, how do we solve this equation?

Actually... we don't.

The problem is that we have a and a , and the thing about those two is that they're like Sydney and Cristina on Grey's Anatomy; they just don't mix well. Unfortunately, there's no way to get any further with this equation using the rules of algebra. So, here's where we cheat and approximate the solution with a calculator (in my case, a TI-89). Maybe someday I'll tell you all about what goes on inside a calculator when it does these approximations, or about how we could use calculus to solve the problem if the shape were something else. But anyway, for now, the answer is .

Lastly, we should translate this answer into a more meaningful form, for example by figuring out what the distance is between the two centers of the circles. Using trigonometry one last time, we can write this distance as , which for the magic above is . The final picture, then, is:






Put that in your wood stove and smoke it.

-DrM

Tuesday, February 17, 2009

How Big is That Number? Episode 1

This will be the first installment of a new feature I call "How Big is That Number?" in which I try to explain exactly how big that number is.

Dear Dr. Math,
How much space would a googol grains of sand take up?
xoxo,
Frequent Googol Searcher

Dear FreGooSear,

Let me begin by thanking you for reminding us all of the correct spelling of "googol". A lot of people forget that before it inspired the name of an obscure website, the word "googol", as coined by a man named Milton Sirotta back in 1938, referred to the number . I don't know the whole story here, but I'm guessing that as an infant, he somehow wrote a 1 followed by 100 zeroes (I'm guessing in blue crayon), and when asked by his parents what that was, all he could make were baby sounds. Hence the name. Any other explanation seems highly improbable.

So, how big is this number with the silly name? Well, first off, if we wanted to address it in the nomenclature of billions and trillions, it would be known as ten thousand trillion trillion trillion trillion trillion trillion trillion trillion. That's a ten-thousand followed by 8 trillions. Or, if you prefer to think of it in terms of current financial events, $1 googol would be about 12,706 trillion trillion trillion trillion trillion trillion trillion economic stimulus packages.

Now, to answer your question about grains of sand: let's approximate a grain of sand as a cube 1 millimeter across. That would mean that 1000 grains of sand in a row would be 1 meter long. So, one cubic meter would contain 1000*1000*1000, or , grains. A googol grains, therefore, would take up cubic meters of space. And it would really be "space", because this is way bigger than our tiny little planet could accommodate. For comparison, a sphere the size of the Earth (which has a radius of about 6,371 kilometers, or 6,371,000 meters) has, according to the formula for the volume of a sphere, a volume equal to cubic meters, about grains of sand, so it would take about Earth-sized balls of sand to get a googol grains. Alternatively, if you lumped all the sand together into one giant ball, you'd need cubic meters, and solving for R gives us a radius of approximately meters, which is about 140 trillion light years, or 10,000 times bigger than the size of the observable universe. So maybe space itself wouldn't even be big enough to handle such a massive sand ball.

Carrying the sand idea a little further, imagine there was a huge interstellar alien for whom the Earth appeared to be as small as a grain of sand is to us. Now, suppose this being lived on a giant planet, the planet Gigantica, as big, relative to the alien, as the Earth is to us. This would imply that the volume of Gigantica was in proportion to the Earth as the Earth is to a grain of sand, about times as big; so Gigantica itself would be about cubic meters in volume. If, in turn, there were a still larger alien for whom Gigantica looked like a grain of sand and who lived on an even larger planet, the planet Humonga, say, then Humonga would have to be times as big as Gigantica, for a volume of cubic meters. Now, if yet an even larger alien, from the planet Ginormica, looked down on Humonga as a tiny grain of sand, it would require Humonga-balls to comprise a volume of cubic meters, which you'll recall was the volume of space taken up by a googol grains of our puny Earth-sand. Back here on Earth, grains of sand is 10 cubic meters, about the volume of a nice 10 meter by 10 meter patch of beach (assuming a depth of 10 centimeters). So on Ginormica, this giant giant giant alien could kick back in a beach chair, sip a giant giant giant beer and build a giant giant giant sand castle out of those googol grains with plenty of sand left over to get in its megashoes.

-DrM