Calculating Probability for Repeated Numbers in Random Number Generation

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

Discussion Overview

The discussion revolves around calculating the probability of generating at least 5 identical numbers when using a random number generator that produces numbers between 0 and 9, repeated 6 times. Participants explore different methods for determining this probability, including combinatorial approaches and considerations of sampling with and without replacement.

Discussion Character

  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant proposes two methods for calculating the probability: one using total permutations and the other using combinations with repetition, but expresses uncertainty about the latter's applicability.
  • Another participant clarifies that the relevant concept for the denominator should be permutations rather than combinations, highlighting the difference between the two concepts.
  • A participant acknowledges their misunderstanding regarding the use of combinations in the context of the problem after receiving clarification.
  • Another participant discusses the nature of the problem as one involving sampling with replacement, contrasting it with a card problem that involves sampling without replacement, and suggests a case-counting approach.
  • A final contribution suggests a method involving conditional probability to systematically account for configurations where five numbers are equal and the sixth may vary.

Areas of Agreement / Disagreement

Participants express differing views on the appropriate mathematical methods to apply, with no consensus reached on the best approach to calculate the probability. Uncertainty remains regarding the application of combinations versus permutations and the overall methodology for solving the problem.

Contextual Notes

Participants note the importance of distinguishing between sampling methods and the implications for counting configurations, but do not resolve the mathematical discrepancies in their approaches.

Physics_wiz
Messages
227
Reaction score
0
Say I have a random number generator that generates numbers between 0 and 9 inclusive (10 possibilities) and I run it 6 times. What I am trying to find is the probability that at least 5 of those 6 random numbers will be the same.

I could think of 2 ways to find the answer, the first one:

(10^6) is the total number of possible 6 digit numbers generated. The number of numbers that have the same 5 or 6 of the same digits will be
10*[ (6C5 + 6C6) ]. Where 6C5 is the number of choices for the locations of the 5 digits that are the same and 6C6 = 1 is for the possibility when all digits are the same). 10*[ (6C5 + 6C6) ] = 10*(6+1) = 70. The probability would then be 70/(10^6).

The second way:

This involves the number of combinations with repetition of picking out of 10 digits 6 times. The formula I found is (n+r-1)!/(r!(n-1)!) where in this case, n = 10 and r = 6. This gives me the total number of possible combinations after which I would divide 70 by that number to get the probability. However, in this case the number of possible combinations is 5005 instead of 10^6. I believe 5005 is wrong because the first way gives me an answer that I think is closer to the right answer.

What exactly does the formula for combinations with repetition calculate? How can I use it in the above problem?
 
Physics news on Phys.org
The relevant concept for the denominator is not combination; it is permutation. 106 is the number of permutations that one can get out of 10 numbers and 6 slots, where ABCDEF is counted differently from ABCDFE (although A=B, etc., is allowed). In contrast, combination counts subsets, so ABCDEF is treated identical to ABCDFE. See http://en.wikipedia.org/wiki/Combinatorics
 
Last edited:
Ahh I see now. I feel pretty stupid about missing that with the second way I thought the problem could be solved. Thanks for clarifying.
 
A card problem involves sampling without replacement. But, this is a problem that involves sampling with replacement. Why? Well suppose you chose 10 integers for each digit, or 60 integers. Then the chance of pulling any given integer is 1/60, but if we pull a 1, then there are now only 59 integers remaining and the chances of pulling a 1 have dropped to 9/59, where as the chances of a 2 is 10/59. This problem does not work that way.

This problem is worked by attempting to count the cases, rather than first looking for a formula. So just consider five 5s. Now if we want to add another digit we have 6 places to put that, but we have only 9 integers we can so use, because for the 5 itself, we have only one way it can be used because six 5s are all the same. Thus there are 55 ways we can fill the spaces. Since there are 10 integers we can use, including the original choice of 5s, we have 550 such numbers.
 
Last edited:
Consider the following

First, getting the prob of all numbers being the same is standard. Try getting five numbers equal, for every possible configuration(conditional probability).
for each configuration draw a sixth number, which will be either = or unequal to the five equal numbers. "Add" it all up, and you are done.

Regards,
Reilly Atkinson
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
925
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 3 ·
Replies
3
Views
786
Replies
1
Views
7K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K