So I first thought to approach this as the complement of an inclusion exclusion problem, $P(A_{1}\cap A_{2}\cap A_{3})=1-P(A_{1}\cup A_{2}\cup A_{3})$ Where $A_{i}$ is the event that digit i appears in the decimal string. I know how to evaluate this using inclusion exclusion. But I thought that this solution would also work:

$P(A_{1}\cap A_{2}\cap A_{3})={m\choose 3}\frac{1}{10^3}$. The number of ways of picking 3 out of m events weighted by the probability that these occur.

However, plugging in m=3 my answer is off by a factor of 3! Where am I going wrong?

  • $\begingroup$ The formula you used should be with the chosen digit $i$ absent $\endgroup$ – true blue anil May 1 '16 at 2:44

The clue is that you are off by 3! which is the number of ways to arrange 3 objects...

To flesh this out: Consider when $m=3$, you get $ 3 \choose 3$$ (1/10^3)$ =$1/1000$ but you know that there are 6 ways - namely every possible combination of 123 (123, 132, 213, 231, 321, 312).

What your formula is giving is the probability that 1,2 and 3 appear in one particular order, but since the digits 1,2,3 can appear in any order, you have to multiply by 3!. I'd write this as $ \frac{m!}{(m-3)!10^m}$ or $ \frac{m(m-1)(m-2)}{10^m}$ but that's because I don't like the choose function.

Note that the last form gives an indication as to the how many choices you have left...

  • $\begingroup$ would it be correct to say that we don't divide by $3!$ since these objects are different and order matters? $\endgroup$ – qbert May 1 '16 at 1:24
  • $\begingroup$ Precisely - it counts 1230 and 1320 as the same thing, when clearly they are not. $\endgroup$ – Dan Barry May 1 '16 at 1:29
  • $\begingroup$ got it. serves me right for using the choose function without thinking about what it means. $\endgroup$ – qbert May 1 '16 at 1:31
  • $\begingroup$ With this all being said, I'm not convinced by the correctness of the formula - I feel like mine give probability that's too low, as if I'm forgetting about another factor. $\endgroup$ – Dan Barry May 1 '16 at 1:56
  • $\begingroup$ I'm afraid it will work only for a $3$ digit number. $\endgroup$ – true blue anil May 1 '16 at 3:19

You will have to apply inclusion-exclusion in this manner:

All strings - strings with

at least one from $1,2,3$ absent + at least two of $1,2,3$ absent - all from $1,2,3$ absent

Allowing zeroes at start, it would work out as:

$10^m - \binom31 9^m + \binom32 8^m - 7^m$


Oh, you wanted the probability, so , of course, you'd have to divide by $10^m$

  • 1
    $\begingroup$ The other formula worked for $m=3$ because the only options were to include all the $3$ chosen numbers, the rest of the digits didn't figure at all. $\endgroup$ – true blue anil May 1 '16 at 2:57

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.