It’s not every day that a presidential candidate stumps you with a really interesting math problem, but that’s *exactly* what Pete Buttigieg did on Tuesday when he sent out the following email to his supporters:

Pete’s Innovation Team handles data, engineering, and analytics responsibilities for the campaign, so you might not be shocked to learn that we have more than a few numbers geeks in the group. And while we’re extremely serious about helping make Pete our next president, we find joy in some strange places…like clever donation amounts.

You might have seen our $20.20 buttons on the website (classic), but we also enjoy $2.70 (for the electoral votes), $46 (for our next president), or $20.55 (for the year when Pete reaches the current age of the current president). But as we started to do our end of year analyses, we decided to get even geekier. We thought up an end of year guessing game, and we want you to be part of the fun.

All you have to do to win is donate the smallest amount that nobody else donates. In other words, suppose you donate $1.00. If someone else playing also donated exactly $1, you both lose. We’ll see if only one player donated $1.01, and so on until we find an amount donated exactly once, and that’s our winner.

This presents a neat problem: let’s say you want to donate once and your goal is to maximize your chances of winning this game. Suppose you expect there to be other donations (my best guess for is 50,000). How should you play?

To formalize this a bit: you are trying to maximize your chances of winning per dollar you spend, and so is everyone else. What is the equilibrium strategy?

(Note that this strategy necessarily involves randomness, i.e. it takes the form “draw your bid randomly from a distribution”; otherwise everyone would donate the same amount and no one would win.)

So here’s what I recommend: before reading on, spend a couple minutes and make your best guess at the average donation amount in the equilibrium strategy. For , is it one dollar? Ten? A hundred? How does this amount grow with ? Then, if you’re feeling up for it, try to solve for the equilibrium! Then, read on.

The key property of the equilibrium strategy is this: *the probability that you win if you donate cents is proportional to *. That’s because if this is not the case, donors will have an incentive to deviate from the equilibrium: they can get a larger probability of winning per dollar spent by donating a value with a high win-probability-to-money-spent ratio.

This lets us set up an equation to find the equilibrium solution. If you’re interested in the math, read straight ahead; if you want to skip the math and see the result, scroll down to the pretty chart!

So, what is the probability that you win if you donate cents? Two things need to happen:

- For every , either zero donations or multiple donationd of cents must be made.
- No one else makes a donation of exactly cents.

Define to be the probability of a donation being exactly cents (in the equilibrium strategy). Then the probability that *not* exactly one donation of cents is made is

.

These probabilities are almost independent for different values of , so the probability that the first bullet holds is

.

The probability that the second bullet holds is

.

Therefore, if we denote with the probability of winning if you donate cents, we have

.

Somewhat tautologically, we have

.

A nice thing about these last two quantities is that they look very similar: they both involve a big product, but the products are almost identical. So let’s see what happens if we divide these two quantities.

.

But we have another way of expressing — specifically, it’s just $\frac{k + 1}{k}$, by the “key property” we noted above. Therefore we have

.

We can now solve for in terms of . I’ll spare you the algebraic manipulation; what you end up getting is

.

Now, if you wanted you could turn this recursive formula for into a differential equation: letting , we have

.

However, I’m pretty sure this differential equation doesn’t have a nice solution, so it doesn’t really pay to do that. Instead, we can set any particular we want (I’m going with ) and compute the values of recursively. Except… how do we figure out what is? Well, we know that and we can search for the value of that makes this happen. That’s exactly what I did, and I ended up with the following distribution:

This is a graph of the probability density function (PDF) of the equilibrium strategy, where the x-axis is in cents.

So, this is pretty interesting! It turns out that you *never* want to donate more than $48.60. The intuition behind that is: with fifty thousand donors, it’s almost guaranteed that for some donation amount below $48.61, exactly one person will donate that amount, so it never makes sense to donate more than $48.60.^{1} Let’s let denote the maximum donation that someone playing the equilibrium strategy might donate (so ).

What about the mean of this distribution? If you play the equilibrium strategy, your *expected* donation is $22.03. Let’s call the expected donation (so ).

You might be wondering how and grow with . It turns out they grow linearly with . In particular, from trying different values of (as large as 1,000,000), I conjecture the following:

- Asymptotically with , we have . More formally, .
- As gets large, the distribution of becomes closer and closer to uniform, and so .

While this makes a lot of sense now that I’ve spent a while thinking about Pete’s problem, this isn’t the guess I originally made! I expected to grow roughly as (or or something). I can’t re-explain my intuition in a way that makes sense, but it was coming from the same that appears in the birthday problem.

I’d like to end this post with a pitch to the Democratic presidential campaigns. I know you all are coveting endorsements, particularly from publications as influential as the Des Moines Register, the New York Times, and Unexpected Values. So here’s what you can do to win this blog’s endorsement: give me math problems that are interesting enough for me to blog about! My contact information is available on the About page. First to five wins. Mayor Pete, you’re in the lead!

EDIT (1/2/2020): The results are in, and I vastly overestimated the number of donations the campaign would collect! The actual number of donations was “over 1600,” per the campaign; let’s say the actual number was 1650. Also, it seems that you weren’t allowed to donate less than $1. Given these parameters, the equilibrium solution looks like this:

In particular, the maximum contribution in the equilibrium is $3.58 and the average contribution is $2.13.

As it turns out, the winning value was $1.40. In comparison, the expected winning value is $2.36 (not $2.13, since in our equilibrium larger values are more likely to win (so that probability of winning per dollar contributed stays constant)). In the distribution over winning numbers, $1.40 is just the 11th percentile number. I think this is predictable, since people *don’t* play the equilibrium and instead do silly things like contributing $1 and $4.20 and $100, which essentially lowers the number of people who “play the game to win.”

For amusement, here are some more details form the Buttigieg campaign:

- Overall we collected more than
1600donations, with over600different values represented182out of the 200 values between $1 and $2.99 were represented (spoiler alert, that means the winner was in there!)[Note: this implication is incorrect! -Eric]- In case you were wondering,
8people chose 3.14 (~pi), but only4tried 2.72 (~e)- Apart from $1 on the nose,
$1.19(for Pete’s birthday, perhaps?) was the most popular guess by far, with37submissions- After the first few hours of the game, nobody had yet donated $1.01 but by the end of the game,
10people had given it a shot

(I’m pretty happy that they singled out in their email, though I’m not convinced the people who donated $2.72 were actually trying to donate :))

^{1. A subtle point: the fact that we are solving for the strategy that maximizes probability of victory per dollar spent, rather than probability of victory given that you can only make one donation (of whatever size) is important here; otherwise there would be some (tiny) probability of donating cents for every . (Why?)↩}

The goal to “get a larger probability of winning per dollar spent” is natural. Another natural goal (my original goal) is to “get a larger probability of winning regardless of the amount spent” with equilibrium strategy “the probability that you win is the same for any donated amount”. That slightly changes the differential equation – instead of x/(x+1) we will have 1. Will the result approximately stay the same?

I did not expect to have a plateau in the middle of the graph, with the donation amount(in cents) going so close to the number of participants.

LikeLiked by 1 person

That’s the problem I originally thought about (before deciding that maximizing probability of winning per dollar spent is more natural, since you can give multiple donations). That’s exactly right — the goes away and the math is somewhat nicer! (Though the solution to the differential equation still can’t be expressed in terms of elementary functions.)

You get something pretty similar: grows as , and I think that asymptotically you get the same constants too. For I’m getting that , slightly more than the $22.03 I got above.

The probability density plot looks similar to the one above, except that there isn’t a steep drop at the beginning (but there is a steep drop at the end). That’s because whereas in the above problem you want the probability of winning with a two-cent donation to be *double* that of winning with a one-cent donation, in your problem you want them to be the same. This effect is very noticeable near zero but has negligible effect further out.

LikeLike