Probability of sum of two randomly picked numbers from a specific range

divisibilitymodular arithmeticprobabilityprobability theory

What is the probability that the sum of two randomly picked numbers from the range 1-100 (inclusive) is divisible by 5?

My approach:

For the 1st number, the probability is $$\frac{1}{100}.$$ For the 2nd number, the set is decreased by one (the 1st number we choosed) so possible outcomes are 99. For the favourable outcomes part, we look for numbers that complement the 1st selected number so their sum (module 5) = 0. Since there are 20 numbers that are divisible by 5 in the mentioned range, probability is $$\frac{20}{99}.$$ Combining gives $$\frac{20}{100\times99}.$$

Is my answer correct?

Best Answer

Actually. it is as follows:

Lets consider instead the remainder modulo 5 of the numbers 1 to 100, so we have 20 1's, 20 2's .. 20 4's and 20 0's.

The combination of numbers whose sum is divisible by 5 are

1 4, probability of 1 then a 4 is $\frac{20}{100} \times \frac{20}{99} $

2 3, probability of 2 then a 3 is $\frac{20}{100} \times \frac{20}{99} $

3 2, probability of 3 then a 2 is $\frac{20}{100} \times \frac{20}{99} $

4 1, probability of 4 then a 1 is $\frac{20}{100} \times \frac{20}{99} $

0 0, probability of 0 then a 0 is $\frac{20}{100} \times \frac{19}{99} $

So you have $$4 \times \left(\frac{20}{100} \times \frac{20}{99}\right) + \frac{20}{100} \times \frac{19}{99} $$

which is $$\frac{1980}{9900} = 0.2 $$

Related Question