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?

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.
