Tuesday, 19 February 2019

probability - Random distribution of colored balls into boxes.



This is an abstraction of a real problem I have:




I have a large number of balls that are either Red or Blue (n=9107) and a bunch of containers (c=3107). I've calculated that the probability of a Red ball occurring pr=0.12.



Next, I place three balls in each container randomly. I need to find out the number of containers on average that contain at least one Red ball. But I need to find out a formula that will work for any number of containers and any number of balls per container.



Even better, I have a set of Boxes as well (b=107), and I place three containers in each Box. If a container has at least one red Ball, then it is a red Container, and if a Box has at least one red Container, then it is a red Box. How many red Boxes should I have?


Answer



For i=1 to c, define random variable Xi by Xi=1 if container i contains at least one red ball, and by Xi=0 otherwise. Let Y=Xi. We want E(Xi), which by the linearity of expectation is E(Xi).



We can calculate Pr, that is, E(X_i) either approximately or exactly. Since c is large, approximately is good enough. Place the balls one at a time in container i. The probability of no red is approximately (0.88)^3, and therefore an excellent approximation to E(X_i) is 1-(0.88)^3. for the expectation of Y, multiply by c.




The expected number of red boxes is calculated using a similar strategy.


No comments:

Post a Comment

real analysis - How to find lim_{hrightarrow 0}frac{sin(ha)}{h}

How to find \lim_{h\rightarrow 0}\frac{\sin(ha)}{h} without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...