# Bayes Billiard Balls

I am reading the book Introduction to Probability by Joe Blitzstein, and I came across the following problem.

Using a story show that for any integers $$k$$ and $$n$$ with $$0 \le k \le n$$, $$\begin{equation*} \int_0^1 \binom{n} {k} x^k (1 - x)^{n - k} \, \mathrm{d} x = \frac{1} {n + 1} \end{equation*}$$

Here is a solution given in the text book.

We will show that both the left-hand and right-hand sides are equal to $$P(X = k)$$ where $$X$$ is a r.v. that we will construct.

Story 1 : Start with $$n+ 1$$ balls, $$n$$ white and $$1$$ gray. Randomly throw each ball on to the unit interval $$(0, 1)$$, such that the positions of the balls are i.i.d. $$\text{Unif}(0, 1)$$. Let $$X$$ be the number of white balls to the left of gray ball. Note that $$X$$ is discrete with support $$\{1, 2, \cdots, n \}$$. To find $$P(X = k)$$, we use LOTP by conditioning on the position of the gray ball. Let $$G$$ be the position of the gray ball. Conditional on $$G = p$$, the random variable $$X$$ has $$\text{Bin}(n, p)$$ distribution since we can consider each of the white balls to be an independent Bernoulli trial, where success is defined as landing to the left of $$p$$. The random variable $$G$$ has PDF $$f_G(p) = 1$$ since $$G \sim \text{Unif}(0, 1)$$. Therefore $$\begin{equation*} P(X = k) = \int_0^1 P(X = k \mid G = p) f_G(p) \, \mathrm{d} p = \int_0^1 \binom nk p^k (1 - p)^{n - k} \, \mathrm{d} p \end{equation*}$$

Story 2 : Start with $$n + 1$$ balls, all white. Randomly throw each ball onto to the unit interval. Then choose one ball at random and paint it gray. Again, let $$X$$ be the number of white balls to the left of gray ball. The event $$\{ X = k \}$$ is equivalent to the event "the $$(k + 1)$$th ball from the left is gray". Therefore $$\begin{equation*} P(X = k) = \frac{1} {n + 1} \end{equation*}$$ for $$k \in \{0, 1, \cdots , n \}$$.

Since $$X$$ has the same distribution in both the stories we have $$\begin{equation*} \int_0^1 \binom nk x ^ k (1 - x)^{n - k} \, \mathrm{d} x = \frac{1} {n + 1} \end{equation*}$$ for $$k \in \{0, 1, \cdots , n \}$$.

I have the following questions.

1. In Story 1 we have assumed that each ball is thrown randomly on to the unit interval $$(0, 1)$$, such that the positions of the balls are i.i.d. $$\text{Unif}(0, 1)$$. Where is the independence assumption used in the solution? In other words, will the same argument hold if we do not assume independence for position of balls?
2. In Story 2 we have assumed that each ball is equally likely to be painted gray. How is this related to Story 1? In other words, how is the assumption that each ball is equally likely to be painted gray used to conclude that $$X$$ has the same distribution in both the stories?
• FWIW, these "stories" are illustrated in my answer at stats.stackexchange.com/a/4684/919.
– whuber
Commented May 8, 2018 at 11:08
• If we assume mutually exclusive events, the stories will not hold. The two stories are equivalent because both are referring the selection of one ball from a sample of n+1 balls. I am still learning about the story of Bayes billiards balls: how they are used to derive solutions in probability. Commented Aug 19, 2021 at 20:31

1. The assumption of independence enables us to write a solution without using conditional probabilities or the product rule. By assuming that the position of each ball is independent of the position of every other ball, we can calculate the probabilities of combinations using simple exponents. With k representing the number of balls to the left in a particular trial and n-k represents the number of balls the right in a particular trial, we can use exponents to multiply n independent probabilities together (k + n - k = n) and get the probability of any particular combination. So, no, this solution would not work if we did not assume independence. We would need to use conditional probabilities instead of these simple count-based exponents if we did not assume independence.

2. Imagine that instead of randomly choosing a ball to paint gray, we always picked the leftmost ball and painted it gray. In that case, X would cease to be a random variable at all because it would always be 0. Likewise, if we always picked the rightmost ball or the kth ball from the left, X would similarly cease to be a random variable. Only by refusing to utilize our post-rolling knowledge of the balls' actual ordering on the table and by randomly choosing one to paint does the distribution of the random variable X remain the same in both stories.

First an error: You say $$X$$ is discrete with support $$\{1,2,\ldots,n\},$$ but that should be $$\{0,1,2,\ldots,n\},$$ including $$0.$$

Without the assumption of independence, you could have the following situation: Choose one number from$${}\sim\operatorname{Uniform}(0,1)$$ and put the first ball there. Then put all the other balls at that same point.

Then any one of them that you pick has that uniform distribution, but the argument doesn't work.

Recall that the binomial distribution is the distribution of the number of successes in $$n$$ independent trials with probability $$p$$ of success on each trial. Recall, for example, that when $$n$$ balls are sampled without replacement from an urn with $$n$$ balls, in which $$np$$ of them are labeled "success" and the rest "failure", then the marginal probability of success on every trial is $$p,$$ but the number of successes when the sample size is $$n$$ is not random at all; it is necessarily $$np.$$

As for your second question: The probability of the same event is the same probability. In both parts 1 and 2, the event is that the number of balls to the left of the grey ball is $$k.$$ And in both parts 1 and 2, the grey ball is equally likely to be in any of the $$n$$ positions.