# Solving for probability in equation involving Beta function

Consider the equation $$p^\alpha(1-p)^\beta = cB(\alpha+1,\beta+1)$$ where $$c,\alpha,\beta>0$$ and $$B(\alpha,\beta)$$ is the Beta function.

Question: What is the probability $$p$$ as a function of $$c,\alpha,\beta$$?

• The Beta function in this equation is irrelevant. You simply want the inverse of the function $p^\alpha(1-p)^\beta$ which I believe can only be found for specific values of $\alpha,\beta$. – Peter Foreman Apr 25 at 22:35

As @Peter Foreman commented, you only need to find the zero of function $$f(p)=p^\alpha(1-p)^\beta-k$$ and, for the most general case, you will need some numerical method.
From a practical point of view, I think that it would be better to consider $$g(p)=\alpha \log(p)+\beta \log(1-p)-\log(k)$$ Its derivatives $$g'(p)=\frac{\alpha }{p}-\frac{\beta }{1-p}\qquad \text{and} \qquad g''(p)=-\frac{\alpha }{p^2}-\frac{\beta }{(1-p)^2} <0 \,\,\, \forall p$$ The first derivative cancels at $$p_*=\frac{\alpha }{\alpha +\beta }$$ which corresponds to a maximum (by the second derivative test. So, if $$g\left(\frac{\alpha }{\alpha +\beta }\right)=\alpha \log \left(\frac{\alpha }{\alpha +\beta }\right)+\beta \log \left(\frac{\beta }{\alpha +\beta }\right)-\log (k)$$ is positive, there will be roots to the equation. One root will be $$0 < p_1 <\frac{\alpha }{\alpha +\beta }$$ and the second one $$\frac{\alpha }{\alpha +\beta }< p_2 <1$$.
For example, let us use $$\alpha=10$$, $$\beta=17$$ and $$c=\frac 1 {15}$$. For the first root, the iterates would be $$\left( \begin{array}{cc} n & p_n \\ 0 & 0.185185 \\ 1 & 0.238691 \\ 2 & 0.258600 \\ 3 & 0.261070 \\ 4 & 0.261105 \end{array} \right)$$ and, for the second root, $$\left( \begin{array}{cc} n & p_n \\ 0 & 0.685185 \\ 1 & 0.561947 \\ 2 & 0.503743 \\ 3 & 0.490163 \\ 4 & 0.489394 \\ 5 & 0.489392 \end{array} \right)$$