# Theory of 'Runs' and probability

I want to know how did author compute the probability of eleven runs if all arrangements are equally probable.

My attempt to answer my own question:

This example indicates wide applicability of the probability model of placing randomly r balls into n cells. Here n cells = 16 seats and r balls = 5 persons. Such an event is completely described by its occupancy numbers $$r_1,r_2,..., r_n$$ where $$r_k$$ stands for the number of persons in the kth seat. Every n-tuple of integers satisfying $$r_1 + r_2 + ...+ r_n= r, r_k \geq 0$$ desribes the possible configuration of occupancy numbers. With indistinguishable persons, two distributions are distinguishable only if the corresponding n-tuples $$(r_1, r_2, ..., r_n)$$ are not identical.

The number of distinguishable distributions is $$Arrangement_{r,n} =\binom{n + r -1}{r} =\binom{n + r -1}{n-1}$$

So, in this case, the total sample space is $$\binom{16 + 5 -1}{5} = \binom{20}{5} = \binom{16 + 5 -1 = 20}{ 16 - 1 =15}= 15504.$$

Now, we can choose 5 seats to occupy from 11 runs in $$\binom{11}{5}=462$$ ways.

We can choose 5 seats from 10 runs in$$\binom{10}{5}= 252$$ ways.

We can choose from 5 seats from 9 runs in $$\binom{9}{5}=126$$ ways.

And lastly we can choose 5 seats from 8 runs in $$\binom{8}{5}= 56$$ ways.

So, the total number of ways of selecting 11 runs are 462 + 252 + 126 + 56 = 896. The total sample space is 15504.

Hence the probability of eleven runs if all arrangements are equally probable is $$\frac{896}{15504} = 0.0578$$ which matches with author's answer as well.

Is this answer computed by me and its method of computation correct?

Note: This paragraph is taken from the book " An Introduction to Probability Theory and its Application Volume 1" written by William Feller.Third edition Page number 59

• Thanks. If I follow it correctly, there appears to be an explanation of how to calculate it on the very next page, starting at "Given a indistinguishable alphas and b indistinguishable betas...". Taking $a=5, b=11, n_1=5, n_2=6$ (from $EOEEOEEEOEEEOEOE$), and following the logic of that section the probability should be ${{a-1}\choose{n_1-1}}{{b-1}\choose{n_2-1}}/{{a+b}\choose{a}}$. For which I get $0.0577$; I assume the difference in the last figure is simple rounding/truncation error. Commented Aug 4, 2022 at 9:15
• However, it appears that we have access to different editions, so perhaps that section I mention is not in your edition. Commented Aug 4, 2022 at 9:26
• On second thought, that calculation seems to condition on things that the statement on the page you show does not, and which your own calculations don't either. The similarity in answers is coincidence. The later section on Theorems on Runs is rather the relevant part Commented Aug 4, 2022 at 9:40
• Similarity of my answer with the author's answer is not a coincidence. However, I agree that the author's computed answer is helpful in my correct, logical thinking. Author's answer was a guide to compute the correct answer. Commented Aug 4, 2022 at 10:13

No, because it doesn't have a sample space of equally-probable outcomes. The stated problem is to find the probability that there will be $$11$$ runs in a random arrangement of $$5$$ 'O's and $$11$$ 'E's, these arrangements being equally probable. Thus, the sample space is the set of such arrangements, of which there are $$\binom{16}{5}=8736$$. The correct answer is then $${\binom{5-1}{5-1}\binom{11-1}{5}\over \binom{16}{5}}={\binom{10}{5}\over \binom{16}{5}}={504\over 8736}={3\over 52}=0.05769...$$
Obviously (since 'O'- and 'E'-runs must alternate), generally the number of 'O'-runs and the number of 'E'-runs must either be equal or they must differ by exactly $$1$$; thus, here $$11$$ runs can occur only with $$5$$ 'O'runs and $$6$$ 'E' runs (and not vice versa, because there are only $$5$$ 'O's altogether). Now, the number of arrangements of $$a$$ 'O's and $$b$$ 'E's, such that there are $$n_1$$ 'O'-runs and $$n_1+1$$ 'E'-runs is (by a "stars-and-bars" argument), $${{a-1}\choose{n_1-1}}{{b-1}\choose{n_1}}$$ which gives the stated result. This is consistent with Feller's Theorem 11.18, which he states as a problem at the end of the section; so the answer "0.0578..." given in the book is not quite correct.
(For what it's worth, I also confirmed this result by computing it via Python by brute force, inspecting all the length-$$16$$ binary sequences having $$5$$ 'O's and $$11$$ 'E's, tallying those having exactly $$11$$ runs.)