I just built a lock for a door in Minecraft. The user has to pick the correct four colors out of twelve. Order doesn't matter. What is the probability of the user guessing the correct colors?
Hence, the probability of guessing the combination is: 4/12 × 3/11 × 2/10 × 1/9 = 495-1.
In other words, there are 495 different combinations, of which one is correct.
Obviously, all of this is useless, unless you are working on a exploration mode map. It's much faster to just take a pick and destroy your door.
Use the Choose function. You have 12 items, from which you can choose 4 and the order of those chosen 4 does not matter. This means you want to calculate 12 choose 4.
n choose k = n! / (k! * (n - k)!)
So, you have 12!/(4!8!) = 495 different choices, giving you a probability of choosing the one correct answer 1/495 = .00202... = 0.2%