|
Author |
Message |
|
TAGS:
|
|
|
Manager
Joined: 14 Dec 2004
Posts: 119
Followers: 1
Kudos [?]:
0
[0], given: 0
|
What is the probability of selecting a number that contains [#permalink]
26 Oct 2005, 11:39
What is the probability of selecting a number that contains 5 as one of its digits for the set of integer numbers between { 1, 2, 3, .. 1,000,000}?
Thanks!
|
|
|
|
|
|
|
Manager
Joined: 17 Sep 2005
Posts: 72
Location: California
Followers: 1
Kudos [?]:
3
[0], given: 0
|
I would have preferred A/C's w/the Q.
Anyway the only pattern I see here is this:
For numbers 1-100:
we have 5, 15, 25, 35, 45, (50-59: ten of these), 65, 75, 85, 95
That's 9*(1) + 10 = 19
1-1000:
This can split into 10 groups of 100 each, and 9 of them behave the same way as the 1-100 shown above. The only exception then is 500-599 (100 of these)
Thats 9*(9*(1) + 10) + 100
Contunuing this pattern..
1-10K:
9*(groups of 1000 see above) + 1K
or 9*(9*(9*(1) + 10) + 100) + 1K
1-100K:
9*(9*(9*(9*(1) + 10) + 100) + 1K) + 10K
1-1000K or 1m:
9*(9*(9*(9*(9*(1) + 10) + 100) + 1K) + 10K) + 100K
So the probability for selecting a number that contains 5 as one of its digits is
[9*(9*(9*(9*(9*(1) + 10) + 100) + 1K) + 10K) + 100K]/1m
I only hope there's an easier way to this
|
|
|
|
|
|
VP
Joined: 22 Aug 2005
Posts: 1133
Location: CA
Followers: 1
Kudos [?]:
9
[0], given: 0
|
Well I used following method to come up with number of different numbers containing 1 or more 5s.
in 1 digit number: 1 possibility (5)
2 digit number:
x x
let first digit be 5, other can ne any single digit (0-9): 10
1 * 10
the order can be reversed:
1 * 10 * 2
we need to subtract possibility of BOTH numbers being 5 (55, this was included twice in above combinations)
so total number:
1 * 10 * 2 - 1 or
1 * 10 * 2 - 2C2
2 * 10^2 - 2C2
similarly, out of 3 digit numbers, total such numbers are:
1 * 10 * 10 * 3 - (3C2 + 3C3) or
3 * 10^3 - (3C2 + 3C3)
we can got further to 4, 5, 6 digit :
4 digits: 4 * 10^4 - (4C2 + 4C3 + 4C4)
5 digits: 5 * 10^5 - (5C2 + 5C3 + 5C4 + 5C5)
6 digits: 6 * 10^6 - (6C2 + 6C3 + 6C4 + 6C5 + 6C6)
total : 654223
p = 654223 / 1,000,001
|
|
|
|
|
|
Manager
Joined: 03 Aug 2005
Posts: 137
Followers: 1
Kudos [?]:
2
[0], given: 0
|
I did the same as mbaqst and got 0'468559
Anyway, the easiest way is (1000000-9^5)/1000000 = 0'468559
the number of numbers without a five is 9^5. The five digits can be anything but 5. Note that in this calculation we are including "00000" but as we are working with five digit numbers, we are failing to consider 1000000, therefore, we should add one (1000000) and subtract one (00000) to agree with the stem [1,1000000].
|
|
|
|
|
|
VP
Joined: 22 Aug 2005
Posts: 1133
Location: CA
Followers: 1
Kudos [?]:
9
[0], given: 0
|
jdtomatito wrote: I did the same as mbaqst and got 0'468559
Anyway, the easiest way is (1000000-9^5)/1000000 = 0'468559
the number of numbers without a five is 9^5. The five digits can be anything but 5. Note that in this calculation we are including "00000" but as we are working with five digit numbers, we are failing to consider 1000000, therefore, we should add one (1000000) and subtract one (00000) to agree with the stem [1,1000000].
can you explain bod portion please.
Are you considering ONLY 5 digit numbers?
(a) all the numbers that include 5 can be any digit 1 through 6 IMO eg. 5, 15, 35, 55, 555,525,....,555555,555557
(b) we need to go upto 6 digits (not 5)
|
|
|
|
|
|
Manager
Joined: 14 Dec 2004
Posts: 119
Followers: 1
Kudos [?]:
0
[0], given: 0
|
Sorry guys, this one is from a probability text book, that's why I couldn't give multiple choice answers. I only have the OA from the back of the book, which is:
0.469
|
|
|
|
|
|
Manager
Joined: 03 Aug 2005
Posts: 137
Followers: 1
Kudos [?]:
2
[0], given: 0
|
My mistake, I meant 9^6, anyway, the result is correct.
Ok, I'll try to explain,
We need to consider all numbers between 1 and 1000000. We know that 1000000 does not contain a 5 and that 0 does not contain a five either.
Therefore, we can safely consider all numbers between 0 and 999999 instead.
We can calculate the probability to pick one number with at least a five in it as (1 - the probability to pick a number with no fives in it).
First digit can be 012346789= 9 possibilities
Second digit can be 012346789 = 9 possibilities
And so on...
Numbers with no fives 9*9*9*9*9*9 = 9^6
Therefore P(pick a number with at least a five) = 1-(9^6/1000000)
= 0'468559 aprox. 0.469 that is the official answer.
I hope this is clearer
|
|
|
|
|
|
VP
Joined: 22 Aug 2005
Posts: 1133
Location: CA
Followers: 1
Kudos [?]:
9
[0], given: 0
|
jdtomatito wrote: My mistake, I meant 9^6, anyway, the result is correct.
Ok, I'll try to explain,
We need to consider all numbers between 1 and 1000000. We know that 1000000 does not contain a 5 and that 0 does not contain a five either. Therefore, we can safely consider all numbers between 0 and 999999 instead.
We can calculate the probability to pick one number with at least a five in it as (1 - the probability to pick a number with no fives in it).
First digit can be 012346789= 9 possibilities Second digit can be 012346789 = 9 possibilities And so on...
Numbers with no fives 9*9*9*9*9*9 = 9^6
Therefore P(pick a number with at least a five) = 1-(9^6/1000000)
= 0'468559 aprox. 0.469 that is the official answer.
I hope this is clearer
Very nice explanation. Thanks.
|
|
|
|
|
|
Manager
Joined: 17 Sep 2005
Posts: 72
Location: California
Followers: 1
Kudos [?]:
3
[0], given: 0
|
Excellent jdtomatito! Easy way of solving the Q and great explanation..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|