# Player 1 and Player 2 compare their numbers, and the player with the higher number wins the round.

Five distinct numbers are distributed to players numbered 1 through 5. They play a game as follows:

Player 1 and Player 2 compare their numbers, and the player with the higher number wins the round. The winner then compares their number with that of player 3, and so on. If X represents the number of rounds player 1 wins, calculate P(X = i) for i = 0,1,2,3,4.

I cannot figure out the function that best portrays the situation. Can someone give me some hints?

Thanks.

• Well, I think you are meant to assume that the distribution of numbers is random. Player $1$ loses the first round with probability $\frac 12$, so $P(X=0)=\frac 12$. And so on. – lulu Sep 10 '18 at 16:58
• So, for X more or equal to 1, the function would be P(X)=(1/2)^x ? – ibuntu Sep 10 '18 at 17:03
• Hint: try it with three people. Now you can just list all the $3!=6$ permutations and read the answer off. Same with four people. You could also do this with $5!=120$ but maybe you can find a better way. – lulu Sep 10 '18 at 17:08
• Let me just second lulu's suggestion as a general strategy. With any question like this, where the numbers are not dauntingly large, try attacking a slightly smaller version of the same question. It will be reasonably quick, and you may identify tactics that will work with the original question. – Brian Tung Sep 10 '18 at 17:09
• As an additional check, you should get $P(X=4)=\frac15$ corresponding to the first player having the best number – Henry Sep 10 '18 at 17:15

I'll assume that the numbers are assigned to the players randomly, with each permutation of the numbers being equally likely.

Let $E_n$ be the event that Player $1$ has the highest number among players $1$ through $n$. Then $\mathsf P(E_n)=\frac1n$. Also, $E_{n+1}\subseteq E_n$, and thus $\mathsf P(E_n\setminus E_{n+1})=\mathsf P(E_n)-\mathsf P(E_{n+1})=\frac1n-\frac1{n+1}=\frac1{n(n+1)}$. Since $E_n\setminus E_{n+1}$ is the event $X=n-1$, we have $\mathsf P(X=n)=\frac1{(n+1)(n+2)}$. This holds for $0\le n\lt4$. For $n=4$, there are no further rounds to win, so the probability of winning $4$ rounds is just $\mathsf P(E_5)=\frac15$. Thus, the desired probabilities are

\begin{array}{c|c} n&0&1&2&3&4\\\hline \mathsf P(X=n)&\frac12&\frac16&\frac1{12}&\frac1{20}&\frac15 \end{array}

Basic approach. Player $1$ is (a priori) equally likely to get any of the five numbers.

• If they get a $1$, they are sure to win $0$ rounds.

• If they get a $2$, they win either $0$ rounds or $1$ round. What is the only circumstance under which they win $1$ round?

• If they get a $3$, there are two numbers higher (let's call them H, since we don't need to distinguish $4$ and $5$) and two numbers lower (let's call them L). How many different permutations are there of HHLL? A couple are HLHL and LHLH. What others are there? (Are they in fact equally probable?) Under which cases does Player $1$ win $0$, $1$, or $2$ rounds? For instance, HHLL leads to winning $0$ rounds. (This is the least simple case, so you may want to tackle the others first.)

• If they get a $4$, they win $0$ to $3$ rounds. It depends only on where the $5$ is.

• If they get a $5$, they are sure to win all $4$ rounds.

ETA: After completing the preceding analysis, you now have to apply the law of total probability to arrive at the desired values $P(X = k)$ for $k = 0, 1, 2, 3, 4$. For instance, for $k = 1$,

\begin{align} P(X = 1) & = P(X = 1 \mid \text{Player $1$ got $1$}) \times P(\text{Player $1$ got $1$}) \\ & + P(X = 1 \mid \text{Player $1$ got $2$}) \times P(\text{Player $1$ got $2$}) \\ & + P(X = 1 \mid \text{Player $1$ got $3$}) \times P(\text{Player $1$ got $3$}) \\ & + P(X = 1 \mid \text{Player $1$ got $4$}) \times P(\text{Player $1$ got $4$}) \\ & + P(X = 1 \mid \text{Player $1$ got $5$}) \times P(\text{Player $1$ got $5$}) \\ \end{align}

Note that each of the $P(\text{Player$1$got$j$}) = 1/5$ for $j = 1, 2, 3, 4, 5$. (Keep in mind that I'm using $j$ as the dummy variable for the number given to the player, and $k$ for how many wins the player earned with that number. Be careful to keep these straight.) So all you need now is the analysis from the above.

Let's suppose, just for the sake of argument, that the values were $0$, $1/2$, $1/2$, $1/3$, $0$. Then the unconditional probability of getting $1$ win would be

$$P(X = 1) = (0)(1/5) + (1/2)(1/5) + (1/2)(1/5) + (1/3)(1/5) = 4/15$$

Those aren't the actual values, so that isn't the correct answer. But that's the way you would approach it.

• Are the answers: P(X=1) = 4/5, P(X=2) = 3/5, P(X=3) = 2/5, P(X=4) = 1/5? – ibuntu Sep 10 '18 at 17:31
• @ibuntu: No. First of all, there is a probability $P(X = 0)$ as well (which is positive), and secondly, the probabilities have to add up to $1$. – Brian Tung Sep 10 '18 at 17:39
• @ibuntu: I've added more suggestions about how to continue. – Brian Tung Sep 10 '18 at 17:50