Probability. Number of people choosing a unique number.

sherlockh

New member
Joined
May 18, 2022
Messages
10
Hi
Could someone help with this problem or check what I've put ?
If I ask 50 people to pick a number between 1-50.
On average how many of those people will choose a number that no one else has chosen?

So, the chance of someone picking a particular number is 1/50.
I think the chance of someone picking a unique number is 1-1/50 =0.98.
(It's just clicked) I suppose if there are 2 people, the overall chance will be 0.98*0.98. If there are 50 people the chance is (0.98)^50 =0.364 or 36%.4
If 36.4% of those 50 people choose a different number then 18.2 people will choose a unique number.

Thanks and kind regards
Steve
 
I can see two different problems in you post:
1. When 50 people randomly choose numbers from 1 to 50 how many, on average, of those picks will be unique.
2. When 50 people randomly choose numbers from 1 to 50 what is the probability that all those picks are unique.

It looks like you were trying to solve #2, but I do not believe your solution is correct. For example, for 2 people the number of unique picks is 50*49, while the total number of picks is 50*50, which means that for two people the probability will be 0.98, not 0.98*0.98.

At this point I don't know how to solve #1, but it would help if you could clarify the problem's statement.
 
Hi Thanks for answering.
Yes, the problem is #1, 50 people each choose 1 number at random between 1-50. Two people can pick the same number.
I'm looking for the number of picks that will be unique.
Hope that clarifies it.
 
Can you calculate the probability that - all 'n' (n ≤ 50) people will choose unique numbers?
 
This is funny: I strongly believe that I know the expression for the general case of [imath]n\geq 2[/imath] people, but I have no clue how to prove or deduce it. I will try remembering to publish it one week from today unless someone comes up with a solution before that.
 
Last edited:
I ask 50 people to pick a number between 1-50.
So, the chance of someone picking a particular number is 1/50.
I think the chance of someone picking a unique number is 1-1/50 =0.98.
This .98 can't be correct.
When the first person picks a number, then the chance that they pick a unique number is 1 (ie 100%) as no one else picked a number yet.
Don't you think that the 50th person to pick a number will have a much smaller chance of picking a unique number than say the 2nd or 3rd person to pick a number.
Or am I not understanding the problem as you meant it to be??
 
(It's just clicked) I suppose if there are 2 people, the overall chance will be 0.98*0.98. If there are 50 people the chance is (0.98)^50 =0.364 or 36%.4
If 36.4% of those 50 people choose a different number then 18.2 people will choose a unique number.
What you calculated here is the probability that none of those people picked an arbitrary number YOU chose. That's very different from what you're looking for.

If I ask 50 people to pick a number between 1-50.
On average how many of those people will choose a number that no one else has chosen?
Let's try clarifying what you are asking for, using a smaller number than 50.

Suppose there are 3 people, and each picks a number from 1 to 3. There are 3^3 = 27 possible sets of choices. Of those,
  • 123, 132, 213, 231, 312, 321 (6 cases) have 3 unique numbers
  • none have 2 unique numbers (since if 2 are unique, the third can't be either of those, so it will also be unique)
  • 122, 133, 212, 313, 221, 331,
    211, 233, 121, 323, 112, 331,
    311, 322, 131, 232, 113, 223 (18 cases) have 1 unique number
  • 111, 222, 333 (3 cases) have no unique numbers
This covers all 6+0+18+3 = 27 cases. This gives us a probability distribution of
  • P(0) = 3/27 = 1/9
  • P(1) = 18/27 = 6/9
  • P(2) = 0
  • P(3) = 6/27 = 2/9
The expected number of unique numbers is 0(1/9) + 1(6/9) + 2(0) + 3(2/9) = 12/9 = 4/3. So on the average, there will be 1 1/3 people who chose unique numbers.

Is this what you are looking for (but for 50 rather than 3)? Do you see how tricky it may be?

(@blamocur, does your formula give this answer?)
 
What you calculated here is the probability that none of those people picked an arbitrary number YOU chose. That's very different from what you're looking for.


Let's try clarifying what you are asking for, using a smaller number than 50.

Suppose there are 3 people, and each picks a number from 1 to 3. There are 3^3 = 27 possible sets of choices. Of those,
  • 123, 132, 213, 231, 312, 321 (6 cases) have 3 unique numbers
  • none have 2 unique numbers (since if 2 are unique, the third can't be either of those, so it will also be unique)
  • 122, 133, 212, 313, 221, 331,
    211, 233, 121, 323, 112, 331,
    311, 322, 131, 232, 113, 223 (18 cases) have 1 unique number
  • 111, 222, 333 (3 cases) have no unique numbers
This covers all 6+0+18+3 = 27 cases. This gives us a probability distribution of
  • P(0) = 3/27 = 1/9
  • P(1) = 18/27 = 6/9
  • P(2) = 0
  • P(3) = 6/27 = 2/9
The expected number of unique numbers is 0(1/9) + 1(6/9) + 2(0) + 3(2/9) = 12/9 = 4/3. So on the average, there will be 1 1/3 people who chose unique numbers.

Is this what you are looking for (but for 50 rather than 3)? Do you see how tricky it may be?

(@blamocur, does your formula give this answer?)
Thanks for clarifying the question for me. That was what I thought, among others, it might mean.
 
I will try remembering to publish it one week from today unless someone comes up with a solution before that.

The total number of unique picks for [imath]n[/imath] people and all [imath]n^n[/imath] possible combination is
[math]P_{n} = n^2 (n-1)^{n-1}[/math]and the mean value for random pick is
[math]M_n = \frac{P_n}{n^n} = \frac{(n-1)^{n-1}}{n^{n-2}}[/math]I cannot prove this, but my deterministic script (which actually led me to come up with the above formula) matched this expression for [imath]2 \leq n \leq 8[/imath], and another, randomized script got pretty good approximations for [imath]2 \leq n < 1000[/imath] while running 1000000 tries for each [imath]n[/imath].

Side note: [imath]M_n[/imath] is asimptotically linear:
[math]\lim_{n\rightarrow\infty} \frac{M_n}{n} = \lim_{n\rightarrow\infty} \left(\frac{n-1}{n}\right)^{n-1} = \lim_{n\rightarrow\infty} \frac{1}{\left(1+\frac{1}{n-1}\right)^{n-1}} = \frac{1}{e}[/math]
 
Top