Source: https://www.fmf.uni-lj.si/~jazbinsek/Praktikum5/Kotnakorelacijagama.pdf