carter.andrewj

12-03-2015, 12:33 PM

You have a random assortment of items that can be any one of R different things.

You do not know how many of each individual thing you have - only how many you have overall, N.

Some percent, q1, of the possible items have a p1 chance of existing in the set.

Some percent, q2, of the possible items have a p2 chance of existing in the set.

The remaining percent, q3, of the possible items have a p3 chance of existing in the set.

You can only have some maximum number, M, of each item - after which you have to discard the excess.

It is possible to have 0 (zero) of an item, it is not possible to have more than M of an item.

If a different random assortment of the same items (with the same properties, distribution, etc...) but with a different number of items, n, were added to the first set, how would I calculate the expected number of items that would need to be discarded?

Is it also possible to calculate the most probable number of items in q1, q2 and q3 that would exist in the discarded set?

My (admittedly rusty) maths instincts are telling me I have everything needed for a solution here, but I can't crack it. Would be hugely grateful to anyone who can either help me to the solution, or tell me why it can't be done (and, ideally, what other properties of the system I would need to constrain).

You do not know how many of each individual thing you have - only how many you have overall, N.

Some percent, q1, of the possible items have a p1 chance of existing in the set.

Some percent, q2, of the possible items have a p2 chance of existing in the set.

The remaining percent, q3, of the possible items have a p3 chance of existing in the set.

You can only have some maximum number, M, of each item - after which you have to discard the excess.

It is possible to have 0 (zero) of an item, it is not possible to have more than M of an item.

If a different random assortment of the same items (with the same properties, distribution, etc...) but with a different number of items, n, were added to the first set, how would I calculate the expected number of items that would need to be discarded?

Is it also possible to calculate the most probable number of items in q1, q2 and q3 that would exist in the discarded set?

My (admittedly rusty) maths instincts are telling me I have everything needed for a solution here, but I can't crack it. Would be hugely grateful to anyone who can either help me to the solution, or tell me why it can't be done (and, ideally, what other properties of the system I would need to constrain).