Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with following exercise (it comes from Geoffrey G. Grimmett, David R. Stirzaker, Probability and Random Processes, Oxford University Press 2001, page 155, ex. 6):

Let $X$ have the binomial distribution bin($n$, $U$), where $U$ is uniform on $(0,1)$. Show that $X$ is uniformly distributed on $\{0,1,\ldots,n\}$.

So far I have this: $$P(X=k | U) = {n \choose k} U^k (1-U)^{n-k}$$ $$P(X=k) = \int_0^1 {n \choose k} u^k (1-u)^{n-k} f_U(u) \text{ d}u$$

where $f_U(u)$ is density function of random variable $X$, of course $\forall u \in (0,1)\ \ f_U(u) = 1$.

$$P(X=k) = {n \choose k} \int_0^1 u^k (1-u)^{n-k} \text{d}u$$ And I don't know what to do next... How to calculate this integral? Am I solving it right so far?

Thanks for your help.

share|cite|improve this question
up vote 5 down vote accepted

A way to avoid using pre-knowledge about Beta integrals (for a more conceptual explanation, see the second part of this post) is to compute the generating function of $X$, that is, $$ \mathbb E(s^X)=\sum_{k=0}^ns^k\mathbb P(X=k)=\int_0^1\sum_{k=0}^n\binom{n}ku^k(1-u)^{n-k}s^k\mathrm du. $$ By the binomial theorem, $$ \sum_{k=0}^n\binom{n}k(su)^k(1-u)^{n-k}=(1-(1-s)u)^n, $$ hence $$ \mathbb E(s^X)=\int_0^1(1-(1-s)u)^n\mathrm du\stackrel{[v=1-(1-s)u]}{=}\frac1{1-s}\int_s^1v^n\mathrm dv=\frac{1-s^{n+1}}{(n+1)(1-s)}, $$ that is, $$ \mathbb E(s^X)=\frac1{n+1}\sum_{k=0}^ns^k. $$ This formula should make apparent the fact that $X$ is uniform on $\{0,1,2,\ldots,n\}$...

...But the "real" reason why $X$ is uniform might be the following.

First, the distribution of a sum of i.i.d. Bernoulli random variables is binomial. Second, if $V$ is uniform on $[0,1]$, the random variable $\mathbf 1_{V\leqslant u}$ is Bernoulli with parameter $u$. Hence, if $(U_i)_{1\leqslant i\leqslant n}$ is i.i.d. uniform on $[0,1]$, the random variable $\sum\limits_{i=1}^n\mathbf 1_{U_i\leqslant u}$ is binomial with parameter $(n,u)$.

Thus, $X$ may be realized as $X=\sum\limits_{i=1}^n\mathbf 1_{U_i\leqslant U_{n+1}}$ where $(U_i)_{1\leqslant i\leqslant n+1}$ is i.i.d. uniform on $[0,1]$. The event $[X=k]$ occurs when $U_{n+1}$ is the $(k+1)$th value in the ordered sample $(U_{(i)})_{1\leqslant i\leqslant n+1}$. By exchangeability of the distribution of $(U_i)_{1\leqslant i\leqslant n+1}$, $U_{n+1}$ has as much chances to be at each rank from $1$ to $n+1$. This fact means exactly that $X$ is indeed uniform on $\{0,1,2,\ldots,n\}$.

share|cite|improve this answer
That's a cool solution! – Alex Jan 19 '13 at 23:53

The integral $$\int_0^1 x^\alpha (1 - x)^\beta dx$$ has a well-know representation in terms of $\Gamma$ functions. In the integer case, it boils down to factorials.

share|cite|improve this answer

Hint: Integrating by parts:

$$\int_0^1 u^k (1-u)^{n-k} \text{d}u = \frac{n-k}{k+1}\int_0^1 u^{k+1} (1-u)^{n-k-1} du$$
so repeat until the exponent of $(1-u)$ reduces to $0$ and you have $$\frac{1}{n \choose k} \int_0^1 u^{n} \text{d}u$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.