I am practicing probability with, and without replacement and would like to try the following:

From the set of numbers {0,1,2,3,...,9}, a 4-digit number is formed (where the first digit cannot be 0). To form the 4-digit number, the numbers are drawn and written down in order (if a 0 is drawn for the first digit, the 0 is put back and a number is redrawn until a number other than 0 is drawn). Find the probability that the number is divisible by 4 with, and then without replacement.

For with replacement -

There are $9 \times 10^3 = 9000$ total possibilities for all 4 digits.

The number can be divided by 4 if the last 2 digits are a multiple of 4. So - $00, 04, 08,...,96$ (25 possibilities).

So, there are 25 possibilities for the last 2 digits, 9 for the first digit, and 10 for the second digit.

Therefore, P(divisible by 4 w/replacement) = $\frac{9 \times 10 \times 25}{9000}$

How's that look?

For without replacement -

Here, I am stuck! I'm not sure what it would look like? Any advice would be greatly appreciated.

Could it be something along the lines of:

First number $9C1$ (since 0 can't be picked); second number $9C1$ (since first number can't be picked), and for the last 2 digits $22C1$ since there are 22 possibilities that can be divisible by 4?

  • 1
    $\begingroup$ If the first digit cannot be 0, there are only $9000$ possibilities, not $10^4$. $\endgroup$ – George Law Jan 8 '17 at 20:13
  • $\begingroup$ I've just updated - thank-you. $\endgroup$ – Math1 Jan 8 '17 at 20:25
  • 1
    $\begingroup$ @Math1: Kindly correct a spelling error in title. $\endgroup$ – Tito Piezas III Jan 9 '17 at 2:50

Your computation of "with replacement" has a bit of a problem, in that you're assuming that there are $10^4$ possibilities -- but $1000$ of those are not actually possibilities, because you're explicitly specifying that the first digit cannot be $0$.

A shorter computation: "With replacement" the possible numbers are $1000$ through $9999$, and all of these $9000$ numbers are equally probable. Every fourth of them is divisible by $4$ -- no need to consider digits here, just notice that the interval from $1000$ to $9999$ contains a whole number of four-periods.

So the probability in this case should be $\dfrac14$.

Without replacement, imagine choosing the two last digits first, which can be done in $90$ ways. How you choose the two remaining digits is then immaterial. How many endings from 00 to 99 are divisible by 4 and don't repeat digits? All the 25 you know, except for 00, 44, and 88.

Actually, that may not work. We run into the problem that it is not even well-defined what it means to choose the four digits "without replacement" when the leftmost of them cannot be $0$.

We can see this clearer if we imagine choosing two digits "without replacement", where the left one must not be $0$.

If we choose the left digit first (and that is not $0$), there will be nine digit to choose from for the right digit, and $0$ is always among them -- so the probability of the right digit being $0$ is $\frac19$. On the other hand, if the choose the right digit first, all ten digits will be available at that time, so now the probability of the right digit being $0$ is only $\frac1{10}$.

You need to specify which order the digits are picked in, if you want "without replacement" at the same time as "leftmost digit must be nonzero". Otherwise it is ambiguous what the probability of picking each particular number is.

Of course you can also specify that you're choosing uniformly in a single step between all sequences of 4 diferent digits that do not start with $0$. But it seems to be hard to argue that "without replacment" is an accurate description of that procedure.

  • $\begingroup$ If there are 22 ways to get the last 2 digits (all possibilities minus 00, 44 and 88), would the first two digits not have to be $7 \times 7$ since we have to exclude the numbers we used from the last two digits (and no 0 for the first digit)? $\endgroup$ – Math1 Jan 8 '17 at 20:29
  • $\begingroup$ What the first two digits are is immaterial, because once you have selected the last two, you already know whether the final number is divisible by $4$. $\endgroup$ – hmakholm left over Monica Jan 8 '17 at 20:30
  • $\begingroup$ So, essentially 10 options for the first digit, 9 for the second, and 22 for the last two digits, or $10 \times 9 \times 22$. $\endgroup$ – Math1 Jan 8 '17 at 20:35
  • $\begingroup$ ...divided by $9000$ $\endgroup$ – Math1 Jan 8 '17 at 20:35
  • $\begingroup$ @Math1: No, the first two digits do not matter. Forget them. The two last digits alone determine whether the whole number is divisible by $4$, and $22$ of the $90$ possibilities there will lead to divisibility by $4$. $\endgroup$ – hmakholm left over Monica Jan 8 '17 at 20:50

While thinking about without replacement think like this

Out of the ten digits (0 to 9) For 1st digit: you have 9 options (excluding zero) For 2nd : you have (9-1)+1=9 options (excluding the used digit and including zero) For 3rd and 4th : Out of the 25 options you have 25-3=22 options, because 3 of them have repeating digits

So, your required probability is P(divisible by 4 without replacement) = (9×9×22)/9000=99/500

  • $\begingroup$ Should that be $9 \times 9 \times 22$? $\endgroup$ – Math1 Jan 8 '17 at 21:06
  • $\begingroup$ since the 22 options for the last 2 digits consist of 2 numbers that cannot be repeated, would the first number not have 7 options? That is, not the 2 distinct numbers used in the last 2 digits, and not 0. Then the same for the second digit (not last 2 numbers, not the first number). So instead, $7 \times 7 \times 22$? $\endgroup$ – Math1 Jan 11 '17 at 2:54

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.