The programmer's answer to this question is different from the mathematician's answer. The mathematician's answer is:
Without knowing the actual distribution of pips on the faces of the dice, the question is impossible to answer.
I think this is why nobody has responded to your question.
But you said you want to write an app that knows what the dice are and does the calculation, and this is easy. Let's suppose, just for concreteness, that $R$ and $G$ are six-sided, and that $G$ has the numbers 0 through 5 while $R$ has the standard numbers 1 through 6. Then imagine a table like this:
$$\begin{array}{c|cccccc}
& 0 & 1 & 2 & 3 & 4 & 5 \\ \hline
1 & R & - & G & G & G & G \\
2 & R & R & - & G & G & G \\
3 & R & R & R & - & G & G \\
4 & R & R & R & R & - & G \\
5 & R & R & R & R & R & - \\
6 & R & R & R & R & R & R \\
\end{array}
$$
The row shows the number rolled on the red die, the column shows the number rolled on the green die, and the table shows the winner: $R$ for red, $G$ for green, and $-$ for a tie. We count up $21 R$ and $10 G$, so that $R$ has a $\frac{21}{10+21} \approx 67.7\%$ chance to win, assuming that on a tie you throw it away and start over. (Or, if ties aren't do-overs, $R$ has a $\frac{21}{36} \approx 58.3\%$ chance to win and a $\frac5{36}\approx13.9\%$ chance to tie.)
It is quite easy for the computer to do the counting, without even constructing the table. I am going to write some pseudocode here. Let's say $R$ and $G$ are as above, and represent them in the program as follows:
R = [0, 1, 1, 1, 1, 1, 1]
G = [1, 1, 1, 1, 1, 1]
Here R[3]
is the number of faces of the $R$ die that show the number 3. R[0]
is 0 because $R$ has no faces that show zero, but G[0]
is 1 because $G$ does have a zero. If we had a die with the faces $1,2,2,2,7,7$, we would represent it as [0, 1, 3, 0, 0, 0, 0, 2]
.
If one player is rolling two standard dice, which is $R+R$, we can instead pretend they are rolling one 36-sided die that we represent as
[0, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1].
I hope this is clear. The computer can easily calculate the list for $R+R$ from the list for $R$ itself.
Now we can compare two dice $d_1$ and $d_2$ like this:
total = d1_wins = d2_wins = ties = 0
for i from 0 to d1.max
for j from 0 to d2.max
prob = d1[i] * d2[j]
total = total + prob
if i > j then
d1_wins = d1_wins + prob
else if i < j then
d2_wins = d2_wins + prob
else
ties = ties + prob
end
end
end
print "Probability of D1 winning: ", d1/total
print "Probability of D2 winning: ", d2/total
Or, if ties are do-overs, just change total = total + prob
to
if i ≠ j then
total = total + prob
end
and leave everything else the same. If you want to convert the probabilities to percentages, you simply multiply by 100%.
I hope this is helpful and answers your question.
Call the dice $A, B$ and $C$. There are $6 \times 6 \times 6 = 216$ possible outcomes, so we need to count how many of those attend your event.
The result may be $666$, which I believe also attends your condition. Now, assume $A = 6$, $B = 6$ and $C \neq 6$. There are $5$ possibilities for that: $661, 662, 663, 664$ and $665$. The same could be said if $A$ or $B$ were the ones different of $6$.
Therefore, the probability that you are looking for is $16/216$, where these sixteen possibilities com from the scenarios described above $$16 = 1 (666) + 5(66?) + 5(6?6) + 5(?66).$$
This process can be analogously extended for dice with $10$ sides.
Best Answer
The most common way to do this is to use binomial proportion confidence interval. Let $p$ be the probability that the dice shows 3. This probability is not known but you did an experiment where $24$ out of $83$ trials is 3. Now, your estimated $p$, i.e. $\hat{p}$, is $24/83 = 0.2892$. To get the 95% interval for this estimate, the formula is: $z_{1-\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}$, where $\alpha=5\%$ is the error level, $z_x$ is the $x$ percentile of the standard normal distribution. For $\alpha=5\%$, $z_{1-\alpha/2}=1.96$. And $n$ is the number of trials.
Check this page on wikipedia for reference.