# Is there a 1 in 20 or 1 in 400 chance of guessing the outcome of a d20 roll before it happens?

My friends are in a bit of an argument over Dungeons & Dragons. My player managed to guess the outcome of a D20 roll before it happened, and my friend said that his chance of guessing the number was 1 in 20. Another friend argues that his chance of guessing the roll is 1 in 400 because the probability of him randomly guessing a number and then rolling it were both 1 in 20 so the compound probability is 1 in 400. Which of these probabilities is a better characterization of our situation, and what were really his chances?

• Comments are not for extended discussion; this conversation has been moved to chat.
– Sycorax
Commented Nov 4, 2021 at 20:27
• This reminds me of the joke about a person who always insists on bringing a bomb on airplanes, because the probability of having two bombs on an airplane is extremely low. Commented Nov 6, 2021 at 8:02

There are 400 possibilities and 20 of them, each occuring with probability $$\frac{1}{400}$$, have the guess equal to the outcome. So the total probability of having the guess equal to the outcome is $$20\cdot \frac{1}{400} = \frac{20}{400} = \frac{1}{20}$$

$$\small{ \begin{array}{rc} & \text{OUTCOME}\\ \begin{array}{} \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{S}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{S}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{E}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{U}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{G}} \\ \end{array} &\begin{array}{c|ccccccccccccccccccccccccccc} &1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20 \\ \hline 1 & \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 2 & \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 3 & \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 4 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 5 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 6 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 7 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 8 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 9 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 10 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 11 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 12 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 13 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 14 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 15 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 16 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 17 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}\\ 18 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}& \frac{1}{400}\\ 19 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}& \frac{1}{400}\\ 20 & \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \frac{1}{400}& \color{red}{ \frac{1}{400}}\\ \end{array}\end{array}}$$

### More general

If the guesses do not have equal $${1}/{20}$$ probability for each number, but instead values $$p_i$$ then the 400 possibilities would not be all with probability $$(1/20)\cdot(1/20)={1}/{400}$$, but instead $${p_i}/{20}$$.

The concept is not different however. The answer boils down again to the sum of the diagonal and is $$\sum_{i=1}^{20} \frac{p_i}{20} = \frac{1}{20} \sum_{i=1}^{20} p_i = \frac{1}{20}$$.

$$\small{ \begin{array}{rc} & \text{OUTCOME}\\ \begin{array}{} \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{S}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{S}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{E}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{U}} \\ \require{HTML} \style{display: inline-block; transform: rotate(270deg)}{\text{G}} \\ \end{array} &\begin{array}{c|ccccccccccccccccccccccccccc} &1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20 \\ \hline 1& \color{red}{ \frac{p_{1}}{20}}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}& \frac{p_{1}}{20}\\2& \frac{p_{2}}{20}& \color{red}{ \frac{p_{2}}{20}}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}& \frac{p_{2}}{20}\\3& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \color{red}{ \frac{p_{3}}{20}}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}& \frac{p_{3}}{20}\\4& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \color{red}{ \frac{p_{4}}{20}}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}& \frac{p_{4}}{20}\\5& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \color{red}{ \frac{p_{5}}{20}}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}& \frac{p_{5}}{20}\\6& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \color{red}{ \frac{p_{6}}{20}}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}& \frac{p_{6}}{20}\\7& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \color{red}{ \frac{p_{7}}{20}}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}& \frac{p_{7}}{20}\\8& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \color{red}{ \frac{p_{8}}{20}}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}& \frac{p_{8}}{20}\\9& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \color{red}{ \frac{p_{9}}{20}}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}& \frac{p_{9}}{20}\\10& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \color{red}{ \frac{p_{10}}{20}}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}& \frac{p_{10}}{20}\\11& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \color{red}{ \frac{p_{11}}{20}}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}& \frac{p_{11}}{20}\\12& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \color{red}{ \frac{p_{12}}{20}}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}& \frac{p_{12}}{20}\\13& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \color{red}{ \frac{p_{13}}{20}}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}& \frac{p_{13}}{20}\\14& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \color{red}{ \frac{p_{14}}{20}}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}& \frac{p_{14}}{20}\\15& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \color{red}{ \frac{p_{15}}{20}}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}& \frac{p_{15}}{20}\\16& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \color{red}{ \frac{p_{16}}{20}}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}& \frac{p_{16}}{20}\\17& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \color{red}{ \frac{p_{17}}{20}}& \frac{p_{17}}{20}& \frac{p_{17}}{20}& \frac{p_{17}}{20}\\18& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \frac{p_{18}}{20}& \color{red}{ \frac{p_{18}}{20}}& \frac{p_{18}}{20}& \frac{p_{18}}{20}\\19& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \frac{p_{19}}{20}& \color{red}{ \frac{p_{19}}{20}}& \frac{p_{19}}{20}\\20& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \frac{p_{20}}{20}& \color{red}{ \frac{p_{20}}{20}}\\ \end{array}\end{array}}$$

More interesting is the case when both probabilities, for the guess and for the outcome, are not uniform (not equal probabilities). For instance, we could imagine rolling an unfair d20 two times. Then the probability will be equal to the expectation $$E[p_i] = \sum_{i=1}^{20} p_i^2$$. This will be larger than $$\frac{1}{20}$$ if the $$p_i$$ are unequal.

• That's a very well visualized answer that I think makes it the most easy to understand.
– Tom
Commented Nov 4, 2021 at 11:06
• +1 Super nice. Often the best response shows why the erroneous solution is sort of close to, or part of, the correct solution. Commented Nov 4, 2021 at 15:20
• Can we just appreciate the TeX effort that went into this? Commented Nov 4, 2021 at 17:45
• @KevinArlin the MathJax only deals with limited LaTeX. For instance, it does not use colspan nor rotatebox. Commented Nov 5, 2021 at 5:14
• @fblundun you are right that this answer relies on the assumption that all numbers are equally probable. (I assumed that the D&D character is "guessing" by rolling a fair die.) We could indeed generalize it by having the guesses for the numbers not equally probable. But that is not necessary to explain the culprit of the logic that leads to the $\frac{1}{400}$ probability which was the singling out of a single outcome with a specific number being doubled. Commented Nov 5, 2021 at 8:58

Let's simulate it!

set.seed(2021)
R <- 10000
d <- 20
guess <- sample(seq(1, d, 1), R, replace = T)
roll <- sample(seq(1, d, 1), R, replace = T)
length(which(guess == roll))/R


I get that about $$1/20$$ $$(486/10000)$$ times my guess match the roll. If you chop off the last digit of the seed and run the code with set.seed(202), I get exactly $$5\%$$. With next year's seed of 2022, I get $$4.99\%$$.

In more mathematical terms, this is the difference between the probability of rolling a number AND guessing that number (probably not what interests you) versus rolling a number GIVEN your guess. Assuming the roll and guess are independent...

$$P(Roll = n) = 1/20\\ P(Guess = n) = 1/20\\ P(Roll = n \text{ AND } Guess = n) = 1/400\\ P(Roll = n \vert Guess = n) = \dfrac{P(Roll = n \text{ AND } Guess = n)}{P(Guess = n)} = \dfrac{1/400}{1/20} = 1/20$$

EDIT

If you don’t have equal probability of each number, the calculation can be modified. I’ll do the case where the human is not necessarily good at picking numbers with uniform probability of each number. Again, assume independence of the guess and the roll.

$$P(Roll = n) = 1/20\\ P(Guess = n) = p\\ P(Roll = n \text{ AND } Guess = n) = p/20\\ P(Roll = n \vert Guess = n) = \dfrac{P(Roll = n \text{ AND } Guess = n)}{P(Guess = n)} = \dfrac{p/20}{p} = 1/20$$

If also the d20 is not fair:

$$P(Roll = n) = p_1\\ P(Guess = n) = p_2\\ P(Roll = n \text{ AND } Guess = n) = p_1p_2\\ P(Roll = n \vert Guess = n) = \dfrac{P(Roll = n \text{ AND } Guess = n)}{P(Guess = n)} = \dfrac{p_1p_2}{p_2} = p_1$$

So it only depends on the probability of rolling a particular number.

• Thank you, this was very helpful in understanding the problem. It makes a lot more sense looking at the probability given some number was picked. Next session we have, I will show your answer lol Commented Nov 3, 2021 at 19:16
• Enlightenment through volume of computation 👍 Commented Nov 5, 2021 at 9:25

I don't think any of the existing answers explicitly state why the answer is 1 in 20 even if the friend is not equally likely to guess all 20 numbers (they aren't - humans are not good random number generators, and the friend might not even be trying to guess randomly).

For each possible roll $$i$$, let $$p_i$$ be the probability of your friend guessing $$i$$. We know that these probabilities must sum to 1: $$\sum_{i=1}^{20}p_i = 1$$

Then the probability of the friend guessing correctly is:

$$\sum_{i=1}^{20} P(\text{friend guesses } i)P(\text{roll }i) = \sum_{i=1}^{20}p_i \frac{1}{20} = \frac{1}{20}\sum_{i=1}^{20}p_i = \frac{1}{20}$$

• Your answer is fine. Indeed humans are not good random generators, but actually that is no issue here. A D20 is a good random generator and that's enough. The answer of Gregor on this is IMV the best. Commented Oct 5, 2022 at 7:31

Your friend is confusing the situation where both players roll the same specific number (which would give you 1/400) vs the situation you are in where they have to roll the same number but it could be any number (1/20). I suppose your confusion is that you have to roll the specific number your friend guessed but, which makes it seem like the first situation I described, however the difference is that your guess could have been any number.

• I don't think its correct to say "there is no randomness in your friends guess" The answer is still 1/20 even if his friend chose his number randomly (eg via another d20 roll). See the other answers Commented Nov 3, 2021 at 19:54
• Yes I meant that there is no randomness in that whatever the outcome of his friends guess (whether it be from another die roll or they picked a number) that number is a fixed quantity that we are trying to match. Was trying to distinguish it from the scenario where you are both trying to meet a defined number prior to the roll (which would lead you to 1/400). Poor wording maybe Commented Nov 3, 2021 at 20:52

Yes for any specific number $$1,\ldots,20$$ the probability that your friend selects that number and the dice rolls it is 1/400, but you must marginalize over all possible options:

If $$X\sim \text{Unif}(1,\ldots,20)$$, $$Y\sim \text{Unif}(1,\ldots,20)$$, Let $$Z=X-Y$$ then

\begin{align*} \text{P}(\text{predict roll}) &= \text{P}(Z=0)\\ &= \sum_{y=1}^{20} P(X=0+y)P(Y=y) &&\text{convolution formula for sums of random variables}\\ &= \sum_{y=1}^{20} \tfrac{1}{20}\tfrac{1}{20}\\ &= \tfrac{1}{20} \end{align*}

And by simulation

tmp <- data.frame(x=sample(1:20, size=100000, replace=TRUE ), y=sample(1:20, size=100000, replace=TRUE ))
> mean(tmp$$x == tmp$$y)
[1] 0.0497

• Looking at is as a sum of compound probabilities of every outcome actually makes a lot of sense. Will show them your explanation at our next session :) Commented Nov 3, 2021 at 19:18
• @TheguyWhatguys I'd suggest fblundun's explanation - it does the same thing, but without the assumption that the guess X is uniform. As long as the guess doesn't go outside the 1:20 bounds, the distribution of X doesn't matter. Commented Nov 4, 2021 at 13:21
• Agreed, great extension Commented Nov 4, 2021 at 14:04

In more layman's terms, I would describe it like this:

Let's say the friend guesses 20--take that as a given. Now we roll the die, what's the chance that a d20 roll is 20? 1/20 = 5%.

Okay, now let's say the friend guesses 19. In this case, what's the chance that a d20 roll is 19? 1/20 = 5%.

What if the friend guesses 18? 1/20 = 5%.

Et cetera.

In every case, from guess = 1 up to guess = 20, the probability of the die roll equaling the guess is 1/20 = 5%. The guess doesn't matter at all (as long as it falls between 1 and 20, clearly a guess of 42 has a 0% chance of being correct). Whatever the guess, whether the process for generating the guess is random, bad human-approximation of random, fixed, or anything else, as long as the guess is between 1 and 20, the probability of the roll matching the guess is 1/20.

Mathematically, this is shown rigorously in @fblundun's answer - I'm trying to explain that math in an accessible way.

• Yes, I think this is the clearest way to look at it, at least for a non-statistician such as the OP. No matter which number between 1 and 20 is guessed, there is a 1/20 chance that a roll of a fair d20 will result in that number. Therefore, the likelihood that the player guesses any particular number does not factor in. Commented Nov 5, 2021 at 17:21
• You speak of "layman's terms" and refer to the answer of @fblundun for making it rigorous. I sincerely disagree. This is definitely the best way to look at it (what is the probability that a D20 throw results in some fixed number in set $[20]$?...$\frac1{20}$ of course!). Correct and concise. Its rigor cannot be improved. It is a shortcut of the answer of fblundun. Commented Oct 5, 2022 at 7:20

Instead of a die roll, let's look at a coin flip. I guess whether the coin will land on heads or tails, and then you flip the coin.

There are four possible guess+outcome combinations:

1. I guess heads, and the coin lands on heads.
2. I guess heads, and the coin lands on tails.
3. I guess tails, and the coin lands on heads.
4. I guess tails, and the coin lands on tails.

Assuming that my guesses themselves are truly random—i.e. I am no more likely to guess any particular option than I am to guess any other*—then the probability that any particular guess+outcome combination will occur is (1/2)(1/2) = 1/4.

Now, any particular guess+outcome combination can be classified as either a "correct guess", meaning that the guess and the outcome match, or an "incorrect guess", meaning they do not match. The probability that a correct-guess combination will occur is computed by looking at each possible correct-guess combination, finding the probability that that particular combination will occur, and then summing those probabilities together. So in this case, the probability of a correct guess is (1/4)+(1/4) = 1/2.

This makes intuitive sense. We all know that our chances of guessing a coin flip are 50/50; if they were 25/75, we would never agree to a coin flip in the first place.

Your friend's die roll may be based on 1-in-20 odds instead of 1-in-2 odds, but the same logic applies. If your friend guesses randomly,* the probablility of any particular guess+outcome combination occurring is (1/20)(1/20) = 1/400. But since there are 20 possible correct-guess combinations (guess 1 + outcome 1, guess 2 + outcome 2, ..., guess 20 + outcome 20), the probability of a correct guess is (1/400)+(1/400)+...+(1/400) = 20/400 = 1/20.

*In real life, human beings do not guess randomly. When you ask people to pick a number between 1 and 10, they are more likely to pick 7 than 6 or 8. That complicates the math for determining the probability of any particular guess+outcome combination. But as long as the outcome (coin/die/whatever) remains random, the probability of a correct guess will not change, because the higher probability of certain guesses will be offset by the lower probability of the other guesses. fblundun's answer does a better job of describing this.

Your another friend is arguing that:

1. Guessing the roll; and
2. Rolling the roll.

Are independent events. But that's not what you are measuring. You a measuring:

• Only the matching (of guest and roll has the same value).

There is one guest and 20 possible roll outcomes. So a chance of 1/20.

The probability of your friend correctly predicting the outcome of the roll was 1 in 20.

The probability of your friend correctly predicting that that specific number would be the outcome of the roll was 1 in 400.

Let's say the friend predicted it would be a 20. If you'd have been equally impressed if he'd predicted it would be a 4, then you're in the first situation (1/20). If you don't care about a correct prediction unless it was a 20, you're in the second situation (1/400).

Put another way, suppose you were watching your friend from behind a glass window, and you knew he was going to try to call the roll. If you said, "he will correctly predict the outcome of the roll" you'd have a 1 in 20 chance of being right. If you said, "he will correctly predict that he will roll a perfect 20" you'd have a 1 in 400 chance of being right.

• But there's no reason to believe that the friend guesses each number with probability 1/20. So we can't conclude that the probability of the friend correctly predicting a roll of 20 is 1/400. Commented Nov 4, 2021 at 22:31
• I took that assumption as implicit in the question, but you're right that your answer shows how it can be true without that. Commented Nov 4, 2021 at 23:20

What is the chance a D20 lands on 20? 5%.

What is the chance a D20 lands on 7? 5%.

What is the chance a D20 lands on [whatever number your friend named]? 5%.

No matter how you select a specific number from 1-20, a D20 has a 5% chance of matching it. Any particular number is always 5% likely, regardless of whether your friend chooses that number or not.

• This seems basically the same as my answer? Commented Nov 4, 2021 at 14:28

the probability of him randomly guessing a number and then rolling it were both 1 in 20 so the compound probability is 1 in 400.

The probability of your friend guessing a number is not 1/20, the probability is 1. Unless there is a chance he would fail to guess anything or a chance he would guess something not on the D20.

So the formula for your friend guessing the correct outcome of the roll is:

1 * 1/20

or 1/20

Now, the odds of you guessing what your friend is going to guess and then that guess being correct, that would be 1/400. But that doesn't appear to be the situation.

Friend 1 and Friend 2 are referring to distinct questions about probabilities of outcomes.

Friend 1 is considering the probability of rolling a specific value, which is $$P(S=s) = \frac{1}{20}$$.

Friend 2 is considering the joint probability of rolling a d20 and it's outcome matching a randomly-selected guess. We don't really know that the distribution of human guesses is uniform, however this is consistent with Friend 2's claim. We might consider that $$P(A \land B) = P(B|A)P(A)$$ which is equivalent to $$P(A \land B) = P(B)P(A)$$ under the assumption of mutual independence (that is, the roll outcome is independent of the guess). In such a case as our unfiform number-guess and fair d20, would have $$P(A \land B) = \left(\frac{1}{20}\right)^2 = \frac{1}{400}$$.

They both 'characterize the situation', but they are different questions about the situation.