Finding out probability that the last digit of a product is 5

For the last digit to be a 5:

  • all numbers must end in an odd digit $(A)$
  • at least one of the ending digits must be a 5 $(B)$

$$\mathsf P(A)=\left(\frac5{10}\right)^n$$ $$\mathsf P(B^\complement\mid A)=\left(\frac45\right)^n$$ Therefore $$\mathsf P(B\mid A)=1-\left(\frac45\right)^n$$ $$\mathsf P(A\cap B)=\left(1-\left(\frac45\right)^n\right)\left(\frac5{10}\right)^n=\left(\frac5{10}\right)^n-\left(\frac4{10}\right)^n=\frac{5^n-4^n}{10^n}$$


As Arthur said in his comment, the following conditions are necessary -

1) The unit's digit cannot be even. It has to be 1,3,5,7 or 9.

2)Atleast one of the numbers should have 5 in it's unit place.

$10^n$ gives the total cases. (Note that we are only counting the possibilities of the unit digit).

Now $5^n$ gives the total cases satisfying condition 1. From these cases, subtracting those cases which contain only 1,3,7,9 as unit digit will give the total no. of ways. (Because there has to be atleast one number with 5 in it's unit digit. All cannot be 1,3,7 or 9)

So this gives $5^n - 4^n$ as the total cases and hence the probability is $\frac{5^n - 4^n}{10^n}$


using Bayes theorem, we can find P(A) then P(B|A) in order to get P(B and A)

A = all numbers odd

B = greater than 0 of the numbers end in 5

$P(A) = (1/2)^n$

if we are given A, then the probability the last digit is 5 for any number is 1/5

$P(B|A) = 1 - (4/5)^n $

$P(B|A) = P(A \cap B) / P(A)$

$P(A \cap B) = P(B|A) P(A)$

$ = (1/2)^n(1−(4/5)^n)$

$ = (1/2)^n - (4/10)^n$

$ = (5/10)^n - (4/10)^n$

$ = (5^n - 4^n)/10^n$

Tags:

Probability