Dartblog
Special Feature: Give a Rouse
Whither the College on the Hill? Dartblog brings you news and commentary from Hanover and the world at large, including deep coverage of the maturing tenure of Dr. Kim.
Archived post
This is an archived post. Please click here to see the latest entries.
Solution to the Hedging Problem
By popular demand, here is the solution to the mathematical puzzle I presented below. Without having read the problem, the following will make little sense. But a basic recap is as follows: Starting with $100, your problem is to find the maximum amount of money you can guarantee yourself to win after playing through a betting game involving a deck of playing cards.
And no, I’m not giving the numerical answer up front. If you absolutely must have it immediately, if you cannot bear to follow the solution, you will have to read the extended entry and scroll down.
Let’s introduce a bit of terminology. For n = 1,2,…,52, call the betting period immediately preceding the flip of the nth card “stage n.”
We have already established that we can guarantee ourselves $200 by betting nothing at stages 1 through 51, and betting $100 at stage 52 on the correct color. Simple enough. But notice that this “double-up at the last stage” idea is not something to forget. Indeed, it is always optimal to bet all of our money at the last stage, however much that happens to be, because we know the last card’s color with certainty. Any strategy that does not do this is therefore immediately out of consideration, for we can derive from it a purely superior (dominant in the terminology of game theory) strategy by performing identical betting behavior at stages 1 through 51 and then doubling-up at stage 52.
We now know how we must bet at stage 52. So armed, let’s consider how to bet at stage 51, with two cards yet to be flipped. There are four possible orders for the colors of the two remaining cards: red then red (which I will call RR); black then black (BB); red then black (RB); black then red (BR). Of course, when we reach stage 51, we will not know which of these is correct. But we will have a lot of information nonetheless: We will know how many reds and how many blacks remain in the deck. We will therefore be able to distinguish among three possibilities with regards to color order: 1. RR; 2. BB; 3. RB or BR.
If we have RR or BB, our optimal betting behavior is pretty clear. We know with certainty the color of the next card, so by betting all our money on that color we can double-up with certainty. Therefore, in view of our double-up rule for stage 52, if we reach stage 51 with either RR or BB remaining, we will with certainty quadruple-up by the end of the game.
How should we bet if we have RB or BR? Notice that at this point, at the very worst, we will double-up by the end of the game from our stage 52 bet. Therefore, since we are trying to maximize our worst-case scenario (what we can “guarantee” ourselves), any bet we make must beat this outcome with certainty. I claim that no such bet exists. Here is the proof. Say we have $M (for “money”) at stage 51 and we chose to bet $x, 0
Phew. You see the general approach at this point: Let's now consider stage 50. With three cards remaining, there will be 2^3=8 color order possibilities, among which we can distinguish four cases. At this point we gain little from listing particular color orders; it is clear that what is important is how many cards of each color remain in the deck, because that is the information we have. Therefore, from now on, my RB notation will refer only to the number of cards remaining, not to their particular order. So the four possibilities at stage 50 are: RRR, RRB, RBB, BBB. (Three, two, one, or zero reds remaining.)
Here is a crucial insight that will greatly ease our analysis from this point on. Notice that black cards and red cards are, in some sense, perfectly "symmetrical" in this game. Betting on red uses exactly the same rules as betting on black. The colors are nothing more than labels--they could just as easily be "table" and "chair." Therefore, whenever we determine that it is optimal to bet x percent of our money on red when R red cards and B black cards remain, it is necessarily also optimal to bet x percent of our money on black when R black cards and B red cards remain. This insight will effectively halve the number of cases we have to consider for the rest of the analysis. Also, notice that all the betting behavior we have determined so far, for stages 52 and 51, abides by this rule.
Armed with this insight, there are really only two cases to consider at stage 50: RRR and RRB. As above, RRR is easy: We bet all our money on red, guaranteeing that we will "octuple-up" by the end of the game if we reach this state. RRB is trickier. First consider a bet of $x on black (say we have $M). If our bet on black is incorrect, we will move into stage 51 with RB and $M-x, so by our prescribed betting behavior for stages 51 and 52, we will end the game with 2(M-x), which is strictly worse than 2M, which we could have attained by not betting. So we must not bet on black. Now consider a bet of $x on red. This looks promising. For if our bet is correct, we win some money, and if it is incorrect, we move into stage 51 with a highly favorable situation with respect to the remaining cards, RR. This looks like a win-win situation. Something good happens no matter the color of the next card. In a sense, we are "hedging our bets": we would really like to quadruple-up in stages 51 and 52, but we bet against that outcome so that even if we don't get it, we still get something from winning the bet.
So how much do we bet? We reason as follows. The more we bet on red, the happier we will be if the next card is red; the less we bet on red, the happier we will be if the next card is black. Since we want to maximize what we can guarantee ourselves, we must bet the unique amount that makes us completely indifferent about the color of the next card. Any other bet will make our worst-case scenario worse than the guaranteed outcome of this bet. So let's say we have $M and we want to bet $x, where x is to be determined. By our indifference criterion, we must have that
4(M-x) = 2(M plus x)
because we quadruple-up with M-x if the next card is black, and we double-up with (M plus x) if the next card is red. This solves to x=M/3, so the optimal bet here is 1/3 of our current cash, whatever that happens to be. Given that, substituting x=M/3 back into either side of the above equation, we see that if we reach stage 50 with RRB and $M, optimal betting guarantees us 8M/3 by the end of the game. This is strictly better than 2M, so we're making progress! Waiting until stage 50 and then betting as we have laid out here guarantees us at least $266.67--finally, an improvement over our original $200!
Stage 49. Considering the red/black symmetry, we have three cases to consider: RRRR, RRRB, RRBB. RRRR is as above, bet all your money on red. RRBB is almost as easy. By the same argument that showed we should not bet at stage 51 with RB, we should not bet here. The only difference is that now we can guarantee ourselves 8M/3 by waiting for the next stage, whereas above we could guarantee ourselves 2M. Indeed, the argument will hold whenever we have an equal number of red and black cards remaining. We should never bet at such a stage.
How do we bet if we have RRRB? By the same arguments as in the RRB case, betting on black is certainly non-optimal, and we must bet on red such that we are indifferent as to the color of the next card. So we have
8(M-x) = (8/3)(M plus x)
which solves to x=M/2. Substituting this back into the equation, we find that by betting half our money on red in RRRB case, we guarantee ourselves 4M by the end of the game.
And so on. To solve the entire problem, we simply "roll back" the game from stage to stage until we reach stage 1. For each possible combination of red and black cards that remain in the deck, we care about two numbers: the proportion of our current cash that we should bet given that combination, and the "multiplier"--the amount we can guarantee ourselves by the end of the game with optimal betting. These numbers are easily calculated, as above, from the corresponding numbers for later stages.
Of course, it would be quite tedious to roll back the betting all the way to stage 1 by hand. I asked my computer to do it. The multiplier in the case with 26 reds and 26 blacks remaining--i.e. at the start of the game--is 9.0813. Therefore, given that we start the game with $100, we guarantee ourselves winnings of $908.13 by this strategy, and we are completely indifferent as to the actual order of the cards.
As a side note, notice that for every case we calculated, we always ended up betting a proportion of our cash that was predictable based on the number of red and black cards remaining in the deck. If R reds and B blacks remained, where R>B, we always bet the fraction (R-B)/(R plus B) of our money on red. It can be proven by mathematical induction that this is the case for every possible combination of red and black cards remaining, but the proof is algebra-heavy and inelegant.
One final thought experiment. Imagine that instead of thinking about how to maximize your guaranteed winnings, you play the game rather rashly. You pick a random sequence of 26 blacks and 26 reds, and at each stage, bet all of your remaining cash on the color specified by your chosen sequence. Of course, you will almost certainly go broke by this strategy, but there is a very small probability that you will become very wealthy indeed. Consider the expected value of your winnings by this betting scheme. You walk away with nothing with probability (1-1/(52 choose 26)), and you win 100*2^52 with probability 1/(52 choose 26). (“52 choose 26” is the number of distinct sequences of 26 red cards and 26 blacks.) The expected value of your winnings from this strategy is, lo and behold, 100*2^52/(52 choose 26) = $908.13. This makes good sense. It turns out that the hedging scheme I presented above is in a sense an average of all (52 choose 26) of these “all-out” strategies.
Featured posts
-
October 18, 2009
When Love Beckoned in 52nd Street
We were at San Francisco’s BIX last evening, enjoying prosecco, cheese, and a bit of music. A full year of inhabitation in Northern California has unraveled to me no decent venue for proper lounging, but… -
October 9, 2009
D Afraid of a Little Competish
So our colleague and Dartblog writer Joe Asch informed me that the D has rejected our cunning advertising campaign. Uh-oh. The Dartmouth is widely known as a breeding ground for instant New York Times successes,… -
September 4, 2009
How Regents Should Reign
As Dartmouth alumni proceed through the legal hoops necessary to defuse a Board-packing plan—which put in unhappy desuetude an historic 1891 Agreement between alumni and the College guaranteeing a half-democratically-elected Board of Trustees—it strikes one… -
August 29, 2009
Election Reform Study Committee
If you are an alum of the College on the Hill, you may have received a number of e-mails of late beseeching your input for a new arm of the College’s Alumni Control Apparatus called… -
August 23, 2009
Fare Thee Well, Tom Crady
And now Dean Tom Crady has precipitously announced his departure from the College after only 20 months on the job. How to read this? By way of background, prior to coming to Dartmouth, Crady had… -
May 31, 2009
Kangaroo Court, Indeed
In an interview with The Dartmouth, alumni-elected trustee T.J. Rodgers ‘70 explained his reasons for declining to participate in future evaluations of trustees up for “re-election,” namely the “kangaroo court” nature of such discussion in…