I'm developing a system in Python that returns a specific number given a needed probability in a statistic curve
My dataset contains each value of this variable that I call "data". First I get this values and show the histogram of it
import pandas as pd
from scipy import stats
from fitter import Fitter
data = pd.read_csv("124_2.csv", encoding='ISO-8859-1',sep=';',decimal=',')
plt.hist(data)
plt.show()
After the histogram I fit it to the best curve
dist_names = ['rayleigh',
'pareto',
'exponnorm',
'alpha',
'loggamma',
'lognorm',
'laplace',
'beta',
'expon',
'gamma',
'lognorm',
'norm',
'pearson3',
'triang',
'uniform',
'weibull_min',
'weibull_max',
'invweibull']
f = Fitter(data)
f.fit()
f.summary()
f.get_best(method='sumsquare_error')
parameters from get_best = {'invweibull': (2.2940157, -3.159848, 17.021271)}
Now I get all parameters about the specific curve (in this case invweibull) What I need now is to give a probability number (example 95%) and the system retrieve me the number that it represents. In this exemple, the 50.35
The number of 95% probability is 50.35
How can I get this number given a probability?