简体   繁体   中英

How can I add a kurtosis term in this Gaussian bell-curve formula?

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 v parameter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM