Some Useful Tools in R

Saurav Sarma

2020-01-14

Incomplete Gamma Integral

Incomplete gamma integral arises when we try to integrate a exponential family of distribution halfway through its domain or we try to calculate the CDF.

Depending upon the limit they are termed as lower and upper incomplete gamma integral.

Lower Incomplete Gamma Integral

\[ \gamma(a,x) = \int_0^x e^{-t} t^{a-1} dt\]

Upper Incomplete Gamma Integral

\[\Gamma(a,x) = \int_x^\infty e^{-t} t^{a-1} dt\]

library(zipfR)

#Lower Incomple Gamma Integral
Igamma(1.2,3)
[1] 0.8527473
#Upper Incomplete Gamma Integral
Igamma(1.2,3, lower = F)
[1] 0.06542143