Calculating Expected Collisions: Probability Question on Keys and Boxes

  • Thread starter economist13
  • Start date
  • Tags
    Probability
E[Y] for all i.In summary, the expected number of collisions when putting r keys into k boxes with each key having a probability of pi being put into box i independently is r-k. However, this approach may be incorrect and using the indicator function may be a better way to find the expected number of collisions. One suggestion is to consider the maximum of X-1 and 0, and use linearity of expectation to find the expected number of collisions for all boxes.
  • #1
economist13
15
0
A total of r keys are to be put one at a time, in k boxes, with each key
independently being put in box i with probability pi ,
∑pi = 1. Each time a key is put in a nonempty box, we say that a collision occurs. Find
the expected number of collisions.

My professor hinted that we should use an indicator function, but I went about it a different way...(which I know to be wrong)

let X be the number of keys put into box i,

then E[X] = rpi. Since any key after key 1 will result in a collision, the rpi - 1 represents the expected number of collision for box i. then ∑(rpi -1) for all i and we get then that the total expected number of collisions is r-k.

Now, I know that cannot be correct, simply by thinking of the case where we have more boxes than keys (we cannot have negative collisions)

any hints?? what indicator function should I focus on?
 
Physics news on Phys.org
  • #2
economist13 said:
let X be the number of keys put into box i

one way is to determine E[Y] where Y=max(X-1,0)
 

FAQ: Calculating Expected Collisions: Probability Question on Keys and Boxes

1. What is the probability of choosing a specific key from a set of keys?

The probability of choosing a specific key from a set of keys is 1 out of the total number of keys in the set. For example, if there are 10 keys in the set, the probability would be 1/10 or 0.1.

2. If I have 3 keys and I need to open a lock that requires 2 of them, what is the probability of choosing the correct combination?

The probability of choosing the correct combination of 2 keys out of 3 is 1/3 or 0.33. This is because there are 3 possible combinations of 2 keys that can be chosen (1-2, 1-3, 2-3), and only 1 of them will open the lock.

3. How does the number of keys in a set impact the probability of choosing a specific key?

The larger the number of keys in a set, the lower the probability of choosing a specific key. This is because as the set size increases, the total number of possible outcomes also increases, making it less likely to choose a specific key.

4. Can the probability of choosing a specific key change over time?

No, the probability of choosing a specific key does not change over time. It is based on the number of possible outcomes and remains the same unless the set of keys or the conditions for choosing a key are changed.

5. How can I calculate the probability of choosing a key if I have multiple sets of keys?

To calculate the probability of choosing a key from multiple sets, you would need to know the total number of keys in all the sets combined and the number of keys in the specific set you are interested in. You can then use the formula: P(A) = Number of outcomes in set A / Total number of possible outcomes. For example, if there are 10 keys in total and 3 of them are in set A, the probability of choosing a key from set A would be 3/10 or 0.3.

Similar threads

Back
Top