Help I need the expected value for a tricky situation

In summary, Stirling numbers of the second kind are related to the question of how many different numbers are contained in 60 bins. The average number of different numbers contained in 60 bins is between 53 and 54.
  • #1
exdejesus
3
0
Hello!
I need your help. I’m really terrible at statistics, probability, permutations, and combinations. I’ve looked around a lot for the answer to this, but I haven’t seen anything just like it. I need the answer to this for some research that I’m doing.

Here’s the situation:
Imagine 60 bins or locations. Each bin is assigned one randomly-selected number, out of 256 possible numbers. It is possible that two or more bins can receive the same number.

My question is this: out of those 60 bins, on average, how many bins contain different numbers? Or, to put it another way, on average, how many different numbers are contained in the 60 bins?

Clearly, it’s possible that on some runs of this experiment, the 60 bins could all contain different numbers, so the count would be exactly 60. It’s also possible, although extremely unlikely, that all 60 bins could contain the same number, so the count would be 1.

From doing computer simulations of this situation, I get that the average count is between 53 and 54, which sounds reasonable. I just don’t know how to calculate that theoretical average count.

I also actually created simpler versions of this situation, with fewer bins and fewer numbers to assign to the bins. I then counted how many different numbers there were, and calculated the average. Here’s what I got:
For 3 bins and 4 numbers, the average count is 2.3125.
For 3 bins and 5 numbers, the average count is 2.44.
For 3 bins and 6 numbers, the average count is 2.527778.
For 3 bins and 7 numbers, the average count is 2.591837.
For 3 bins and 8 numbers, the average count is 2.640625.

So, a general formula for this situation should give these results.

I will be very grateful if you can tell me what the answer is for 60 bins and 256 numbers, and even more grateful if you can show me the formula for calculating this.

Thank you in advance!
 
Physics news on Phys.org
  • #2
Last edited:
  • #3
Excellent!

It sounds like Stirling numbers of the second kind are definitely related to what I need.

(By the way, I love this line from the Wikipedia article: "Stirling numbers of the second kind is one of two types of Stirling numbers, the other type being called Stirling numbers of the first kind." :) )

As I understand the description, the Stirling number tells me the total number of ways that 256 numbers can go into the 60 bins.

What I need now is a way to count how many of those "ways" use 60 different numbers, how many use 59, then 58, and so forth.

Thanks.
 
  • #4
S(n,k) tells you the number of ways to partition a set of n objects into k non-empty (nondistinct) subsets. Multiply by k! to partition them into k non-empty distinct subsets (I forgot that second step - edited my earlier post).

For example: how many ways are there to have 3 distinct numbers among 5 bins? Well let's ask a slightly easier question, how many ways are there to have the specific numbers 10, 11, and 12 among 5 bins (and no other numbers)? This is the number of ways you can distribute the 5 bins among the 3 distinct sets labeled 10, 11, and 12, such that each set gets at least 1 bin. Putting a bin in one of those sets means you assign the corresponding number to that bin. So it's 3! S(5,3) = 150

But in that case we used the specific 3 numbers 10, 11, and 12, but they could really be any 3 numbers from the 60. So multiply by C(60,3) to find the number of ways to get exactly 3 numbers among 5 bins: 3! S(5,3) C(60,3) = 34220.
 
  • #5
Let [tex]X_i = 1[/tex] if number i is drawn at least once, = 0 otherwise, for i = 1, 2, 3, ..., 256.

Then [tex]P(X_i = 1) = 1 - (1 - 1/256)^{60}[/tex]
and
[tex]E(X_i) = 1 - (1 - 1/256)^{60}[/tex]

So the expected number of distinct numbers drawn is
[tex]E(\sum_{i=1}^{256} X_i) = \sum_{i=1}^{256} E(X_i) = 256 \; [1 - (1 - 1/256)^{60}][/tex]

Here we have made use of the theorem that E(X+Y) = E(X) + E(Y). It's important to realize that this theorem holds even if X and Y are not independent, which is good for us in this case because the X_i's are not independent.
 
  • #6
awkward said:
Let [tex]X_i = 1[/tex] if number i is drawn at least once, = 0 otherwise, for i = 1, 2, 3, ..., 256.

Then [tex]P(X_i = 1) = 1 - (1 - 1/256)^{60}[/tex]
and
[tex]E(X_i) = 1 - (1 - 1/256)^{60}[/tex]

So the expected number of distinct numbers drawn is
[tex]E(\sum_{i=1}^{256} X_i) = \sum_{i=1}^{256} E(X_i) = 256 \; [1 - (1 - 1/256)^{60}][/tex]

Here we have made use of the theorem that E(X+Y) = E(X) + E(Y). It's important to realize that this theorem holds even if X and Y are not independent, which is good for us in this case because the X_i's are not independent.
That also works... you only need the Stirling numbers if you want an explicit distribution.
 
  • #7
awkward, that is it!

That gives a value of 53.5802554, which is right in the range that my simulation suggests!

Thank you so much for the formula and the explanation!
 

1. What is the expected value and why is it important?

The expected value is a statistical measure that represents the average outcome of a random variable over many trials. It is important because it helps us make decisions based on the most probable outcome in a situation.

2. How do I calculate the expected value for a tricky situation?

To calculate the expected value, you need to multiply each possible outcome by its probability and then sum up all of these values. This will give you the expected value for the situation.

3. Can the expected value be negative?

Yes, the expected value can be negative if the possible outcomes in a situation have negative values. This means that the overall outcome is more likely to be negative than positive.

4. How can I use the expected value to make decisions?

You can use the expected value to make decisions by comparing it to the potential outcomes of a situation. If the expected value is higher, it is more likely to result in a favorable outcome.

5. Are there any limitations to using the expected value?

Yes, the expected value does not take into account any external factors or unexpected events that may affect the outcome of a situation. It is also based on probabilities and may not always accurately predict the actual outcome.

Similar threads

  • Set Theory, Logic, Probability, Statistics
2
Replies
37
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
28
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
18
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
986
Replies
4
Views
7K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
Replies
5
Views
835
Back
Top