13
$\begingroup$

I saw some result that some article used, (without proving) that stated:$\int_0^1 p^k (1-p)^{n-k} \mathrm{d}p = \frac{k!(n-k)!}{(n+1)!}$

But I was wondering, how would you integrate it? How did this integral come about? Is it something to do with the binomial distribution?

  • 0
    Ahh okay, thanks for the heads up! :)2012-03-20

4 Answers 4

9

You can also proof it "by story". Let "random number" mean a number picked from $[0,1]$ with uniform probability. Then the formula below can be interpreted as follows.

$\int_0^1 p^k (1-p)^{n-k} \mathrm{d}p = \frac{k!(n-k)!}{(n+1)!}$

The left-hand side is the probability of taking random $p$ and then drawing a sequence of $n$ numbers from which some $k$ numbers are smaller than $p$ and some $n-k$ are larger.

To understand the right-hand side, consider $n+1$ random numbers sorted, so that first $k$ are the smallest and last $n-k$ are the largest (with $(k+1)$-th being our $p$ from left-hand side interpretation); however, there are $(n+1)!$ permutations total, with $k!(n-k)!$ having the desired property (in a sorted sequence we disregard the order of first $k$ and last $n-k$), thus the right-hand side fraction denotes the same probability.

  • 0
    @Yola Then I suggest this: imagine the same problem, but say that $p \in \{0, 1/2\}$ (each happening with probability $1/2$). Work out the formula on the left. Then consider $p \in \{0/4, 1/4, 2/4, 3/4\}$ (all with probabilities $1/4$). Then consider $p \in \{0/8, 1/8, \ldots, 7/8\}$, and so on. When you spot the common theme, do $p \in \{0/2^m, 1/2^m, \ldots, (2^m-1)/2^m\}$. Going with $m$ to infinity is exactly the step that makes that sum an integral (here such a simplified integration is possible, because we are integrating a polynomial, which is a very well-behaved function on [0,1]).2018-01-22
8

This can be proven using repeated integration by parts: $\begin{eqnarray} \int_0^1 p^k(1-p)^{n-k} &=& \frac{1^{k+1}(1-1)^{n-k}}{k+1}-\frac{0^{k+1}(1-0)^{n-k}}{k+1}+\frac{n-k}{k+1}\int_0^1 p^{k+1}(1-p)^{n-k-1}\\ &=& \frac{n-k}{k+1}\int_0^1 p^{k+1}(1-p)^{n-k-1}\\ &=& \frac{(n-k)(n-k-1)}{(k+1)(k+2)}\int_0^1 p^{k+2}(1-p)^{n-k-2}\\ &\vdots&\\ &=& \frac{k!(n-k)!}{n!}\int_0^1 p^{n}=\frac{k!(n-k)!}{n!}\frac{1}{n+1}=\frac{k!(n-k)!}{(n+1)!}\\ \end{eqnarray}$

8

There are probably several ways. An easy one is by induction on $k$.

If $k=0$, then $ \int_0^1(1-p)^n\,dp=\left.-\frac{(1-p)^{n+1}}{n+1}\right|_0^1=\frac1{n+1}=\frac{0!(n-0)!}{(n+1)!}. $ Now assume that the formula holds for some $k$. Then, integrating by parts, $\begin{eqnarray} \int_0^1p^{k+1}(1-p)^{n-(k+1)}\,dp&=&\int_0^1p^{k+1}(1-p)^{(n-1)-k}\,dp\\ &=&\left.-\frac{p^{k+1}(1-p)^{n-k}}{n-k}\right|_0^1+\int_0^1\frac{(k+1)p^k(1-p)^{n-k}}{n-k}\,dp\\ &=&\frac{(k+1)}{n-k} \frac{k!(n-k)!}{(n+1)!}\\ &=&\frac{(k+1)!(n-(k+1))!}{(n+1)!}. \end{eqnarray}$ The induction principle then guarantees that the formula holds for all $k$.

  • 1
    Thanks martin, didnt realise I could do it by induction!2012-03-20
8

Not a natural derivation, but there is slightly different approach toward it.

Let's consider the quantity

$I(n,k) = \int_{0}^{1} \binom{n}{k} p^k (1-p)^{n-k} \; dp.$

Then by integration by parts, as in two former answers, we have

$I(n, k+1) = I(n, k).$

Let $I$ denote this common value. Thus

$1 = \int_{0}^{1} 1 \; dp = \int_{0}^{1} \sum_{k=0}^{n} \binom{n}{k} p^k (1-p)^{n-k} \; dp = \sum_{k=0}^{n} I = (n+1)I$

and the result follows.

  • 1
    Thanks for your help sos440, nice to see a diff. way also!2012-03-20