# 伽瑪分布

參數 機率密度函數 累積分布函數 ${\displaystyle k>0\,}$ shape (real)${\displaystyle \theta >0\,}$ scale (real) ${\displaystyle x\in (0;\infty )\!}$ ${\displaystyle x^{k-1}{\frac {\exp {\left(-x/\theta \right)}}{\Gamma (k)\,\theta ^{k}}}\,\!}$ ${\displaystyle {\frac {\gamma (k,x/\theta )}{\Gamma (k)}}\,\!}$ ${\displaystyle k\theta \,\!}$ no simple closed form ${\displaystyle (k-1)\theta \,\!}$ for ${\displaystyle k\geq 1\,\!}$ ${\displaystyle k\theta ^{2}\,\!}$ ${\displaystyle {\frac {2}{\sqrt {k}}}\,\!}$ ${\displaystyle {\frac {6}{k}}\,\!}$ ${\displaystyle k+\ln \theta +\ln \Gamma (k)\!}$${\displaystyle +(1-k)\psi (k)\!}$ ${\displaystyle (1-\theta \,t)^{-k}\,\!}$ for ${\displaystyle t<1/\theta \,\!}$ ${\displaystyle (1-\theta \,i\,t)^{-k}\,\!}$

## 記號

${\displaystyle X\sim \Gamma (\alpha ,\beta )}$ ${\displaystyle X\sim \Gamma (\alpha ,\lambda )}$

${\displaystyle f\left(x\right)={\frac {x^{\left(\alpha -1\right)}{\color {Red}\lambda }^{\alpha }e^{\left(-{\color {Red}\lambda }x\right)}}{\Gamma \left(\alpha \right)}}={\frac {x^{\left(\alpha -1\right)}e^{\left(-{\color {Red}{\frac {1}{\beta }}}x\right)}}{{\color {Red}\beta }^{\alpha }\Gamma \left(\alpha \right)}}}$ x > 0

${\displaystyle {\begin{cases}\Gamma (\alpha )=(\alpha -1)!&{\mbox{if }}\alpha {\mbox{ is }}\mathbb {Z} ^{+}\\\Gamma (\alpha )=(\alpha -1)\Gamma (\alpha -1)&{\mbox{if }}\alpha {\mbox{ is }}\mathbb {R} ^{+}\\\Gamma \left({\frac {1}{2}}\right)={\sqrt {\pi }}\end{cases}}}$

## 特性

### 母函數、期望值、變異數

${\displaystyle M_{x}\left(t\right)=E\left(e^{xt}\right)={\frac {\lambda ^{\alpha }}{\Gamma \left(\alpha \right)}}\int _{0}^{\infty }e^{xt}x^{\alpha -1}e^{-\lambda x}dx=\left({\frac {\lambda }{\lambda -t}}\right)^{\alpha }=\left(1-{\beta }{t}\right)^{-\alpha }}$
${\displaystyle K_{x}\left(t\right)=\ln M_{x}\left(t\right)=\alpha \left[\ln \lambda -\ln \left(\lambda -t\right)\right]}$
${\displaystyle {\frac {dK_{x}\left(t\right)}{dt}}={\frac {\alpha }{\lambda -t}},\quad when(t=0),E\left(X\right)={\frac {\alpha }{\color {Red}\lambda }}=\alpha {\color {Red}\beta }}$
${\displaystyle {\frac {d^{2}K_{x}\left(t\right)}{dt^{2}}}={\frac {\alpha }{\left(\lambda -t\right)^{2}}},\quad when(t=0),\sigma ^{2}\left(X\right)={\frac {\alpha }{\color {Red}{\lambda ^{2}}}}=\alpha {\color {Red}{\beta ^{2}}}}$

### Gamma的可加性

${\displaystyle \coprod {\begin{cases}r.v.X\sim \Gamma \left({\color {green}\alpha _{1}},\lambda \right)\\r.v.Y\sim \Gamma \left({\color {green}\alpha _{2}},\lambda \right)\end{cases}}\Longrightarrow X+Y\sim \Gamma \left({\color {green}\alpha _{1}+\alpha _{2}},\lambda \right)}$