Cosine power approximation to normal

The Endeavour 2020-07-21

Ten years ago I wrote about how cosine makes a decent approximation to the normal (Gaussian) probability density. It turns out you get a much better approximation if you raise cosine to a power.

If we normalize cosk(t) by dividing by its integral

\int_{-\pi/2}^{\pi/2} \cos^k(t)\, dt = \sqrt{\pi}\,\, \frac{\Gamma\left( \frac{k+1}{2}\right) }{\Gamma\left( \frac{k+2}{2}\right)}

we get an approximation to the density function for a normal distribution with mean 0 and variance 1/k.

Here are the plots of cosk(t), normalized to integrate to 1, for k = 1, 2, and 3.

And here’s a plot of cos3(t) compared to a normal with variance 1/3.

And finally here’s a plot of L² error, the square root of the integral of the square of the approximation error, as a function of k.