Python Forum

Full Version: Beta Inverse Function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Everyone,

I'm looking for a Beta Inverse Function in Python.

Below is the explanation for the same:


Returns the inverse of the beta cumulative probability density function (BETA.DIST).

If probability = BETA.DIST(x,...TRUE), then BETA.INV(probability,...) = x. The beta distribution can be used in project planning to model probable completion times given an expected completion time and variability.

Below is the Excel version of this solution:
BETA.INV(probability,alpha,beta,[A],[B])
The BETA.INV function syntax has the following arguments:
Probability Required. A probability associated with the beta distribution.
Alpha Required. A parameter of the distribution.
Beta Required. A parameter the distribution.
A Optional. A lower bound to the interval of x.
B Optional. An upper bound to the interval of x.

Could you please navigate me for the correct solution in Python.

Many thanks in advance.

Regards,
Ankur K
I think you want to look at scipy.stats.
No Sir,

It just not have the required functionality.

Could you please let me know any other package where I can search.

Regards,
Ankur K
Isn't scipy.stats.beta.ppf the inverse of the CDF?
Nailed it ichabod801! Using scipy.stats.beta.ppf gave me exactly what I was looking for and matches Excel's Beta.INV function perfectly.
(Jul-23-2018, 08:18 PM)andrewmkeller Wrote: [ -> ]Nailed it ichabod801! Using scipy.stats.beta.ppf gave me exactly what I was looking for and matches Excel's Beta.INV function perfectly.

Uh, as a former statistician I am leary of using Excel as a benchmark. Wink