Likelihood of N runs given a certain set of black and white balls

46 Views Asked by At

So the problem is:

Given a set of 9 black balls and 7 white balls. If you draw them randomly, How likely is it to exactly get 4 B-runs and 3 W-runs?

My first though was to draw the problem out, and just calculate the likelihood of every good solution and adding them up, but it will probably be too complicated to really do.

This has to be solvable by applying the same math that you use to solve basic urn problems.

2

There are 2 best solutions below

1
On BEST ANSWER

C Monsour has provided you with a correct answer. Here is another method.

A sequence of $9$ black and $7$ white balls is completely determined by choosing $9$ of the $9 + 7 = 16$ positions for the black balls. Therefore, there are $$\binom{16}{9}$$ sequences in the sample space.

Since there are four runs of black balls and three runs of white balls, a favorable sequence must begin with a black ball. Therefore, to count the favorable sequences, we need to count the number of ways of dividing the nine black balls into four runs and the seven white balls into three runs.

The number of ways nine black balls can be placed in four runs is the number of solutions of the equation $$b_1 + b_2 + b_3 + b_4 = 9$$ in the positive integers. A particular solution corresponds to the placement of three addition signs in the eight spaces between successive ones in a row of nine ones.
$$1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1$$ For instance, placing an addition sign in the third, fifth, and eighth spaces corresponds to the solution $b_1 = 3$, $b_2 = 2$, $b_3 = 3$, $b_4 = 1$. The number of such solutions is the number of ways we can select three of the eight spaces between successive ones to be filled with addition signs, which is $$\binom{8}{3}$$

The number of ways seven white balls can be placed in three runs is the number of solutions of the equation $$w_1 + w_2 + w_3 = 7$$ in the positive integers. A particular solution corresponds to the placement of two addition signs in the six spaces between successive ones in a row of seven ones. Therefore, the number of such solutions is the number of ways we can choose two of the six spaces between successive ones in a row of seven ones to be filled with addition signs, which is $$\binom{6}{2}$$

Thus, the number of favorable cases is $$\binom{8}{3}\binom{6}{2}$$ which gives the probability $$\frac{\dbinom{8}{3}\dbinom{6}{2}}{\dbinom{16}{9}}$$

4
On

It's not that tough to brute force this. The runs will be ordered BWBWBWB. So you need all the ordered partitions of 9 into 4 pieces, all the ordered partitions of 7 into 3 pieces, and multiple those numbers and then multiply by the 9! orders in which you could have chosen the black balls, the 7! in which you could have chosen the white balls, and divide by the 16! ways of choosing everything.

The partitions of 9 into 4 pieces with multiplicities:

6111 4 ways (the 6 could be anywhere)

5211 12 ways

4311 12 ways

4221 12 ways

3321 12 ways

3222 4 ways

for a total of 56.

The partitions of 7 into 3 pieces:

511 3 ways

421 6 ways

331 3 ways

322 3 ways

for a total of 15.

Thus, the answer is $\frac{15\cdot56\cdot7!\cdot9!}{16!}$, or about 7.3%