This is a very good question:
How to simulate the odds of an outcome by rolling dice. If one-in-ten, throw a d10. If one-in-500, throw a few dice, such that the s/r for every die multiplied together = 500. Here, r = # acceptable die results and s = # of sides. So in this example, 20/1*20/1*20/16 = 500.
This approach fails as an exact method when the # for the one-in-# odds you're trying to simulate is prime (cannot be represented as a product of smaller positive integers), and > 20.
Why? Quick proof: For n dice,
let the product of s1/r1*s2/r2*...*sn/rn = S/R. S and R must both be positive integers since we're talking dice here. Now require that S/R = target prime number. Then S = R*(target prime number).
Forget about what R meant originally (the product of acceptable rolls for all dice rolled)--just know that it's a positive integer. Do recall what S means: the product of die-#-of-sides, for all dice rolled. But we're saying here that S has factors of R and the target prime number. R has more factors beyond r1, r2, ... rn, unless these are all prime.
The target prime #, however, cannot be factored further by definition. And since the target prime >20, it cannot be represented as a D&D die. Ergo, you'd need to roll at least one die with the target prime number of sides to simulate your odds.
In other words, for a 1-in-47, you really would need to roll at least one d47.
Harder to prove, but still true (I think), is that the requirement of target prime > 20 is too stringent. Really, it only needs to be greater than 5, the highest prime factor of #-of-sides among the D&D dice: d20, d12, d10, d8, d6, & d4.
This can be extended to cases where the odds against (not in the true parlance of odds, where 1:47 means 1/48) are multiples of non-prime and prime number(s), where at least one prime is not a factor of 20, 12, 10, 8, 6, or 4.
However, rolling a 1-in-47 can be
approximated with D&D dice, and I suspect this is what shurai means by "simulated". Furthermore any good random # generator can get at this very simply. (Of course, there is no such thing as a perfect random # generator--but then, are the dice we roll perfect either?)
Details.
What's a little harder is this:
Really there are two outcomes for a 1 in 500 odds roll. Either you make your 1, or you don't. Success=1st outcome. Failure=2nd outcome. There are of course many more ways of failing.
But what if the odds are slightly better? Say, 3 in 500? Three is not a factor of 500, so the simplest expression of this ratio is 3/500 (or 3:497). How do you simulate that with dice?
Answer: the solution must satisfy s1/r1*s2/r2*...*sn/rn = 500/3
Is this correct? Seems so. One solution:
If you roll a 1 with d20, roll again. If 6 or less, roll again. If 8 or less, congratulations, you just made a lucky 3 in 500 shot.
20/1*20/6*20/8 = 500/3.
Lastly, I'll link a somewhat related thread because it was so satisfying. In it the question is asked: what is the probability of rolling a certain outcome (sum of dice), from n dice with s sides? Or more generally, an outcome from n1 dice with s1 sides + n2 dice with s2 sides + ...
Yikes.
probability of dice