# Pick a number that is better than your friends

Consider the following game.

There are $n$ players, each one has to pick a (real) number $x$ between $0$ and $100$. There is one round to the game. The winner is the person whose number is closest to $10\sqrt{\mu}$ where $\mu$ is the mean of the choices made by all the other players.

How would one formulate the problem of choosing optimal play mathematically and is there an optimal strategy?

• What happens if two people name the same number? – Abstraction Dec 10 '15 at 8:11
• @Abstraction Then it's a draw between them. – user66307 Dec 10 '15 at 8:11
• What is a draw in terms of optimization (i.e. what is better - a draw with probability $p_1$ or winning with probability $p_2$)? – Abstraction Dec 10 '15 at 8:12
• @Abstraction Let me change the rules slightly to make this simpler. If there is a draw the winner is chosen randomly from amongst those people who are drawing. – user66307 Dec 10 '15 at 8:14
• Intuitively, the optimal solution is to pick $10\sqrt{50}$ since the expected number of mean is $50$. However to justify the expected mean is $50$ would involve integral over some probability function but that does not seem easy. Maybe there is some easy way to justify the intuition. – cr001 Dec 10 '15 at 8:29

This is a basic game theory problem.

You want to formulate each player's best response function, that is, describe each player's optimal action as a function of other player's actions.

In this case, that is remarkably simple. Player $i$'s optimal pick as a function of other player's picks would solve the equation: $$x_i = 10\sqrt{\frac{1}{n}\sum_{j} x_j}$$

A Nash equilibrium is a tuple $(x_1, x_2, ..., x_n)$ where everyone is playing their best response. Taking a shortcut, let's look for symmetric equilibria: then $\mu = x$. Solving for the fixed point.

$$x = 10 \sqrt{x}$$ Hence symmetric Nash Equilibria: $$x = 100 \quad \quad \quad \quad x = 0$$

If we all pick $100$, everyone splits the win and no one can do better by deviating. If we all pick $0$, everyone splits the win and no one can do better by deviating. Either outcome is what we might expect if everyone were perfectly rational. If you have alternative beliefs, you should play your best response function given those beliefs.

Small note: you need to assume $n > 2$ or it doesn't matter at all what anybody picks since both players would always be equidistant from the mean.

• If everyone picks $100$ then you win with probability $1/n$. – user66307 Dec 10 '15 at 11:01
• @Lembik You still have no incentive to deviate. If you pick anything else, you straight up lose if everyone else picks 100. You can split the prize by picking 100 or choose anything else and get 0. (assuming n > 2) – Matthew Gunn Dec 10 '15 at 11:04
• Thank you. It's an interesting definition of optimality. It's certainly the case that if everyone else choose 100 you want to choose 100. But if everyone else choose anything less than 81, it's bad idea to choose 100. – user66307 Dec 10 '15 at 11:15
• You want to play your best response based on your beliefs. If I belief everyone else is going to play 50, I should play 10 * sqrt(50). But if we all know that everyone is rational, we all know that we know everyone is rational etc..., then we should all play 100 or 0. – Matthew Gunn Dec 10 '15 at 11:18
• It seems that if everyone picks a random number in the range they have a $1/n$ chance of winning which is at least as good as the Nash Equilibrium solution. Why is this not optimal? – user66307 Dec 10 '15 at 11:22