B Odds of Drawing Sequence 4457: Calculating Probability

  • B
  • Thread starter Thread starter Glype11
  • Start date Start date
  • Tags Tags
    Code Probability
Glype11
Messages
16
Reaction score
2
Suppose we have a code: 4457

If these numbers are randomly drawn what are the odds of drawing those numbers?

Here's my approach:

The available numbers range from 0123456789 and there are four columns, minus the numbers which were drawn gives: 1/(10^4-4)~0.01%

Now what about the odds of drawing the exact sequence 4457? Would I simple multiply the above figure by 0.25?

I'm not really sure about either solution. I included my initial reasoning to compare it with the actual solution method.
 
Physics news on Phys.org
Glype11 said:
Suppose we have a code: 4457

If these numbers are randomly drawn what are the odds of drawing those numbers?
Presumably the numbers are drawn with replacement. If the numbers were drawn without replacement, you couldn't have a repeated digit.
Glype11 said:
Here's my approach:

The available numbers range from 0123456789 and there are four columns, minus the numbers which were drawn gives: 1/(10^4-4)~0.01%
No on the part "minus the numbers which were drawn."
Think of this as four independent events, with the probability of drawing a given digit as 1/10. Drawing a 4, another 4, a 5, and a 7 would be 1/10 * 1/10 * 1/10 * 1/10 = 0.0001, which is as you wrote 0.01%.
Glype11 said:
Now what about the odds of drawing the exact sequence 4457? Would I simple multiply the above figure by 0.25?
That's really what you calculated before. The odds of drawing any particular 4-digit number are 1 in 10,000 = ##10^{-4}##.
Glype11 said:
I'm not really sure about either solution. I included my initial reasoning to compare it with the actual solution method.
 
Last edited:
  • Like
Likes sysprog
To define a probability you need to define what is your sample space, for example, the probability of writing 4457 with the sample space ##\Omega = \{4457\}## is 1, while the probability of writing 4457 with ##\Omega = \{x\in \mathbb{N} | x < 10^4\}## is, as you said ##10^{-4}##. But the probability of writing 4457 with ##\Omega = \{x\in \mathbb{N} | x < 10^6\}## is then ##10^{-6}##
 
  • Like
Likes sysprog and FactChecker
Mark44 said:
Presumably the numbers are drawn with replacement. If the numbers were drawn without replacement, you couldn't have a repeated digit.
I don't understand. Maybe code wasn't the best description.
No on the part "minus the numbers which were drawn."
Think of this as four independent events, with the probability of drawing a given digit as 1/10. Drawing a 4, another 4, a 5, and a 7 would be 1/10 * 1/10 * 1/10 * 1/10 = 0.0001, which is as you wrote 0.01%.
This a good explanation.

That's really what you calculated before. The odds of drawing any particular 4-digit number are 1 in 10,000 = ##10^{-4}##.
Ok. I wanted to compare drawing that particular sequence vs drawing those particular numbers. To find the odds of drawing those particular numbers without regards to the order would I divide all the arrangement 4457 by 10000 which gives 6/10000 or 6x greater odds vs the particular sequence?
 
Last edited by a moderator:
Gaussian97 said:
To define a probability you need to define what is your sample space, for example, the probability of writing 4457 with the sample space ##\Omega = \{4457\}## is 1, while the probability of writing 4457 with ##\Omega = \{x\in \mathbb{N} | x < 10^4\}## is, as you said ##10^{-4}##. But the probability of writing 4457 with ##\Omega = \{x\in \mathbb{N} | x < 10^6\}## is then ##10^{-6}##
I'm not sure how to define the sample space. The original problem dealt with the last four digits of phone number whose sequence seemed intentional. Another problem involved solving a 4 digit passcode with digits 0 to 9. How would you define the sample space in those cases?
 
Glype11 said:
Maybe code wasn't the best description.
No, it wasn't.
Glype11 said:
Ok. I wanted to compare drawing that particular sequence vs drawing those particular numbers. To find the odds of drawing those particular numbers without regards to the order would I divide all the arrangement 4457 by 10000 which gives 6/10000 or 6x greater odds vs the particular sequence?
What you're trying to do could use a better explanation.
What do you mean by "all the arrangement 4457" and where do you get 6/10,000?
If you have the numbers 0, 1, 2, 3, ..., 9 in a container and you randomly draw one of them out at a time, with replacement, the odds of getting 4457 are 1 in 10,000. If you pull numbers out, without replacement, there's no way you can get 4457, since after the first 4, you can't get 4 again.
If you have a big wheel, like a roulette wheel, with the numbers 0000, 0001, 0002, ... , 9999, your odds of spinning the wheel and landing on 4457 are 1 in 10,000.

If you don't care about the order and are looking at the odds of getting any permutation of 4, 4, 5, 7 (i.e., two 4s, one 5, and one 7), by my calculation, there are 12 ways out of 10,000. These include 4457, 4475, 4547, 4745, 4574, 4754, 5447, 7445, 5474, 7454, 5744, and 7544.

If this doesn't cover what you're asking about, please be more specific in what you're asking.
 
  • Like
Likes Glype11
Glype11 said:
I'm not sure how to define the sample space. The original problem dealt with the last four digits of phone number whose sequence seemed intentional. Another problem involved solving a 4 digit passcode with digits 0 to 9. How would you define the sample space in those cases?
Ok then your sample space is the set of all the natural number less than 10 000.
 
Glype11 said:
I'm not sure how to define the sample space. The original problem dealt with the last four digits of phone number whose sequence seemed intentional. Another problem involved solving a 4 digit passcode with digits 0 to 9. How would you define the sample space in those cases?
When I started my reply, part of which is quoted below, I don't think you had posted what I've quoted above.
Mark44 said:
If you have a big wheel, like a roulette wheel, with the numbers 0000, 0001, 0002, ... , 9999, your odds of spinning the wheel and landing on 4457 are 1 in 10,000.
Gaussian97 said:
Ok then your sample space is the set of all the natural number less than 10 000.
Yes, we're on the same page.
 
  • Like
Likes sysprog
Mark44 said:
If this doesn't cover what you're asking about, please be more specific in what you're asking.
You fully explained everything that I asked.
 
Back
Top