I know that if I want to get a probability values from inteval a to b i have to calculate integaral from pdf my distribution. I know that my data has The Cauchy distribution, but i don't understand how can I get prob of interval for example from 95 to 100. How i can do it easy way or easy is not possible?
My code for hist of distribution:
# Display
plt.figure(figsize=(15,10))
ax = pdf.plot(lw=2, label='PDF', legend=True)
data.plot(kind='hist', bins=50, normed=True, label='Data', legend=True,
ax=ax, lw=2, color='g', alpha=0.4)
mu, std = norm.fit(data)
param_names = (best_dist.shapes + ', loc, scale').split(', ') if
best_dist.shapes else ['loc', 'scale']
param_str = ', '.join(['{}={:0.2f}'.format(k,v) for k,v in zip(param_names,
best_fir_paramms)])
dist_str = '{}(mu = {:0.2f}, std = {:0.2f})'.format(best_fit_name, mu, std)
ax.set_title(u'Distribution \n' + dist_str)
ax.set_ylabel('F(x)')
My code for hist values:
ser = Series(df)
out = pd.cut(ser, bins=[0, 85, 90, 92, 94, 96, 98, 100], include_lowest=True)
ax = out.value_counts(sort=False).plot.bar(rot=0, color='g', alpha=0.4,
title='Values', figsize=(10,8))
ax.set_xticklabels([c[1:-1].replace(',',' to') for c in out.cat.categories])
plt.show()
I want to get value of probability interval from 90 to 100. How can i do it by dint of python. Thank you.