# Scipy's parameterization of Generalized Gamma vs wikipedia's

Wikipedia's parameterization of the Generalized Gamma distributions pdf is relatively straightforward

$$f(t; a,d,p) = \frac{p/a^d}{\Gamma(d/p)} t^{d-1} e^{-(t/a)^p}$$

Scipy's parameterization of the pdf is $$f(t; a,c) = \frac{|c| t^{ca - 1}}{\Gamma(a)} e^{-t^c}$$

Im having trouble understanding where Scipy's parameterization came from. I attempted to prove the two were equivalent with algebra but I ended up with some leftover terms. How does the math work out and how do the parameters of each relate to eachother between the 2 parameterizations?

Attempt below

$$f(t; a,c) = f(t; z,c) = \frac{|c| t^{cz - 1}}{\Gamma(z)} e^{-t^c}\\ \frac{|c| t^{cz - 1}}{\Gamma(z)} e^{-t^c} = \frac{p/a^d}{\Gamma(d/p)} t^{d-1} e^{-(t/a)^p}\\ \text{guess substitution:}\:\: z = d/p\\ \frac{|c| t^{c(d/p) - 1}}{\Gamma(d/p)} e^{-t^c} = \frac{p/a^d}{\Gamma(d/p)} t^{d-1} e^{-(t/a)^p}\\ = |c| t^{c(d/p) - 1} e^{-t^c} = p/a^d t^{d-1} e^{-(t/a)^p}\\ \text{guess substitution:}\:\: c = p\\ |(p)| t^{(p)(d/p) - 1} e^{-t^p} = p/a^d t^{d-1} e^{-(t/a)^p}\\ = t^{d - 1} e^{-t^p} = p/a^d t^{d-1} e^{-(t/a)^p}\\ = e^{-t^p} = p/a^d e^{-(t/a)^p}\\$$

and this last line is where I've gotten stuck.

• Related paper: Crooks, "The Amoroso Distribution", arxiv.org/abs/1005.3274v2 Aug 22, 2021 at 15:41
• @JDoe I suggest you use a different variable for the two densities; they are on different scales and you will want to find the relationship between the corresponding random variables. Aug 23, 2021 at 0:28
• Scipy does not include the scale parameter $a.$ Therefore, you may set $a=1$ in the first formula before comparing them. There's little left to observe, because you can easily match parameters by comparing the forms of the two formulas. For instance, the "$\Gamma(a)$" in the second formula must coincide with the "$\Gamma(d/p)$" in the first formula and the power $t^c$ (within the argument of $\exp$ in the second formula) must coincide with the power $t^p$ present in the first formula.
– whuber
Aug 23, 2021 at 13:38
• @JDoe scipy uses the convention that all scale parameters are omitted from the definition of the PDF/CDF and instead exposed via the scale parameter in the methods, for instance pdf(x, a, c, loc=0, scale=1). This fact is crucial to understanding how to compare scipy methods with other resources like Wikipedia.
– Sycorax
Aug 23, 2021 at 17:27