Differently loaded dices in repeated runs

In a casino, two differently loaded but identically looking dice are thrown in repeated runs.
The frequencies of numbers (number of times each number has been observed) observed in 40 rounds of play are as follows:

Dice 1, [Nr, Frequency]: [1,5], [2,3], [3,10], [4,1], [5,10], [6,11]
Dice 2, [Nr, Frequency]: [1,10], [2,11], [3,4], [4,10], [5,3], [6,2]

(a) Denote by 𝑃𝑖 (𝑗) the probability of getting the number 𝑗 (for every 𝑗 ∈ {1, ⋯ ,6}) using the dice i (for every i∈ {1,2})).
Use MLE to estimate the priors 𝑃𝑖 (𝑗) for every pair of 𝑖,𝑗.

(b). Sometime later, one of the dice disappeared. You (as the casino owner) need to find out which one. The remaining one is now thrown 40 times and here are the observed counts: [1,8], [2,12], [3,6], [4,9], [5,4], [6,1]. Use a Bayes’ rule to decide the identity of the remaining dice.

  • Your offer is low!

  • I'm flexible, what price did u have in mind?

  • price updated

  • This is not exactly in my area of my expertises, but I think a fair offer should be at least $20.

  • No problem

Answer

We want to find values $P_i(j)$ that maximize the probabilities of having those exact observed results.

For the first die, the probability of the given result is \[ \binom{40}{5, 3, 10, 1, 10, 11} P_1(1)^5 P_1(2)^3 P_1(3)^{10} P_1(4) P_1(5)^{10} P_1(6)^{11} \] which we want to maximize with respect to the constraint $\sum_{j=1}^6 P_1(j) = 1$. Up to a constant and a power, our probability is the geometric mean of \[ 5 \times \frac{P_1(1)}{5}, 3 \times \frac{P_1(2)}{3}, 10 \times \frac{P_1(3)}{10}, 1 \times \frac{P_1(4)}{1}, 10 \times \frac{P_1(5)}{10}, 11 \times \frac{P_1(6)}{11} \]  (the $\times$ symbol counts occurrences, it's not to be intended as a multiplication).

We know that the geometric mean is always lesser or equal than the arithmetic mean, which is fixed by the constraints of the problem to be $\frac{1}{40}$, and that the equality holds when the terms are all equal to the arithmetic mean. This means that \[ \frac{P_1(1)}{5} = \frac{1}{40} \] or equivalently $P_1(1) = \frac{5}{40}$. The same arguments applies for all the other numbers and the other die as well, so the priors are (as expected) given by the frequencies with which the results occurred, e.g. $P_1(2) = \frac{3}{40}$, $P_2(3) = \frac{4}{40}$, and so on.

For the second part, we can simply compute the probabilities of the results observed in the second sample with respect to the values we've got in the first part. For the first die, we get \[ \binom{40}{8, 12, 6, 9, 4, 1} \left(\frac{5}{40}\right)^8 \left(\frac{3}{40}\right)^{12} \left(\frac{10}{40}\right)^{6} \left(\frac{1}{40}\right)^9 \left(\frac{10}{40}\right)^{4} \left(\frac{11}{40}\right)^{1} \] and for the second die we get \[ \binom{40}{8, 12, 6, 9, 4, 1} \left(\frac{10}{40}\right)^8 \left(\frac{11}{40}\right)^{12} \left(\frac{4}{40}\right)^{6} \left(\frac{10}{40}\right)^9 \left(\frac{3}{40}\right)^{4} \left(\frac{2}{40}\right)^{1} \].

Up to the multinomial and up to a factor $40^40$, the probability of the given outcome for the first die is $5^8 \cdot 3^{12} \cdot 10^6 \cdot 1^9 \cdot 10^4 \cdot 11 = 2^{10} \cdot 3^{12} \cdot 5^{18} \cdot 11$ and for the second die it's $10^8 \cdot 11^{12} \cdot 4^6 \cdot 10^9 \cdot 3^4 \cdot 2 = 2^{30} \cdot 3^{4} \cdot 5^{17} \cdot 11^{12}$ which is clearly much bigger: the ratio is \[ \frac{2^{20} \cdot 11^{11}}{3^8 \cdot 5} \sim 10^{-13} \]

Let $A_1$ is the event "The die remaning die is the first one", $A_2$ is the event "The remaining die is the second one" and $B$ is the event "the die rolls the sequence we got". We just showed that $P(B \mid A_2) > P(B \mid A_1)$. The prior is clearly $P(A_1) = P(A_2) = \frac{1}{2}$. $P(B)$ can be calculated but it's not relevant. We have \[ P(A_1 \mid B) = \frac{P(B \mid A_1) P(A)}{P(B)} = \frac{P(B \mid A_1) }{2P(B)} \] and \[ P(A_2 \mid B) = \frac{P(B \mid A_2) P(A)}{P(B)} = \frac{P(B \mid A_2) }{2P(B)} \] and the latter is $13$ orders of magnitude bigger than the former, so the die is almost certainly the second one.

  • thank you, can u just complete the answer for the first part? with the priors for every pair?

  • They are simply P_i(j) = n/40, where n is the number of occurrences of j with the i-th die. For example, if you want P_2(5), you just check how many times 5 has been rolled with the second die, that is, three times, and divide by 40, so P_2(5) = 3/40. Do I have to write it down explicitly for every pair? It's just there.

  • Let me write Pij rather than P_i(j) for short. We have P11 = 5/40, P12 = 3/40, P13 = 10/40, P14 = 1/40, P15 = 10/40, P16 = 11/40, P21 = 10/40, P22 = 11/40, P23 = 4/40, P24 = 10/40, P25 = 3/40, P26 = 2/40.

The answer is accepted.
Join Matchmaticians Affiliate Marketing Program to earn up to a 50% commission on every question that your affiliated users ask or answer.