Thursday, April 11, 2013

More on order


In the last post, I listed the chance that the player going first wins in a game with 2 players. What happens, however, when the number of players in the game blows up, say to a million? The probability comes out to be close to 0.0015, which is just about equal to the probability of one player finishing the game in exactly 7 moves. This actually makes sense since if the player going first in a game with a very large number of players doesn't win in the shortest number of moves possible, chances are that someone else will. Thus, the chance that the first player wins is very close to the probability that he or she finishes in the shortest number of moves possible.

Let's switch gears for a moment and now consider the unlucky fellow who has to go last in the game. How does this change the math? This player, in order to win, cannot tie with anyone else, so all other players must finish in more than y moves. The probability of the player in last winning in y moves thus translates mathematically to:

Py * (1 - (P7 + P8 + P8 + ... + P(y-1) + Py)^(p-1)

Note that the only difference between this and the case with the first player is that this time, there is an additional term, Py, enclosed in the parenthetical expression.

Testing this out for the case when there are two players, we get that the probability of the second player winning is equal to 49.2, which is expected based on the probability we found of the first player winning (50.8). As the number of players gets larger and larger, the probability of the last player winning gets closer and closer to 0. When there are a million players, the probability of the last player winning is smaller than 1.0 * 10^-500. It is more likely that someone wins the Mega Million jackpot fifty times in a row than this happens.

Now that we have these two extreme cases down (first and last), let's try to be a bit more general: what is the probability of a player in order k in game with p players winning? We know that there are (p - k) players who this player trumps and ( k - 1) players who trump this player. Thus, this player can finish in the same number of moves as (p - k) players, but he or she must finish in a fewer number of moves than (k - 1) of the players. Thus, the probability of the player with order k winning is equal to:

        Py * (1 - (P7 + P8 + P8 + ... + P(y-1) + Py)^(k-1) * (1 - (P7 + P8 + P8 + ... + P(y-1))^(p-k)

Note that when k = 1 (player goes first) or k = p (player goes last), this turns into one of the two expressions discussed before.

In a game with four players, the probabilities of winning, in order from the player going first to the player going last, are as follows:

0.26007883
0.25322465
0.24657453
        0.24012197

        These add up almost exactly to 1, so our math is probably good.

1 comment:

  1. You're math is excellent! You're amazing!!!

    ReplyDelete