Logo

4.2 Gamma Function

The "$h$" formulas presented in (2.2) and (2.12) are the identities corresponding to the lower incomplete gamma $\gamma \left( s,x \right)$ and complete gamma function ${\Gamma }\left( s \right)$, respectively. We can easily transform $\gamma \left( s,x \right)$ and ${\Gamma }\left( s \right)$ into an "$h$" function. Similarly, we can also specify the upper incomplete gamma $\Gamma \left( s,x \right)$ by the difference of the complete and lower incomplete gamma functions in a form of the "$h$" function
\begin{align*}
{\Gamma }\left( s \right)&={{C}^{s}}{\exp(-C)}{{h}^{-C}_{s-1}}, \\
\gamma \left( s,x \right)&={{x}^{s}}{\exp(-x)}h_{s-1}^{-x}, \\
\Gamma \left(s,x\right)&={{C}^{s}}{\exp(-C)}{{h}^{-C}_{s-1}}-{{x}^{s}}{\exp(-x)}h_{s-1}^{-x}.
\end{align*}

As noted, $C$ refers to a considerably larger number based on the discussion in Section 4.1. The ratio of the lower incomplete to complete gamma functions is defined as the regularized gamma function
\begin{equation*}
{P}\left( s,x \right)={{\left( \frac{x}{C} \right)}^{s}}\left(\frac{{\exp(C-x)}h_{s-1}^{-x}}{h_{s-1}^{-C}}\right).
\end{equation*}

We identify ten cumulative distribution functions that are associated with the gamma function. All of these functions can be expressed in a form of the "$h$" function and evaluated with arbitrary precision. We present all "$h$" formulas, including the gamma, Poisson, chi-sqaure distributions, Erlang, inverse-gamma, chi, noncentral chi, inverse chi-square, scaled inverse chi-square, and generalized normal distributions.

C1 Gamma distribution
\begin{equation*}
F\left( x;k,\theta \right) ={{\left( \frac{x}{\theta C} \right)}^{k}}\frac{{\exp\left(C-\tfrac{x} {\theta }\right)}h_{k-1}^{-\tfrac{x}{\theta }}}{h_{k-1}^{-C}},
\end{equation*}
where $k>0$ (shape parameter), $\theta >0$ (scale parameter), and $x\in \left[ 0,\infty \right)$.

C2 Poisson distribution
\begin{equation*}
F\left( k;\lambda \right)=1-{{\left( \frac{\lambda }{C} \right)}^{k+1}}\left( \frac{{\exp\left(C-\lambda \right)} h_{k}^{-\lambda }}{h_{k}^{-C}} \right),
\end{equation*}
where $\lambda >0$ (expected number of occurences) and $k\in {{\mathbb{Z}}^{+}_{0}}$.

C3 Chi-square distribution
\begin{equation*}
F\left( x;k \right) ={{\left( \frac{x}{2C} \right)}^{\tfrac{k}{2}}}\left( \frac{{\exp\left(C-\tfrac{x}{2}\right)}h_{\tfrac{k}{2}-1}^{-\tfrac{x}{2}}}{h_{\tfrac{k}{2}-1}^{-C}} \right),
\end{equation*}
where $k\in \mathbb{N}$ (degree of freedom) and $x\in \left[ 0,\infty \right)$.

C4 Erlang distribution
\begin{equation*}
F\left( x;k,\lambda \right)={{\left( \frac{\lambda x}{C} \right)}^{k}}\frac{{\exp\left(C-\lambda x\right)} h_{k-1}^{-\lambda x}}{h_{k-1}^{-C}},
\end{equation*}
where $k\in \mathbb{N}$ (shape parameter), $\lambda >0$ (rate parameter), and $x\in \left[ 0,\infty \right)$.

C5 Inverse-gamma distribution
\begin{equation*}
F\left( x;\alpha ,\beta \right) =1-{{\left( \frac{\beta }{Cx} \right)}^{\alpha }}\frac{{\exp\left(C-\tfrac{\beta }{x}\right)} h_{\alpha -1}^{-\tfrac{\beta }{x}}}{h_{\alpha -1}^{-C}},
\end{equation*}
where $\alpha>0$ (shape parameter), $\beta >0$ (scale parameter), and $x\in \left( 0,\infty \right)$.

C6 Chi distribution
\begin{equation*}
F\left( x;k \right)={{\left( \frac{x}{\sqrt{2C}} \right)}^{k}}\left( \frac{{\exp\left(C-\tfrac{{{x}^{2}}}{2}\right)}h_{\tfrac{k}{2}-1}^{-\tfrac{{{x}^{2}}}{2}}}{h_{\tfrac{k}{2}-1}^{-C}} \right), \end{equation*}
where $k>0$ (degree of freedom) and $x\in \left[ 0,\infty \right)$.

C7 Noncentral chi distribution
\begin{equation*}
F\left( x;k,\lambda \right) =\frac{{\exp\left(-\tfrac{{{\lambda }^{2}}}{2}\right)}}{{{2}^{\tfrac{k}{2}}}\Gamma \left( \frac{k}{2} \right)}\sum\limits_{i=0}^{\infty }{\frac{{{\left( \frac{\lambda }{2} \right)}^{2i}}{{x}^{\tfrac{k}{2}+i}}{\exp\left(-\tfrac{x}{2}\right)}h_{\tfrac{k}{2}-1+i}^{-\tfrac{x}{2}}}{i!\prod\limits_{j=1}^{i}{\left( \frac{k}{2}-1+j \right)}}},
\end{equation*}
where $k>0$ (degree of freedom), $\lambda >0$ (noncentrality parameter), and $x\in \left[ 0,\infty \right)$.

C8 Inverse-chi-square distribution
\begin{equation*}
F\left( x;\nu \right)=1-{{\left( \frac{1}{2Cx} \right)}^{\tfrac{\nu }{2}}}\frac{{\exp\left(C-\tfrac{1}{2x}\right)} h_{\tfrac{\nu }{2}-1}^{-\tfrac{1}{2x}}}{h_{\tfrac{\nu }{2}-1}^{-C}},
\end{equation*}
where $\nu >0$ (degree of freedom) and $x\in \left( 0,\infty \right)$.

C9 Scaled-inverse-chi-square distribution
\begin{equation*}
F\left( x;\nu ,{{\sigma }^{2}} \right)=1-{{\left( \frac{{{\sigma }^{2}}\nu }{2Cx} \right)}^{\tfrac{\nu }{2}}} \frac{{\exp\left(C-\tfrac{{{\sigma }^{2}}\nu }{2x}\right)}h_{\tfrac{\nu }{2}-1}^{-\tfrac{{{\sigma }^{2}}\nu }{2x}}} {h_{\tfrac{\nu }{2}-1}^{-C}},
\end{equation*}
where $\nu >0$ (degree of freedom), ${{\sigma }^{2}}>0$ (scale parameter), and $x\in \left( 0,\infty \right)$.

C10 Generalized normal distribution
\begin{equation*}
F\left( x;\mu ,\alpha ,\beta \right) =\frac{1}{2}\left[ 1+sgn\left( x-\mu \right)\left( \frac{\left| x-\mu \right|} {\alpha {{C}^{\tfrac{1}{\beta }}}} \right)\frac{{\exp\left(C-{{\left( \tfrac{\left| x-\mu \right|}{\alpha } \right)}^{\beta }}\right)} h_{\tfrac{1}{\beta }-1}^{-{{\left( \tfrac{\left| x-\mu \right|}{\alpha } \right)}^{\beta }}}}{h_{\tfrac{1}{\beta }-1}^{-C}} \right],
\end{equation*}
where $\mu \in \mathbb{R}$ (location parameter), $\alpha >0$ (scale parameter), $\beta >0$ (shape parameter), and $x\in \left( -\infty ,\infty \right)$.

Download [full paper] [supplementary materials] [.m files] [technical note]