If 9 six-sided dice were rolled consecutively and displayed in a $3\times3$ format, what is the probability of a line of 3 of the same number occurring? Considering the 8 ways that are possible; 3 horizontally, 3 vertically and 2 diagonally.
The example below shows a line of three diagonally; $A_1, B_2$ and $C_3$.
$$\begin{array}{ccc} \begin{array}{ccc} A_1&A_2&A_3\\B_1&B_2&B_3\\C_1&C_2&C_3 \end{array} &\to& \begin{array}{ccc} 2&4&5 \\ 4&2&3 \\ 6&6&2 \end{array} \end{array} $$
What are the players odds of winning given that only one line of three is needed to win. Thanks so much to the smart person that can work this out and possibly explain in simple terms the process of working it out!
Very much appreciated!
=)
I think it's pretty difficult to come up here with an explicit formula, making symmetry or independence arguments. There's a lot to enumerate and many possibilities to mess up.
However, the problem is small enough to solve by brute-force, enumerating all possibilities. I did that and came up with the following code in Python/numpy (where I used only one symmetry argument to reduce the runtime by a factor of $6$, namely that the last die always shows a $1$):
The computation took about $4-5$ minutes on my laptop with the following results: There are $N=6^8=1679616$ possibilities at all with $m=341036$ favourable outcomes, giving a probability of $p\approx0.203044029111$