2
$\begingroup$

I have a grid of 16 tiles face down. Half are good outcomes and half are bad outcomes. How would I calculate the probability of picking x number of Good outcomes before y number of bad outcomes are picked.

Once a tile is selected and it’s state is revealed (good or bad), it is left face up. That is to say there are no replacements. Also order dose matter because the x number of good outcomes must be picked before the y number of bad outcomes.

$\endgroup$
1
  • $\begingroup$ This is a special case of the more general urn problems. For $x\leq n\leq x+y-1$, the probability of having flipped $x$ good tiles in $n$ flips is $$p_n=\frac{\Big(\prod_{k=0}^{x-1}(8-k)\Big)\Big(\prod_{j=0}^{n-x-1}(8-j)\Big)}{\prod_{i=1}^{n-1}(16-i)}\binom{n}{x}.$$ You areb looking at $p_x+p_{x+1}+\cdots +p_{x+y-1}$ $\endgroup$ Commented Feb 6, 2021 at 14:24

1 Answer 1

1
$\begingroup$

You get $x$ good before $y$ bad if you get $x$ or more good out of $x+y-1$ attempts. Let's call the probability of this $P(x,y)$ and using hypergeometric probabilities we have $$P(x,y)= \sum_{n=x}^8 \frac{{8 \choose n}{8 \choose y-1}}{{16 \choose n+y-1}}$$

There are some fairly obvious symmetric and anti-symmetric shortcuts using combinatorial arguments:

  • $P(x,x)= \frac12$ since good and bad are equally likely
  • $P(x,y)= 1 - P(9-x,9-y)$ if we arrange all $16$ and count from the other end
  • $P(x,y)= P(9-y,9-x)$ counting from the other end and swapping good and bad
  • $P(x,y)= 1 - P(y,x)$ since one must come before the other swapping good and bad

Here is a table of the values of $P(x,y)$

$$\begin{matrix} {P}&x: &\mathbf{1} & \mathbf{2} & \mathbf{3} & \mathbf{4} & \mathbf{5} & \mathbf{6} & \mathbf{7} & \mathbf{8} \\ y: \\ \mathbf{1} && \frac{ 1 }{ 2 } & \frac{ 7 }{ 30 } & \frac{ 1 }{ 10 } & \frac{ 1 }{ 26 } & \frac{ 1 }{ 78 } & \frac{ 1 }{ 286 } & \frac{ 1 }{ 1430 } & \frac{ 1 }{ 12870 } \\ \mathbf{2} && \frac{ 23 }{ 30 } & \frac{ 1 }{ 2 } & \frac{ 37 }{ 130 } & \frac{ 11 }{ 78 } & \frac{ 17 }{ 286 } & \frac{ 29 }{ 1430 } & \frac{ 1 }{ 198 } & \frac{ 1 }{ 1430 } \\ \mathbf{3} && \frac{ 9 }{ 10 } & \frac{ 93 }{ 130 } & \frac{ 1 }{ 2 } & \frac{ 87 }{ 286 } & \frac{ 45 }{ 286 } & \frac{ 283 }{ 4290 } & \frac{ 29 }{ 1430 } & \frac{ 1 }{ 286 } \\ \mathbf{4} && \frac{ 25 }{ 26 } & \frac{ 67 }{ 78 } & \frac{ 199 }{ 286 } & \frac{ 1 }{ 2 } & \frac{ 797 }{ 2574 } & \frac{ 45 }{ 286 } & \frac{ 17 }{ 286 } & \frac{ 1 }{ 78 } \\ \mathbf{5} && \frac{ 77 }{ 78 } & \frac{ 269 }{ 286 } & \frac{ 241 }{ 286 } & \frac{ 1777 }{ 2574 } & \frac{ 1 }{ 2 } & \frac{ 87 }{ 286 } & \frac{ 11 }{ 78 } & \frac{ 1 }{ 26 } \\ \mathbf{6} && \frac{ 285 }{ 286 } & \frac{ 1401 }{ 1430 } & \frac{ 4007 }{ 4290 } & \frac{ 241 }{ 286 } & \frac{ 199 }{ 286 } & \frac{ 1 }{ 2 } & \frac{ 37 }{ 130 } & \frac{ 1 }{ 10 } \\ \mathbf{7} && \frac{ 1429 }{ 1430 } & \frac{ 197 }{ 198 } & \frac{ 1401 }{ 1430 } & \frac{ 269 }{ 286 } & \frac{ 67 }{ 78 } & \frac{ 93 }{ 130 } & \frac{ 1 }{ 2 } & \frac{ 7 }{ 30 } \\ \mathbf{8} && \frac{ 12869 }{ 12870 } & \frac{ 1429 }{ 1430 } & \frac{ 285 }{ 286 } & \frac{ 77 }{ 78 } & \frac{ 25 }{ 26 } & \frac{ 9 }{ 10 } & \frac{ 23 }{ 30 } & \frac{ 1 }{ 2 } \end{matrix}$$

The fractions could easily be given a common denominator of ${16 \choose 8}=12870$

$\endgroup$
3
  • $\begingroup$ Thank you for your answer this is very helpful! How would the formula change if there Wes not just good and bad but also neutral outcomes. The same question remains as picking x good before y bad, but now there are good, bad, and neutral tiles that make up the 16. $\endgroup$ Commented Jun 19, 2021 at 14:31
  • $\begingroup$ @user15156281 Any number of neutral tiles make no difference to the probabilities of $x$ good before $y$ bad, they just add to the expected time before the end of the game $\endgroup$
    – Henry
    Commented Jun 19, 2021 at 15:27
  • $\begingroup$ That makes sense. I really appreciate you helping me out on this! $\endgroup$ Commented Jun 19, 2021 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .