Probability of Repeated Identical Numerals

  • Thread starter John14:6
  • Start date
  • Tags
    Probability
In summary, the conversation is about determining the statistical probability of a repeated numeral (555) occurring within a larger number of 7 digits, with the repeated numeral being in the middle (XX555XX) and the other digits being random. After some confusion about the number of digits and the positioning of the repeated numeral, it is concluded that the probability is 1 in 1,000. This is confirmed by a Python program that generates a million random 7-digit numbers and checks for the occurrence of the repeated numeral.
  • #1
John14:6
6
0
I am attempting to determine what the statistical probability is of a repeated numeral occurring within a larger number. Specifically, the base number I am referencing has 8 digits. How likely would it be to have the same 3 numerals (such as 444) occur in the middle of the number (such as a number of 1944482)? This pattern would only occur 10 times (000, 111, 222, 333, 444, 555, 666, 777, 888, 999)--the digits to the left and to the right of the center 3 numerals could be any digits in any order.

Any help would be greatly appreciated.
 
Physics news on Phys.org
  • #2
You need to clarify the question more. Are the patterns RRRXXXXX, XRRRXXXX, XXRRRXXX, XXXRRRXX, XXXXRRRX, XXXXXRRR, where X is any digit and R is a repeated digit, all allowed?

Also, if this is homework, you must post your attempts at a solution, per PF guidelines.

- Warren
 
  • #3
The only pattern allowed is XXRRRXX, and X can be any digit, including 0 (e.g., 0155586). Actually, I'm looking for the probability of just one particular set (555) occurring and not any others (i.e., 2377786, 6233358).

Although it has been years since my stats class in graduate school, the initial thought is that the probability would be 1 in 9,999,999. But the number must have 8 digits (no less); also, it can have 0 as a first digit (such as 0655532). Consequently, I realize my initial process is flawed.

Thanks for helping. Although this seems like homework (to me, too), it has to do with a nonprofit group I'm working with that wants to use this statistic in some materials it's developing.
 
  • #4
Well, this is the second time you've repeated it... but XXRRRXX doesn't have eight digits; it has only seven. As a result, I'm pretty thoroughly confused about what you actually want.

- Warren
 
  • #5
Warren,

There is no excuse that I have not yet learned to count! Yes, sir, you are correct--it is seven digits and not eight. My sincere apologies!

It has been an extremely long day--but no excuses for incompetence!

Again, so sorry for all the confusion ... you are a good man for being so patient!
 
  • #6
So, can you tell me again what you're looking for? Is it XXX555XX? or XX555XXX? Or either? Are numbers like 55555555 allowed, or must the repeated number appear nowhere else but in the center?

- Warren
 
  • #7
OK, it is XX555XX, which is a total of 7 (yes, it is 7!) digits. And yes, the digit 5 can also appear as X. More specifically, X can be any digit in any order from 0 through 9, which means the 7 digits could start with 0. The only constant is 555 in the center of the 7 digits.

Thank you. Warren, you are a very patient person!
 
  • #8
Well, if the position of the digits is constant (i.e. XX555XX), and the other digits are uncorrelated, then the problem is significantly reduced in complexity. You can simply ignore the X digits, and just ask:

What's the probability of a three-digit random number equalling 555?

Since there are 1,000 three-digit numbers, the chance of this is simply 1/1,000.

- Warren
 
  • #9
With the question "What's the probability of a three-digit random number equalling 555?" does it make a difference that this three-digit number is embedded in a seven-digit number? I would think that it is not only a three-digit number equalling 555, but also that it is both preceded and followed by 2 random numbers. In other words, the 7-digit number could not be X555XXX nor XXX555X, but rather XX555XX. Furthermore, the three-digit number cannot be embedded in any more or less than a 7-digit number (e.g., it could not be XXX555XXX nor X555X).

Again, you are very patient!
 
  • #10
Start with a three-digit number. Ask: what's the probability that that three-digit number is 555? The answer is: one in a thousand.

Now ask: what's the probability of prepending a valid two-digit number? Since any two-digit number is acceptable, as you said, this probability is exactly one.

Now ask: what's the probability of appending a valid two-digit number? Since any two-digit number is acceptable, as you said, this probability is also exactly one.

The product of these probilities is:

[itex]1 \cdot \frac{1}{1000} \cdot 1 = \frac{1}{1000}[/itex]

- Warren
 
  • #11
Unless, of course, you want none of the X's to be a 5!
 
  • #12
HallsofIvy said:
Unless, of course, you want none of the X's to be a 5!

He verified this in post #7.

- Warren
 
  • #13
Yes, I agree that the probability of both prepending and appending any valid 2 digits is one. However, the other factor here is the position of the 3-digit number of 555: it must occupy the third, fourth, and fifth position in the 7-digit number. Therefore, although prepending/appending any random digits still results in a probability of one, the position of these digits can only be first, second, sixth, and seventh. It seems to me that this positioning--as well as limiting the total number of digits to 7--would affect the probability. Thanks again for your followup.
 
  • #14
Well, I'm afraid you're incorrect. The probability of the numbers you're talking about, XX555XX, where X can be any digit, is 1/1000. I've explained it several times, in several different ways, and cannot be any more straightforward.

If you do not believe my answer is correct, here's proof -- a simple Python program to measure the probability by looking at a million randomly-generated seven-digit numbers:

Code:
import random

N = 1000000
hits = 0

for i in xrange(N):
        number = random.randint(0, 10**7-1)
        if str(number)[2:5] == '555':
                hits = hits + 1

print "Hit probability: ", float(hits) / float(N)

When it is run:

$ python prob2.py
Hit probability: 0.00102

The answer is one in a thousand. There is no room for disagreement.

- Warren
 
  • #15
John14:6 said:
Yes, I agree that the probability of both prepending and appending any valid 2 digits is one. However, the other factor here is the position of the 3-digit number of 555: it must occupy the third, fourth, and fifth position in the 7-digit number. Therefore, although prepending/appending any random digits still results in a probability of one, the position of these digits can only be first, second, sixth, and seventh. It seems to me that this positioning--as well as limiting the total number of digits to 7--would affect the probability. Thanks again for your followup.

Another way to show that Chroot is right is the following: There are 10^7 possible 7 digits numbers (assuming that 0 is valid even as the very first digit). Of these 10 million numbers, how many are of the form XX555XX? Well, the answer is simply 10^4, right? Therefore the probability is 10^4/10^7 = one in a thousand.

Because numbers starting with a zero are acceptable, the answer does not depend on where the 5's are placed. The probability is the same to get a number of the form X5XX55X for example, or 5XXXX55.
 
  • #16
Here's an easier way to think about it. If zero's are allowed to be one or both of the first two numbers, then there are 100,000 possible outcomes of the form aaxxxaa. Since there are 10,000,000 possible outcomes, then your probability is 100,000/10,000,000, or 1/100. Finding out that there are 100,000 possible outcomes is simply a matter of counting. 00xxx00, 00xxx01, 00xxx02, and so on. You can remove the x's and realize that you're just counting to 9999 (99xxx99) beginning with 0000. That's 10,000 numbers. Multiply this by 10 for all the possibilities of x (0-9). 100,000. Divide that by the 10,000,000 numbers from 0000000 to 9999999 and you get .01. For the probability of anyone particular value of x, simply omit multiplication by 10, and you get 1/1000.
 
Last edited:

1. What is the "Probability of Repeated Identical Numerals"?

The "Probability of Repeated Identical Numerals" refers to the likelihood of a sequence of numbers containing identical digits appearing in a random event or experiment. It is a measure of how often we can expect to see the same number repeated in a given set of numbers.

2. How is the probability of repeated identical numerals calculated?

The probability of repeated identical numerals is calculated by dividing the number of possible outcomes with repeated identical digits by the total number of possible outcomes. For example, in a set of numbers from 1-10, there are 10 possible outcomes with repeated identical digits (such as 11, 22, 33, etc.) out of a total of 100 possible outcomes, giving a probability of 10/100 or 0.1.

3. What factors affect the probability of repeated identical numerals?

The main factors that affect the probability of repeated identical numerals include the size of the sample or population, the range of numbers in the set, and the method used to select the numbers. As the sample size or range of numbers increases, the probability of repeated identical numerals decreases.

4. How is the "Probability of Repeated Identical Numerals" useful in real-life applications?

The "Probability of Repeated Identical Numerals" is useful in various fields such as statistics, gambling, and data analysis. In statistics, it helps in predicting the likelihood of certain patterns or outcomes in a data set. In gambling, it can help players make more informed decisions based on the probability of certain numbers appearing. In data analysis, it can provide insights into the distribution and patterns of numerical data.

5. Can the probability of repeated identical numerals be 0 or 1?

Yes, the probability of repeated identical numerals can be 0 or 1. If there is no possibility of repeated identical digits in a given set of numbers, the probability will be 0. On the other hand, if every outcome in a set of numbers contains repeated identical digits, the probability will be 1. However, in most cases, the probability will be a value between 0 and 1, indicating a certain likelihood of repeated identical numerals occurring.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
306
  • Set Theory, Logic, Probability, Statistics
5
Replies
147
Views
7K
  • Programming and Computer Science
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
28K
  • Set Theory, Logic, Probability, Statistics
Replies
20
Views
5K
  • Precalculus Mathematics Homework Help
Replies
34
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
Back
Top