I am working with a formula to generate a curve in Python. I am tuning its parameters so that I can eyeball its matching over an underlying curve (already plotted).
What I need is to adjust its Kurtosis, which currently is not a parameter of the formula:
def gaussian(x, peak_x, peak_y, sigma):
return numpy.exp(-numpy.power(x - peak_x, 2.) / (2 * numpy.power(sigma, 2.))) * peak_y
I would need to expand the function to this signature:
def gaussian(x, peak_x, peak_y, sigma, KURTOSIS)
But I don't know where and how to change the formula.
I'm not sure what you mean by add a Kurtosis term in the Gauassian Bell curve.
The Gaussian Bell curve (also called the Normal Distribution) has a zero Kurtosis. Once you specify the mean and the variance, the graph is uniquely defined.
Assuming that you want to fit a Gaussian-like distribution to your data, I would suggest using one of the Pearson distributions. Specifically, Pearson type VII. These distributions will give you the liberty to define the mean, variance, skewness and Kurtosis so you get a perfect fit. However, if I understand your requirement correctly, you won't even need that level of flexibility. The student's t-distribution should suffice.
You can find the equation on the Wikipedia page and tune the Kurtosis by tuning the
vparameter.