I'm trying to solve a combinatorics problem for a program I am writing but I'm having some trouble. Here's an abstracted version...
I have 5 people with weights assigned to them
What is the probability of Person B being selected if I choose 3 at a time given these weights (without replacement)? So a result set might look like [A,D,E], [C,B,A], etc.
If I set all the weights to 100 I can calculate the probability as
(1/5) + (4/5)(1/4) + (4/5)(3/4)(1/3) = 3/5
I'm thinking about it as the probability B is chosen the first time plus the probability it wasn't chosen the first time multiplied by the probability it is chosen the second time, and so on for the third time, but I'm getting confused and stuck as soon as I try to expand with different values.
I'm looking for some sort of formula that would help me quickly calculate probabilities for hundred of different weightings.
Thanks in advance for the help!
EDIT: Seems like this is definitely know as a WRS-N-W problem or Weighted Random Sampling without Replacement, with defined Weights