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}} $$