1

I need to calculate what is the probability that the next event will be true if r out of n events were true. It is given that the probability for all events is equal and the probability is evenly distributed between 0 and 1.

I tried it myself and got stuck at an integral. $$ \frac{\int_0^1 \binom{n}{r}p^{r+1} (1-p)^{n-r}dp}{\int_0^1 \binom{n}{r} p^r (1-p)^{n-r}dp}$$ I think this integral evaluates to $\frac{r+1}{n+2}$ but I haven't had much success.

If it helps , the closest I think i have gotten is $$ \frac{\sum_{i=0}^{n-r} \frac{(-1)^i \binom{n-r}{i}}{r+i+2}}{\sum_{i=0}^{n-r} \frac{(-1)^i \binom{n-r}{i}}{r+i+1}} $$

Aditya Jain
  • 105
  • 6

1 Answers1

1

You can evaluate the integrals using repeated integration by parts. The boundary terms vanish, and in the denominator you accumulate exactly the factors in $\binom nr$ and one additional factor $\frac1{n+1}$.

The quotient comes out as

$$ \frac{\frac{r+1}{(n+1)(n+2)}}{\frac1{n+1}}=\frac{r+1}{n+2}\;. $$

Here’s the integration by parts for the denominator; the one for the numerator works analogously:

\begin{eqnarray} \int_0^1p^r(1-p)^{n-r}\mathrm dp &=& \left[-\frac{p^r(1-p)^{n-r+1}}{n-r+1}\right]_0^1+\int_0^1\frac{rp^{r-1}(1-p)^{n-r+1}}{n-r+1}\mathrm dp \\&=&\frac r{n-r+1}\int_0^1p^{r-1}(1-p)^{n-r+1}\mathrm dp \\&=&\frac{r(r-1)}{(n-r+1)(n-r+2)}\int_0^1p^{r-2}(1-p)^{n-r+2}\mathrm dp \\&=&\cdots \\&=&\frac{r!(n-r)!}{n!}\int_0^1(1-p)^n\mathrm dp \\&=&\frac{r!(n-r)!}{n!}\cdot\frac1{n+1}\;. \end{eqnarray}

joriki
  • 238,052
  • I am not very adept at calculus so I don't know what to apply integration by parts on. I did try using it. – Aditya Jain Jan 19 '20 at 13:30
  • @adityajain: I added the integration by parts for the denominator to the answer. The factor $p^r$ is repeatedly differentiated, the factor $(1-p)^{n-r}$ is repeatedly integrated. (You could also do it the other way around.) – joriki Jan 19 '20 at 14:38
  • You can avoid the integration by parts if you recognize the integral as $$B(r+1,n-r+1)=\frac{r!(n-r)!}{(n+1)!}.$$ – RobPratt Jan 19 '20 at 15:22
  • Oh i didnt think of recursion – Aditya Jain Jan 20 '20 at 02:25