- #1
littlemathquark
- 44
- 11
- TL;DR Summary
- What is the probability that the product of the digits in any selected positions of a randomly chosen digit natural number is odd?
I have two solutions, but I have no idea which solution correct. Both of them seem correct to me. Help please.
First solution:
There is an infinite number of natural numbers.
Product of digits is odd only if all digits in number are odd.
Counting natural numbers with all odd digits:
1-digit: 5
2-digit: 5*5
3-digit: 5*5*5
4-digit: 5*5*5*5=5^4
…
n-digit: 5^n
If we want probability for natural numbers up to n-digits:
Total number of odd-product numbers is :
5+5^2+5^3+…+5^n=5*(1+5+5^2+…+5^(n-1))=5*(5^n-1)/(5–1)=5/4*(5^n-1)
p(n)=5/4*(5^n-1)/(10^n-1)
If n is going to the infinity p(n) is going to 0.
Second solution:
Depends on the length of the digit string.
The more digits there are in a number, the greater the probability that at least one of them is even. If any of them are even, the product is even.
So really the question reduces to the probability that all the digits are odd, and that’s just inverse powers of 2…
1 digit: 1/2 = 50%
2 digits: 1/(2²) = 25%
3 digits: 1/(2³) = 12.5%
and so on.
First solution:
There is an infinite number of natural numbers.
Product of digits is odd only if all digits in number are odd.
Counting natural numbers with all odd digits:
1-digit: 5
2-digit: 5*5
3-digit: 5*5*5
4-digit: 5*5*5*5=5^4
…
n-digit: 5^n
If we want probability for natural numbers up to n-digits:
Total number of odd-product numbers is :
5+5^2+5^3+…+5^n=5*(1+5+5^2+…+5^(n-1))=5*(5^n-1)/(5–1)=5/4*(5^n-1)
p(n)=5/4*(5^n-1)/(10^n-1)
If n is going to the infinity p(n) is going to 0.
Second solution:
Depends on the length of the digit string.
The more digits there are in a number, the greater the probability that at least one of them is even. If any of them are even, the product is even.
So really the question reduces to the probability that all the digits are odd, and that’s just inverse powers of 2…
1 digit: 1/2 = 50%
2 digits: 1/(2²) = 25%
3 digits: 1/(2³) = 12.5%
and so on.