Could someone please give a mathematical process about this solving?

This post gives an example of Multinomial Distribution.

Two chess players have the probability Player A would win is 0.40, Player B would win is 0.35, game would end in a draw is 0.25.

The multinomial distribution can be used to answer questions such as: “If these two chess players played 12 games, what is the probability that Player A would win 7 games, Player B would win 2 games, the remaining 3 games would be drawn?”

and this code

dmultinom(x=c(7,2,3), prob = c(0.4,0.35,0.25))
## [1] 0.02483712

Could someone please give a mathematical process about this solving?

I can't say I understand exactly what you mean by mathematical process, but let me try.

The probability of the event that out of 12 games, A wins 7 games, B wins 2 games and and remaining 3 games end in draw is:

p = \{\mathbb{P}(\text{A wins})\} ^ 7 \times \{\mathbb{P}(\text{B wins})\} ^ 2 \times \{\mathbb{P}(\text{draw})\} ^ 3

, since result in any one game is independent of any other game (and hence the probabilities are multiplicative).

Now, this event can occur in as many ways as the number of possible permutations of the sequence of 7 wins of A, 2 wins of B and 3 draws [for example, \text{AAAAAAABBDDD}], and that is equal to:

n = \frac{12!}{7! \times 2! \times 3!}

, following the standard formula for permutation of n_1 + n_2 + \dots + n_k objects, out of which n_i are of \text{Type i} and indistinguishable, \forall \ i \in 1(1)k.

Hence, \text{required probability} = n * p, as the probability of the event will remain same irrespective of the order in the results of the game.

# directly
dmultinom(x = c(7, 2, 3),
          size = 12,
          prob = c(0.4, 0.35, 0.25))
#> [1] 0.02483712

# manually
(factorial(x = 12) / (factorial(x = 7) * factorial(x = 2) * factorial(x = 3))) * (0.4 ^ 7) * (0.35 ^ 2) * (0.25 ^ 3)
#> [1] 0.02483712

Created on 2019-10-14 by the reprex package (v0.3.0)

Hope this helps.


Thank you so much. Does 12! mean all possible results out of 12 games, such as A wins 12, B wins 12 or 12 draws?

Hi @shiqangpan,

12! (12 factorial) is a shortcut for 12 \times 11 \times 10 \ldots \times 1. Here's the Wikipedia article:

Thank you. I know how to calculate a factorial. I would like to know is what it represents in the question.

OK - sorry :slight_smile:,

I think that the 12! appears here as a result of combinatoric computations. I don't think it is the number of possible game sequences. My logic suggest that if there are 3 mutually exclusive outcomes (and we don't have pathological situations such that certain outcomes have zero (conditional) probability), then 1 game has 3 possible outcomes (A, B, or D), a sequence of 2 games should result in 3^2 = 9 possible outcomes: AA, AB, AD, BA, BB, BD, DA, DB, DD, etc. So a sequence of 12 games should result in 3^{12} distinct possible sequences (where the order matters). This is much less than 12!

But I might be wrong of course...

There is a bit of a "loose" explanation here:

Thanks for your question. I guess I've got the point of 7!, 2!, 3!, which mean all the possible ways that A win 7 games, B win 2 games and 3 draws.

What does 12! mean here? I thought it may be the possible results out of 12 games, then I realized that would be 3^{12}.

Suppose that one possibility of the result of 12 games is R_1 R_2 \dots R_{12}, where R_i is the result in the i^{th} game, where i \in 1(1)12. Among these, there are seven A's, two B's and three D's, and their order do not matter.

Among 12 positions, we need to choose 7 positions for A, which can be done in \binom{12}{7} ways. There are 5 remaining positions, among which one can choose 2 positions for B in \binom{5}{2} ways, and the remaining 3 positions will be deterministically filled up by the D. So, total number of possibilities:

\begin{split}& = \binom{12}{7} \times \binom{5}{2} \times 1 \\& = \frac{12!}{7! \times 5!} \times \frac{5!}{2! \times 3!} \\& = \frac{12!}{7! \times 2! \times 3!}\end{split}

Hope this helps.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.