# How can I compute the number of selected green ball from a given selection prob.

I have $2$ red balls in box 1 and $4$ green balls in box 2 as figure. The prob. selection the red balls (R) in box 1 is $$P(R=1)=0.1$$ $$P(R=2)=0.9$$

And prob. selection the green balls (G) in box 2 is $$P(G=1)=0.1$$ $$P(G=2)=0.5$$ $$P(G=3)=0.2$$ $$P(G=4)=0.2$$

The prob. select box 1 is $P(box1)=0.1$ and prob. select 2 boxes is $P(box1,box2)=0.9$. The selection of balls in each box is independent (Means selection red balls does not depend on selction of green box)

Randomly draw ball without replacement,

1. How many green balls are selected (only green balls) in 100 trails.
2. How many red balls are selected (only red balls) in 100 trails.
3. How many red and green balls are selected (include both red and green balls) in 100 trails.

This is my solution.

Due to selection balls in two boxes are independent, then prob. of sum of two random variable is

$P(Ball=2)=P(R=1)\times P(G=1)=0.01$ ... In mathematic, it can be represented as convlution operation

$P(Ball)=P(R)*P(G)$

Then I have the prob. selection of balls is $$P(Balls=2)=0.01, P(Balls=3)=0.14, P(Balls=4)=0.47, P(Balls=5)=0.2, P(Balls=6)=0.18$$

Based on the ans in 1 Let $A = \{\text{Choose only green}\}.$ Let $X$ be the number of balls drawn, and let $R$ be the number of green balls drawn. Then \begin{align*} P(A) &=\sum_{k = 0}^{4} P(R = k|X = k)P(X = k)\tag 1\\ &=\sum_{k = 0}^{4} \frac{\binom{4}{k}}{\binom{6}{k}}p_k\\ &=\frac{\binom{4}{2}}{\binom{6}{2}}(.01)+\frac{\binom{6}{3}}{\binom{10}{3}}(.14)+\frac{\binom{6}{4}}{\binom{10}{4}}(.47)\tag2\\ &= 0.0967, \end{align*}

In 100 trails, the selected green balls is $n_G=100 \times 0.0967 \times P(box1,box2)=6.44$

Is it correct? I am confusing about $p_k$, which one I will used (orginal $P(G)$ or $P(Balls)$

• Not sure I follow. Is it that the number of selected balls is uncertain? That is, when I choose from Box $1$, say, I might choose one red ball (probability $.1$) or I might choose two red balls (probability $.9$)? If so then on a given trial I expect to draw $.1^*1+.9^*2=1.9$ red balls so in $100$ I expect to draw $190$ red ones, and so on. – lulu Jan 22 '16 at 12:51
• And you need to multiply with 0.1 because selection of box 1 is 0.1 then you only has 19 red ones – Jame Jan 22 '16 at 12:59
• But the red ones also come from second way, select both box 1 and box 2. Hence, we need to compute red ones in that way – Jame Jan 22 '16 at 13:00
• I don't understand. It looks like you always choose from box $1$, no? It's only box $2$ that is uncertain. But, honestly, the whole thing is unclear. Can you write out the rules clearly and plainly? – lulu Jan 22 '16 at 13:02
• Ok, but in that case my $190$ is correct. The green balls need a multiplier. – lulu Jan 22 '16 at 13:07