In docs.scipy.org there's code to sample data from a Pareto distribution and then fit a curve on top of the sampled data. I could understand most of the code snippet except the term max(count)*fit/max(fit)
in the call to plt.plot
.
Here's the code snippet:
import matplotlib.pyplot as plt
a, m = 3., 2. # shape and mode
s = (np.random.pareto(a, 1000) + 1) * m
count, bins, _ = plt.hist(s, 100, normed=True)
fit = a*m**a / bins**(a+1)
plt.plot(bins, max(count)*fit/max(fit), linewidth=2, color='r')
plt.show()
I thoroughly searched the web for the formula: max(count)*fit/max(fit) Even replaced the term 'fit' with pdf. But could not get any leads. Kindly explain the concept of what the formula is conveying.
I assumed the term 'fit' is used instead of PDF as they are using the formula of PDF for Pareto distribution for fit.