What is the function that best fits this curve

64 Views Asked by At

I'd like to know what is the function that best fits this curve:

enter image description here

Edit In fact I am a software developer and I need to use this function for a naive random number generattion for a lifetime of people. The answer of my dreams include the equation as a function of the mean and standard deviation.

Thanks

2

There are 2 best solutions below

2
On BEST ANSWER

Perhaps Skew normal distribution may be of interest to you: https://en.wikipedia.org/wiki/Skew_normal_distribution

I tried: $ y=e^{-x^2/2}(1+erf(-3x))$ which has something looking similar to what you want.

(See http://www.wolframalpha.com/input/?i=plot+y%3De%5E%7B-x%5E2%2F2%7D(1%2Berf(-3x)))

It uses the erf function though, which may be tricky to plot using some softwares.

1
On

If you have enough with a qualitative fit rather than high accuracy, Hermite cubic interpolation should be good enough. It allows you to specify the ordinates and slopes at the endpoints.

In the given case, it reduces to $x^2(1-x)$. If you want a flatter curve on the left, try $x^n(1-x)$.

The mean and standard deviation can be adjusted by a mapping $x\to\dfrac{x-\mu}\sigma$.