Tuesday, August 28, 2007

Expected Value: Deal or No Deal

You must have seen this new game on t.v. Its called "Deal or No Deal" and its hosted by Howie Mandel. The premise of the game is simple and copied from http://en.wikipedia.org/wiki/Deal_or_No_Deal:

Deal or No Deal involves a contestant, a host/presenter, a banker, and a number of briefcases (or boxes), with each having a different (and initially unknown) value. Each game starts with the contestant selecting one of the cases—this first case's value is not known until the game ends. During the rest of the game, the contestant opens the rest of the cases, one at a time, revealing its value. Each time after a specified number of cases are opened, the banker offers the contestant a certain amount of money to end the game. If the contestant takes an offer, the game ends, otherwise the contestant ends up with the money from the first case.


The first time I watched the game, I realized that there was an amazing application of mathematics here in the form of expected value. Expected value comes up in many situations, especially in poker which I play sometimes in my spare time. I think that with the suspense of the briefcases and the fact that people can earn quite a bit of money through such a simple concept has made this game quite popular.

So, as the wikipedia entry says, the banker offers the contestant a certain amount of money to end the game. This can be illustrated as follows, though not the exact numbers.

Say the contestant has 4 briefcases left: $1, $2, $750,000, $100,000. Now, the banker usually offers the expected value or the probability of picking each briefcase X the value of the briefcase. To illustrate in a simpler example, if I flipped a coin and gave you $2 every time it came heads, the expected value would be: (0) x (0.5) + ( $2 ) (0.5) = $1. So you would expect to gain $1 every throw. This concept is more important in poker where these situations occur more frequently, but what isn't so intuitive is that every throw, even the throws where you didn't earn any money (the coin came up tails), you would win $1. In fact, even when the coin comes up heads, you actually win $1 and not the $2 you get.

A bit of a sidetrack, but when two people with 1000 chips each have KK and AA in no-limit holdem and get it allin preflop, AA expects to win about 80% of the time. This means that of the 2000 chips in the pot, AA wins 1600 chips every time it is up against KK. When KK goes up against AA, it wins 20% of the 2000 chips or 400 chips, every single time.

Back to Deal or No Deal now, we want to see what the expected value of the briefcases are at that point because we can compare this value to the value that the banker offers. If the banker offers more money, we should stop because by playing on, we do not expect to get more money. If the banker offers less money, we should (usually) go on, because we expect more money by playing on. So, with the 4 briefcases above, we can do a simple calculation to see what kind of money we expect if we choose a briefcase.

Basically, we want to choose the briefcases that hold either the $1 or $2. There is a 50% chance in choosing one of these briefcases. So, with the 4 briefcases above, we have an expected value of:

(1/4) x ($1) + (1/4) x ($2) + (1/4 ) x ($750,000) + (1 /4) x ( $1,000,000) = $437,500

We ignore the small $1 and $2 terms (and most of the time we can 'ignore' briefcases in our calculations like $1000 and $5000 compared to the larger $300,000 and $500,000 briefcases; we're really just interested in seeing how much expected value the larger briefcases give us)

So if at that moment, the banker offers us (and in the late stages of the game, he will sometimes offer more money than expected) $450,000 then the math tells us to accept the banker's offer. The offer is more than what we expect if we went on so we should stop right now. This is analogous to the choice of $3 every time I didn't flip a coin and $4 for every time I flipped a coin and it showed heads. Hopefully everyone would choose to get the$3 off of me because in the long run the expected value of this situation (100%) x ($3) > ( 50%) x ( $4) or 3 > 2. So back to the example, we have $450,000 compared to $437,500 and so we'd make more money in the long run. Of course, this in the long run. If millions of people got to this same situation, they would all make money by accepting the banker's offer of $450,000.

Of course, a lot of people when they get to that point want to keep going because they may be greedy, or have some sort of intuition that they chose the $1,000,000 briefcase in the beginning. I think this is what makes the game exciting - the thrill of gambling. But if you always make the right decision, you'll earn money. Think about it this way, if you decided to, even once, choose the coin flip for 4$ instead of getting the sure $3 every time, you would theoretically lose $1. It is possible that you do gain the extra dollar for winning that one time, but remember, when you take that coin flip, you expect $2. Since you don't play the game over and over though, you really just have this one shot at the money and maybe thats why people do gamble, because right now, they only have one chance at getting more money.

So if you're ever on Deal or No Deal, whats your expected value?

Saturday, August 25, 2007

The Extreme Cases are Extremely Important

A few weeks ago, I finished a Phil 339 class at UBC. Phil 339 is the Philosophy of Arts, that is, what is the definition of art and what makes things in general art. For example, there is an intentional definition of art which states that art is anything that is intended to be art. If you think about it for a while though and as with any definition of art now in existence, there is an example where intuition does not seem to agree with the definition. For example, with this definition comes the fact that anybody can create art, not just artists as long as they have the right intention. A kid who draws a picture with crayons for their parents depicting their whole family has the right intention - he wants to make the art aesthetically pleasing so that he can please his parents with the drawing. If this is the intention, then that picture is art.

What I noticed, and this may be obvious, is that whenever we encountered new definitions of art, we would always look at the extreme cases as counterexamples. For instance, in this intentional definition of art - and the papers we wrote used these exact examples - there are several cases where the intentional definition of art seems to fail or is a bit muddled.

One example is in the case of Duchamp's Fountain or Warhol's Brillo Boxes. For those not familiar with either, Duchamp's Fountain is a urinal that was taken by Duchamp, signed R. Mutt and then placed on a pedestal in a museum. Warhol took a Brillo Box, which is just a cardboard box that is mass produced, and made it art. In both of these examples, it is the artist's intention to make these art, but it seems weird does it not? Anyone can take a urinal and have the intention to make it art and in a sense, recreate Duchamp's Fountain. Or take any object and make it art.

Another example is things like souping up cars or motorcycles. The owner intends for this car to be aesthetically pleasing, but this does not make the car art. It seems he has the right intention - he paints the car with care and adds-on different accessories all to make the car look good. Intuitively, this is not art, even though it has the right intention.

Since we always consider the extreme cases in this class, it started to get me thinking about other times where we use extreme cases to either prove or disprove something. Of course, the one example that came to my mind first was calculus and finding the maximum point. In order to find the maximum point, we need to take a look at where the curve has a derivative equal to zero AND we need to consider the boundary values (the extreme cases). If nowhere along the curve is the derivative zero, we take a look at the boundary values and find the maximum there.

It seems that we as humans are always interested in what happens at the very extreme end of things. Physicists first discovered black holes and the physics behind a black hole. They then wanted to figure out the boundary of the black hole or the event horizon. In physical terms, what was happening at the event horizon?

I was listening on the radio the other day about drug testing on animals. I agree that it is horrible, but then I thought about how many lives the research saves. Let's say that drug testing on animals is bad, in fact, absolutely terrible. What if a scientist had a vaccine for HIV say, and needed to test it on animals in order to make sure it worked. If there is no other alternative, what would you say? I'm not trying to say that animal testing is good or bad, but rather, these extreme cases really force you to take a side on an issue and even if you are strongly for or against that issue, it seems that there are very extreme examples which can make you jump sides.