1

I've thought about this problem the following way. If this was represented by 3 dials which have number 0-9 in them ([0-9][0-9][0-9]) then the chance of hitting 9 in one of them is 1/10. Since there are 3 dials it's 3 * 1/10 = 3/10.

Hence the number of whole numbers between 0-999 having having the digit 9 is 999 * 0.3 = 299.7 (or 300).

Have I done a mistake in my way of calculation and way I've visualised the problem? And why does it result in a number which isn't whole (299.7)?

StubbornAtom
  • 17,052
  • It is not correct. Try computing the complementary probability: the chance that the digit 9 does not appear. – nejimban Aug 29 '21 at 17:21
  • @nejimban is this different to the problem here? https://math.stackexchange.com/questions/2051210/1-999-inclusive-how-many-written-between-1-999 – Dasith Wijes Aug 30 '21 at 03:55

1 Answers1

2

Let us first calculate number of whole numbers from 1 to 999 , which don't have the '9'.

This is given by (9 times 9 times 9)-1 =728.

Therefore ,number of whole numbers which do have 9 in them is given by , 999-728= 271.

Therefore , the probability of getting a whole number from 1 to 999 which does have '9' is given by $\frac{271}{999}=0.271$

Sukhoi234
  • 550
  • Thanks @sukhoi234. Does this mean there are only 271 whole numbers between 0-999 that have the number 9 in them? According to this method there are 300 numbers with 9 in them https://www.reddit.com/r/IndiaSpeaks/comments/ibeuun/how_many_times_digit_9_comes_between_100_and_999/ – Dasith Wijes Aug 30 '21 at 03:54
  • 2
    There are 300 total occurrences of 9 in this pile of numbers, but some numbers include 9 more than once: 27 numbers contain two 9s, and one - 999 - contains three – Dan Uznanski Aug 30 '21 at 07:28
  • @DanUznanski thanks I think I understand it now. – Dasith Wijes Aug 30 '21 at 07:41
  • Yes. 243 numbers contain exactly one 9; 27 numbers contain exactly two; one number contains exactly three. If we want to recover the number of 9s total we could do $243 + 27\cdot2 + 1\cdot3$. Or i suppose $271+27\cdot1+1\cdot2$, counting all of them and then adding on the excess – Dan Uznanski Aug 30 '21 at 07:48