I'm having an argument with a colleague about the probability of a 4 digit number. The assumption is that the number is randomly and independently created.

Assume the probability of generating the number 4109.

Now, my colleague reckons that it's a simple P(4109) = 1/10 * 1/10 * 1/10 * 1/10. (a bit like simply tossing a coin).

But I'm not interested in the probability of generating the numbers 0149, 9014, 4910 etc etc.

Obviously the probability of that specific sequence, 4109 is a probability found by calculating the permutation, not simple combination....

Please confirm my believe or point me to some proper material to support this?

  • 3
    $\begingroup$ The probabiliy of generating the number 4109 if we are generating all possible combinations of 4 digit numbers is $1/10^4$, since there is exactly 1 such number out of all the combinations. Was that the qeustion? $\endgroup$ – user2974951 Oct 17 '18 at 7:20
  • 3
    $\begingroup$ @user2974951: It looks like you're using the term "combinations" where you actually mean "permutations". This is a little confusing, especially in the context of this particular question. $\endgroup$ – Ruben van Bergen Oct 17 '18 at 7:46
  • $\begingroup$ So technically, 1/10^4 is the permutation, and not a combination? $\endgroup$ – amateurjustin Oct 17 '18 at 7:48
  • $\begingroup$ @user2974951 Your insight also does not apply if the numbering system is not base 10 (e.g., is hexadecimal 410A a valid number?). The question is vague about important assumptions like this. $\endgroup$ – Alexis Oct 17 '18 at 18:34
  • $\begingroup$ To be a little pedantic: there is not enough information here to answer the question. It sounds like you are asking about a number chosen from a uniform random distribution (0 to 9999). There are many naive ways of generating a 4-digit number that will introduce bias (which might be catastrophic). Also be sure you're not actually asking about the probability of a collision (birthday paradox). $\endgroup$ – jberryman Oct 17 '18 at 20:03

Your colleague is right. If your digits are randomly and independently selected (assuming equal likelihood for each digit), the chance that your number is 4109 is nothing more complicated than:

  • the chance that the first digit is 4

  • the chance that the second digit is 1

  • the chance that the third digit is 0

  • the chance that the fourth digit is 9

all multiplied together. That's $(1/10)^4$, as your colleague says. Where would permutations come into it?

You said in the question that you're "not interested in the probability of generating the numbers 0149, 9014, 4910 etc etc", i.e. the set of all 4-digit numbers where the digits are 0,1,4,9 in any order, but that isn't what $(1/10) ^ 4$ tells you - to calculate that you'd need:

  • the probability that the first digit is 0,1,4, or 9 = 4/10

  • the probability that the second digit is one of the three not yet selected = 3/10

  • the probability that the third digit is one of the two not yet selected = 2/10

  • the probability that the final digit is the remaining one from the set of 0,1,4,9 = 1/10

i.e. $\prod_{i=1}^{4} \frac{i}{10}$

You could then worry about permutations to pick 4109 specifically, but this is needless complication in comparison the way your colleague said.


Your colleague is correct. Think of it this way: there are 10,000 ($10^4$) 4-digit numbers: 0000-9999. Your target number is one of those 10,000. Thus, if you picked a 4-digit number randomly, you'd have a one in 10,000 chance of picking that number (or any other specific 4-digit number).

You're right that what you want to calculate here is a permutation, not a "simple" (as you called it) combination. But permutations are actually simpler to calculate than combinations. In a permutation, you're essentially just counting all possible outcomes. In a combination, you additionally have to calculate how many of those outcomes are the same combination of elements in a different order, and then adjust your calculation for that.


It's very simple. In 4 decimal digits there are 10,000 (0000 to 9999) possible values. The odds of any one of them coming up randomly is one in 10,000.


A specific "4 digit number" would have 1/9000 chance, since there are 9000 4 digit numbers (1000-9999). Another way to look at this would be to choose the first digit (9 options: 1-9), then the second digit (10 options: 0-9), etc so you get 9*10*10*10 = 9000 options, you can multiply the options like this in this scenario because ceach combination of the option is a different valid results and all valid result can be created by such combination.

Same argument if you want to consider "0421" a "4 digit number", except the answer will be 1/10000


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.