Probability of positive given a finite number of positives

75 Views Asked by At

I am trying to find a distribution that matches the following scenario, but my prob skills are very rusty.

I have $K=2$ types of jelly beans. I pick each jelly bean of type $k$ with probability $p_k$. There are a finite number of jelly beans of each type. Once there are no more jelly beans of a type, I will always pick the remaining type. $p_k$ is not dependent on population.

In other words, I pick with bernoulli pmf until one color runs out, then I always pick the remaining color.

e.g. I have $3$ red beans and $7$ green beans, I pick a red bean with $Pr=0.1$ and green with $Pr=0.9$ (probabilities ARE NOT related to population, they are part of a separate process). Once I've picked all $3$ red beans then I will always pick green OR (less likely, but possible) I’ve picked all $7$ green beans before getting all $3$ red beans then I would always pick red after that. (this is not the hypergeometric distribution).

I am looking for the pmf, i.e. $P(x=K)$ as whole.

1

There are 1 best solutions below

3
On BEST ANSWER

Let there be $r$ red balls and $g$ green balls. Pick red balls with probability $p$ and green balls with probability $(1-p)$.

Suppose we are drawing balls and that we run out of green balls first. Obviously we need at least $g$ draws to run out of green balls. Thus for $g \leq m < r+g$, the probability that the last green ball is picked as the $m^{th}$ ball is:

$${{m-1}\choose{g-1}}p^{m-g}(1-p)^{g}$$

Which is the probability of having drawn all greens, filling out the rest of the spaces with reds, and then being able to move around the order of drawing the $g-1$ green balls. On the other hand, if we run out of red balls first, the probability that the last red ball is drawn at position $r \leq m <r+g$ is:

$${{m-1}\choose{r-1}}p^{r}(1-p)^{m-r}$$

The probability we run out of green balls first is:

$$\sum_{m=g}^{r+g-1}{{m-1}\choose{g-1}}p^{m-g}(1-p)^{g}$$

With the analgous sum for red balls first. If you specifically want the pmf of the $x^{th}$ draw being a certain color, there are two cases: Case $1$ is $x \leq \min\{r,g\}$; Case $2$ is $\min\{r,g\} < x $. Case $1$ for draw $x$ is just $\mathbb{P}(x = r) = p$. For case 2:

$$\mathbb{R}[x = r] = 1\left(\sum_{m=g}^{x}{{m-1}\choose{g-1}}p^{m-g}(1-p)^{g}\right) + p\left(1-\sum_{m=g}^{x}{{m-1}\choose{g-1}}p^{m-g}(1-p)^{g}-\sum_{m=r}^{x}{{m-1}\choose{r-1}}p^{r}(1-p)^{m-r}\right) + 0\left(\sum_{m=r}^{x}{{m-1}\choose{r-1}}p^{r}(1-p)^{m-r}\right)$$

i.e. with the probability we run out of the green before $x$ plus the probability we run out of neither times $p$ since it is constant. If we run out of red balls before $x$ then the probability of drawing one is zero.


Edit: Actually that formula should hold all the time since ${{n}\choose{k}}=0$ for $n < k$