Consider the following two-player game. The players simultaneously draw one sample each from a continuous random variable X, which follows $Uniform\ [0, 100]$. After observing the value of her own sample, which is private information (that is, opponent does not observe it), players simultaneously and independently choose one of the following: $SWAP$, $RETAIN$. If both the players choose $SWAP$ then they exchange their initially drawn numbers. Otherwise, if at least one person chooses $RETAIN$, both of them retain their numbers. A player earns as many Rupees as the number she is holding at the end of the game. what is the probability that the players will exchange their initially drawn numbers?

My approach

this is a question from one of master's entrance exams, now i think that the question is incomplete because given the information in the question if the it is up to player to draw any number from the given interval of $ [0,100]$, why would any player choose any number less than $100$. all the players will choose to maximize their payoff and hence they must draw $100$. and hence the required probability should be equal to 0

But if there is a missing point from the question, for instance the players might draw from 101 balls numbered 0 to 100 in that case the question seems like Monty Hall Problem.

If i am wrong then can anyone please help me with this question?

  • $\begingroup$ I'm confused about your question. The set-up says each player draw exactly 1 sample from U(0,100), but then in your approach you ask why the players wouldn't just draw the number 100. If the players are given a random number, how could they possibly choose to draw the number 100? How could they possibly draw 101 numbers? You also seem to imply they are drawing discrete numbers 0-100, when the set-up says a continuous U(0,100) random value. $\endgroup$ May 13, 2022 at 13:18

2 Answers 2


+1 to Walid for noting an error in an earlier version of this answer.

How about defining some cutoff value $q_1$ below which player 1 will decide to swap and a cut-off value $q_2$ below which player 2 will decide to swap. Then compute the win probability as a function of $q_1$ and $q_2$ and see whether there is a Nash equilibrium.

situation sketch

For a given strategy, $q_1$, of player 1, the player 2, can reduce their $q_2$ level which reduces the area of the 'both players 50% chance' and it increases the 'player 1 wins' and 'player 2 wins area'.

Depending on the levels of $q_1$ and $q_2$ the relative increase in those two areas differs.

  • When $q_2 > 0.5 q_1$ then the reduction of $q_2$ leads to more improvement for player 2 than for player 1.

  • When $q_2 < 0.5 q_1$ then the reduction of $q_2$ leads to less improvement for player 2 than for player 1.

So the best strategy for player 2, as function of the strategy of player 1, is to choose $q_2 = 0.5 q_1$.

Due to the symmetry of the problem an equilibrium must be when the optimal strategy for both players is equal: $q_2 = q_1$. This happens only when the values are zero, since for any non-zero value $q_1$ the player 2 optimal strategy is at a different value $q_2 = 0.5 q_1$.

why would any player choose any number less than 100

Say a player has the number 99 then of course the player would still prefer a larger number but the probability that the swapped number is an improvement is very low.


I will solve with $U[0,1]$ as it is slightly nicer.

Let $z$ be the cut-off for Player 1, under which he will want to swap, and similarly $w$ be the cut-off for Player 2.

There are two scenarios: first is $z \leq w$, the second is $z \geq w$.

Let $X$ and $Y$ denote the uniform random variables on $[0,1]$ for Player 1 and player 2 respectively. We will add up the probabilities of the different ways in which Player 1 can win in the first scenario:

  1. $P($P1 wins$ \,| \,X, Y > w) = \frac{(1-w)^2}{2}$
  2. $P($P1 wins$\,| \,z < X, Y < w)$ = $\frac{(w-z)^2}{2}$
  3. $P($P1 wins$\,| \,X, Y < z)$ = $\frac{z^2}{2}$
  4. $P($P1 wins$\,| \,X > w \cap Y < w)$ = $(1-w)w$
  5. $P($P1 wins$\,| \,X < z \cap z < Y < w)$ = $z(w-z)$
  6. $P($P1 wins$\,| \,z <X < w \cap Y < z)$ = $(w-z)z$

Adding everything up and simplifying yields $$ -z^2 + wz + \frac{1}{2}.$$

In a similar way we can find the probability of Player 1 winning when $z \geq w$:

$$-zw + w^2 + \frac{1}{2}.$$

So what do we notice? Firstly, if $z \geq w$, then to maximize the probability of winning, Player 1 must choose $z = w$ since $-zw + w^2 + \frac{1}{2}$ is a decreasing function in $z$ (a straight line with a negative slope), that is his probability of winning will decrease for larger values of $z$.

What if $z \leq w$? In that case the probability of winning for Player 1 is $ -z^2 + wz + \frac{1}{2}$ — a quadratic polynomial with a negative leading coefficient, so it has a maximum value which can be found by completing the square (or using some calculus):

$$-z^2 + wz + \frac{1}{2} = -\left(z-\frac{w}{2}\right)^2 + \frac{w^2}{4} + \frac{1}{2}.$$

So the cut-off value that will maximize the probability of Player 1 to win for a given $w$ is just $w/2$.

At $z = 0$ the probability of Player 1 to win is $-0^2 + w\cdot0 + \frac{1}{2} = \frac{1}{2}.$

At $z = w$ the probability is $-w^2 + w\cdot w + \frac{1}{2} = \frac{1}{2}.$

So for all values of $z \leq w$ Player 1 will have as good or better chances of winning than Player 2.

But we know that both players will try to use the optimal strategy, in which case each player can improve their probability of winning by taking a value less than that of their opponent. Choosing a cut-off greater than $0$ will give your opponent the chance of beating you with a cut-off less than yours. So for optimal play both players will choose a cut-off of $0$. In other words: always retain.

  • $\begingroup$ Very nice solution, but I have one question: the statement of the problem, as it is written now, states that each player wins the number they end up with at the end of the game, so shouldn't we maximise the expected payoff of player 1 given both thresholds z and w? In that case, are the thresholds both equal to 1/2 (and, thus, the probability of both players swapping equal to 1/4, assuming of course that the numbers are drawn from [0,1] instead of [0, 100])? Thanks in advance! $\endgroup$
    – user_12345
    Jul 5, 2023 at 16:40
  • $\begingroup$ Suppose you knew your opponent will use a threshold of w, and you had a threshold of z < w. Your expectation is P(X>z)E(X | X>z) + P(X<z,Y<w)E(X | X<z) + P(X<z,Y>w)E(Y | Y<w) = (1-z)(1+z)/2 + z(1-w)(z/2) + zw(w/2) = 1/2(-wz^2 + zw^2 + 1), a quadratic in z, with a maximum at w/2. So in the case when your opponent chooses w = 1/2, to maximise your expectation you need to choose 1/4. $\endgroup$
    – Walid
    Jul 16, 2023 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.