From Christiansen+ (2015), the gamma CDF is defined (Equation 1) as:
$$F(x\,|\,a,b) = \frac{1}{b^a \Gamma(a)} \int_0^x t^{a-1} e^{-t/b}\,dt$$Scipy defines the incomplete gamma function as follows:
$$\gamma(a, x) = \frac{1}{\Gamma(a)} \int_0^x e^{-t} t^{a-1}\,dt$$These are almost the same. Substitute $u = t/b$ into the Christiansen+ function:
$$F(x\,|\,a,b) = \frac{1}{b^a \Gamma(a)} \int_0^{x/b} (bu)^{a-1} e^{-u}b\,du$$$$F(x\,|\,a,b) = \frac{1}{b^a \Gamma(a)} b^{a-1}b \int_0^{x/b} u^{a-1} e^{-u}\,du$$ $$F(x\,|\,a,b) = \frac{1}{\Gamma(a)} \int_0^{x/b} e^{-u} u^{a-1}\,du = \gamma(a, x/b)$$
This matches up with the Wikipedia definition of the gamma function CDF with $a \rightarrow k$ and $b \rightarrow \theta$.
So this should be how to evaluate the gamma CDF from Christiansen+:
In [3]:
from scipy.special import gammainc
def gamma_cdf(x, a, b, c):
return gammainc(a, (x-c)/b)
In [5]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
a, b, c = 4.35, 1.05, 4.1 #params from paper. 4.1 priv. comm. from Christiansen
snr = np.arange(0, 20, 0.1)
plt.plot(snr, gamma_cdf(snr, a, b, c));
But this is very different from what is in the paper (e.g. Figure 3). What's going on?