#!/usr/bin/env python3 from scipy.stats import beta aa = 5.3729222; bb = 0.018122864; x = 0.67276126; #ppf is the inverse CDF_P in scipy print(beta.ppf(x,aa,bb))