What is the probability that the product of the digits is odd?

  • Context: Undergrad 
  • Thread starter Thread starter littlemathquark
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary

Discussion Overview

The discussion revolves around the probability that the product of the digits of a natural number is odd. Participants explore different approaches to calculating this probability, considering various cases based on the number of digits and the inclusion of zero as an even digit.

Discussion Character

  • Exploratory
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants present two solutions for calculating the probability, one based on counting natural numbers with all odd digits and the other based on the inverse powers of 2.
  • One participant argues that there is no uniform distribution of natural numbers, suggesting that the proportion of numbers with all odd digits approaches zero as the set of natural numbers increases.
  • Another participant states that the probability is zero, indicating a strong belief in this outcome.
  • There is confusion regarding the probabilities calculated for one-digit numbers, with one solution yielding 5/9 and another yielding 1/2, leading to questions about which is correct.
  • Some participants note the potential miscounting of zero in the first solution and its implications for the second solution's calculations.
  • A new question is raised about the probability that the product of digits in selected positions of a randomly chosen n-digit natural number is odd, prompting further exploration of the topic.
  • Participants discuss the implications of including zero in the digit count, questioning whether a product that includes zero is considered even or odd.

Areas of Agreement / Disagreement

Participants express uncertainty about the correctness of the proposed solutions, with no consensus reached on which approach is valid. Multiple competing views remain regarding the treatment of zero and the calculation of probabilities.

Contextual Notes

Limitations include the assumptions made about the distribution of natural numbers and the treatment of zero as an even digit, which affect the calculations presented.

littlemathquark
Messages
204
Reaction score
26
TL;DR
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.
 
  • Like
Likes   Reactions: apostolosdt
Physics news on Phys.org
littlemathquark said:
First solution:
There is an infinite number of natural numbers.
There is no uniform distribution on the natural numbers. It's only possible on a finite subset.

The best you can do is to take the limit as ##N \to \infty## for a subset of ##N## natural numbers. In this case, it's pretty clear that the proportion of natural numbers with all odd digits goes to zero as ##N \to \infty##.
 
Last edited:
  • Like
Likes   Reactions: fresh_42
The probability is zero.
 
littlemathquark said:
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 no idea which solution correct. Both of them seem correct to me.
They are both correct.
 
But one of them p(1)=5/9 but for other solution(second) p(1)=1/2.which is correct?
 
littlemathquark said:
But one of them p(1)=5/9 but for other solution(second) p(1)=1/2.which is correct?
Maybe in the first case you didn't count zero as an even number and the second case you did
 
  • Like
Likes   Reactions: Dale and Gavran
Hornbein said:
Maybe in the first case you didn't count zero as an even number and the second case you did
And not only ## 0 ##.
In the second solution the original poster has included ## 00 ## into 2-digit natural numbers, ## 000 ## into 3-digit natural numbers, ## 0000 ## into 4-digit natural numbers and so on, and that is wrong.
 
What is the probability that the product of the digits in any k selected positions of a randomly chosen n-digit natural number is odd?
What about this question? Are solution the same?
 
  • #10
littlemathquark said:
What is the probability that the product of the digits in any k selected positions of a randomly chosen n-digit natural number is odd?
What about this question? Are solution the same?
That's just slightly tricky in that an n-digit number has a first digit that is randomly 1-9 and n-1 digits that are randomly 0-9.

You could calculate the two cases where the first digit is or is not in the k digits separately.
 
  • Like
Likes   Reactions: jbriggs444
  • #11
The digits that make a number even are 2,4,6,8. So 6 of the digits will keep the product odd.

0.6^(n-1)*5/9 = 0.6^n * 25/27
 
  • #12
Hornbein said:
The digits that make a number even are 2,4,6,8. So 6 of the digits will keep the product odd.

0.6^(n-1)*5/9 = 0.6^n * 25/27
On second thought, if any one of the digits is zero then the product is zero. Is that even or odd?
 
  • #13
Hornbein said:
On second thought, if any one of the digits is zero then the product is zero. Is that even or odd?
Zero is even.
 
  • Like
Likes   Reactions: Gavran
  • #14
PeroK said:
That's just slightly tricky in that an n-digit number has a first digit that is randomly 1-9 and n-1 digits that are randomly 0-9.

You could calculate the two cases where the first digit is or is not in the k digits separately.
Can you give a solution? I can not solve fully.
 

Similar threads

Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
719
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K