Probability [Sum of digits is even for a random number]

4.9k Views Asked by At

A number of 6 digit numbers is written down at random. Probability that the sum of the digits is an even number is? Please answer with explanation.

5

There are 5 best solutions below

3
On BEST ANSWER

The result is independent of whether the first digit has to be zero or not. By the same logic as my answer here, the answer is immediately seen to be $\frac12$.

9
On

Hint: Note down all the cases where a $6$ digit number can have its sum of digits even.

$1.$ All $6$ digits even: Is this possible? Yes. With repetition.

$2.$ $4$ digits even($2$ digits odd): Is this possible? Yes. With/Without repetition.

$3.$ $2$ digits even($4$ digits odd): Is this possible? Yes. Yes. With/Without repetition.

$4.$ $6$ digits odd. Is this possible? Yes. With repetition.

6
On

Let $p_n $ be the probability that an $n$-digit number has even parity.

We see that $p_1 = {1 \over 2}$.

Suppose we are given an $n$ digit number and add one digit. Then there are two ways the $n+1$ digit number can have even parity: (1) The $n$ digit number has even parity and the new digit is even, and (2) the $n$ digit number has odd parity and the new digit is odd.

Then $p_{n+1} = {1 \over 2} p_n + {1 \over 2} (1- p_n) = { 1 \over 2}$.

2
On

Hint: think of choosing the first five digits, then the last digit. If the sum of the first five digits is odd, the sixth digit has to be odd to make the sum of all six even. What is the chance of this? If the sum of the first five is even,....

0
On

Let $p$ be the probability that the sum of the first (leftmost) five digits is even. Then the probability that the sum of the first five digits is odd is $1-p$.

Now let us find the probability that the sum of all the digits is even. This can happen in two disjoint ways: (i) The sum of the first five is even, and the last is even or (ii) the sum of the first five is odd, and the last is odd.

The probability of (i) is $(p)(1/2)$. The probability of (ii) is $(1-p)(1/2)$. Add. We get $1/2$.

Remark: There is more "bijective" way of seeing this. Let $E$ be the set of numbers with even digit sum, and $O$ the set of numbers with odd digit sum.

If $e$ is a digit string in $E$, let $\varphi(e)$ be the digit string obtained by replacing the last digit of $e$ by $9$ minus the last digit of $e$.

Then $\varphi(e)$ has odd digit sum, and all numbers in $O$ can be obtained in this way. It follows that $E$ and $O$ have the same size.