MathOverflow is a question and answer site for professional mathematicians. 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 Bernoulli trial with success rate $p$ and failure rate $1-p$ the odds of $k$ successes is $\binom{N}{k} p^k (1-p)^{N-k}$. I need to evaluate an integral $$ \int_0^1 dp p^k (1-p)^{N-k} = \frac{k!(N-k)!}{(N+1)!} $$ This was done with Mathematica, but you can use induction. To avoid mindlessly integrating, can you read this integral as an expectation and evaluate it probabilistically? Maybe after rescaling.

Maybe there's a name for Bernoulli trials where the success rate $p$ uniformly random.

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

More or less, yes.

share|cite|improve this answer
Thanks. I suppose this wasn't "research level"... I eventually came up with integrating $\mathbb{E}[\prod (1 + t X_i)]$ where $X_i$ are independent Bernoulli trials. Evaluate it two different ways. – john mangual Dec 25 '10 at 14:19
Selberg integral is related to this, right? – john mangual Dec 25 '10 at 14:26

The result corresponds to a special case of the Beta-binomial distribution, which can be generalized as follows.

Suppose that $Y \sim {\rm Beta}(\alpha,\beta)$, $\alpha,\beta>0$ real; thus $Y$ has density $f_Y{(p)} = p^{\alpha - 1} (1 - p)^{\beta - 1} /{\rm B}(\alpha ,\beta )$, $p \in [0,1]$, where ${\rm B}(x,y) = \Gamma(x)\Gamma(y)/\Gamma(x+y)$ is the Beta function. Further suppose that $X \sim {\rm binomial}(N,Y)$, $N \in \mathbb{N}$ fixed, meaning that given $Y=p$, $X \sim {\rm binomial}(N,p)$. Then, $X$ has a Beta-binomial distribution with parameters $N$, $\alpha$, and $\beta$. By the law of total probability, the probability mass function of $X$ is given, for $k=0,1,\ldots,N$, by $$ {\rm P}(X=k) = {\rm E}[{\rm P}(X=k|Y)] = \int_0^1 {{N \choose k}p^k (1 - p)^{N - k} f_Y (p)\,{\rm d}p}. $$ Hence, $$ \int_0^1 {p^{k + \alpha - 1} (1 - p)^{N - k + \beta - 1} \,{\rm d}p} = \frac{{{\rm B}(\alpha ,\beta )}}{{{N \choose k}}}{\rm P}(X = k). $$ Explicitly, the left-hand side is given by $$ \int_0^1 {p^{k + \alpha - 1} (1 - p)^{N - k + \beta - 1} \,{\rm d}p} = {\rm B}(k + \alpha ,N - k + \beta ) = \frac{{\Gamma (k + \alpha )\Gamma (N - k + \beta )}}{{\Gamma (N + \alpha + \beta )}} $$ (say, by definition of the Beta function), but this is, of course, not the point here: the point is the relation to the Beta-binomial distribution. In the special case where $\alpha=\beta=1$, we have $Y \sim {\rm uniform}[0,1]$, and by substitution we find that ${\rm P}(X=k)=1/(N+1)$. Hence the "uniform$[0,1]$-binomial distribution" is simply the discrete uniform distribution on $\lbrace 0,1,\ldots,N \rbrace$.

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.