Choosing number game

You and a friend are playing a game where a random number X, between 1 to 20 is chosen, and one of you will pick a number and then the other will pick a different number. The one that guesses the closer number wins X dollars. Should you choose to go first, and what number should you choose?
 
IMO you should go second. Pick 10.5 if he picks 10.5 (the mean and median value), and if he picks anything else, then pick that number plus some small epsilon if that number is less than 10.5, or that number minus epsilon if it's greater than 10.5 to dominate his choice.
 
IMO you should go second. Pick 10.5 if he picks 10.5 (the mean and median value), and if he picks anything else, then pick that number plus some small epsilon if that number is less than 10.5, or that number minus epsilon if it's greater than 10.5 to dominate his choice.

I'm thinking of calculating expected value. Can you show this mathematically by comparing the expected value of these two people in each case?
 
Oh, just reread the problem. So the payoff isn't uniform (EG closer number, win some flat rate C)...so it's biased towards the higher numbers.

Hmmm...

Well in that case, it's a case of a payoff of a uniform distribution with the probability as to where you do the cutoff.
 

alain

Older and Wiser
pick integer numbers? 1-20 from the uniform distribution?

I would pick second. At worst, I will have the same probability of winning.
 
Since the problem doesn't say anything, I think we can assume it's discrete. Btw, why not solving for both cases?
 

alain

Older and Wiser
i'm re-reading the problem and there are some things that are not clear. Do you keep picking? or do my friend and I pick once each and the game is over? how many time do we play?
 
Pruse. You should probably assume your competition is not an idiot, thus he/she will pick one unit higher or lower than you.

Tunal. By picking first, you will always have the same EV (10.5). You just want to find the 'sweet spot ' where the ratio if they go higher or lower is 1.

Out a few more decimals 14.158682910351
 
Maybe for him picking one unit higher or lower than me is not optimal. Either way, we should know what happens in the case where X is precisely in the middle of our picks.
 

alain

Older and Wiser
even more fundamental question? What are we trying to do? If we are trying to win the game, going first and picking 14 is not going to cut it.
 
Maybe for him picking one unit higher or lower than me is not optimal. Either way, we should know what happens in the case where X is precisely in the middle of our picks.

Valid point; however, I think this would only be relevant if there are more than two players. Try to come up with three solutions for each of these assumptions in the event of a tie.
1- push (no payout)
2- split pot
3- re-select a random number


even more fundamental question? What are we trying to do? If we are trying to win the game, going first and picking 14 is not going to cut it.

If the point is simply to win (regardless of EV), then 14 won't be correct. But then, it wouldn't be much of a brain teaser either.
 

alain

Older and Wiser
If the point is simply to win (regardless of EV), then 14 won't be correct. But then, it wouldn't be much of a brain teaser either.
For an interview is perfect. Communication is paramount and giving an answer by assuming certain conditions without finding out the details of the question could lead to a "don't hire".
 
If you can't make assumptions for yourself, and you need someone to hold your hand - that could be a "don't hire" signal as well.

With most business problems, you're dealing with imperfect information and you need to make the choices quickly.

Another problem with this question is that it doesn't mention the cost to play. If there's no cost - I don't care what number I pick, just let me keep playing. Lol. Does one player pay the other?
 
It's a two-part problem.

(1) Figure out Player 2's optimal move for every move that Player 1 can make.
(2) Figure out Player 1's optimal move based on what he knows Player 2 will do.

This is all assuming each player is rational and seeks to maximize his expected winnings.
Let \(f(x_1)\) be the value that Player 2 should play given that Player 1 played \(x_1\). It's easy to see that \(f(x_1)=x_1+1\) for \(x_1\in \{1,...,14\}\) and \(f(x_1)=x_1-1\) for \(x_1\in \{15,...,20\}\). (To maximize his expected earnings, Player 2 must pick one greater or one less than Player 1, in the direction in which the sum of all numbers up to the end is greater.)

This shows that under optimal play, Player 1's move determines the expected outcome of the game. If Player 1 plays 14, he knows Player 2 will be forced to play 15 to maximize his earnings, and thus Player 1's expected earnings will be \( (1+\cdots+14)/20=105/20)\). If Player 1 plays 15, then he knows Player 2 will play 14, and his expected earnings are \( (15+\cdots+20)/20=105/20\). Under these circumstances, Player 2's expected earnings are in both cases 105/20.

So the first player should play 14 or 15, and it doesn't seem to matter who plays first.
 
It's a two-part problem.

(1) Figure out Player 2's optimal move for every move that Player 1 can make.
(2) Figure out Player 1's optimal move based on what he knows Player 2 will do.

This is all assuming each player is rational and seeks to maximize his expected winnings.
Let \(f(x_1)\) be the value that Player 2 should play given that Player 1 played \(x_1\). It's easy to see that \(f(x_1)=x_1+1\) for \(x_1\in \{1,...,14\}\) and \(f(x_1)=x_1-1\) for \(x_1\in \{15,...,20\}\). (To maximize his expected earnings, Player 2 must pick one greater or one less than Player 1, in the direction in which the sum of all numbers up to the end is greater.)

This shows that under optimal play, Player 1's move determines the expected outcome of the game. If Player 1 plays 14, he knows Player 2 will be forced to play 15 to maximize his earnings, and thus Player 1's expected earnings will be \( (1+\cdots+14)/20=105/20)\). If Player 1 plays 15, then he knows Player 2 will play 14, and his expected earnings are \( (15+\cdots+20)/20=105/20\). Under these circumstances, Player 2's expected earnings are in both cases 105/20.

So the first player should play 14 or 15, and it doesn't seem to matter who plays first.

You should divide by 19 since it's a uniform distribution from 1 to 20(yes, we can assume it's "uniform"). Also, one of them wins X, which is a fixed random number, so I don't think your expected earnings(=(1+\cdots+14)/20) is correct.

To clear up some confusions: The game is played only once. Both of them need to choose different numbers, and the money gain will only be X. If you're equally close, then no money will be gained:)
 
You should divide by 19 since it's a uniform distribution from 1 to 20(yes, we can assume it's "uniform"). Also, one of them wins X, which is a fixed random number, so I don't think your expected earnings(=(1+\cdots+14)/20) is correct.

No, it is 20 as I'm assuming the discrete case. And X is actually random from the point of view of the players: the point of view the problem is concerned with.
 
Top