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?

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:

*

*I guess heads, and the coin lands on heads.

*I guess heads, and the coin lands on tails.

*I guess tails, and the coin lands on heads.

*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.
