第 44 章 其他典型的單一參數模型 Other standard single-parameter models

44.1 正（常）態分佈僅均值已知（方差未知） Normal distribution with known mean but unknown variance

\begin{aligned} p(y | \sigma^2) & \propto (\frac{1}{\sqrt{\sigma^2}})^n \exp(-\frac{1}{2\sigma^2}\sum_{i = 1}^n(y_i - \theta)^2) \\ & = (\sigma^2)^{ - \frac{n}{2}} \exp(-\frac{n}{2\sigma^2}v) \end{aligned}

$v = \frac{1}{n}\sum_{i =1}^n(y_i - \theta)^2$

$p(\sigma^2) \propto (\sigma^2)^{-(\alpha + 1 )}\exp(-\beta/{\sigma^2})$

\begin{aligned} p(\sigma^2 |y) & \propto p(\sigma^2)\times p(y | \sigma^2) \\ & \propto (\frac{\sigma_0^2}{\sigma^2})^{\frac{\nu_0}{2} + 1} \exp\left( - \frac{\nu_0\sigma_0^2}{2\sigma^2}\right) \times (\sigma^2)^{ - \frac{n}{2}} \exp(-\frac{n}{2\sigma^2}v) \\ & \propto (\sigma^2)^{-(\frac{n + \nu_0}{2} +1)}\exp\left( -\frac{1}{2\sigma^2}(\nu_0\sigma_0^2 + n v) \right) \\ \Rightarrow \sigma^2|y & \sim \text{Inv-}\chi^2\left(n + \nu_0, \frac{\nu_0\sigma_0^2 + nv}{n + \nu_0}\right) \end{aligned}

44.2 泊松分佈模型的貝葉斯思路 Poisson distribution model under Bayesian framework

$p(y|\theta) = \frac{\theta^y e^{-\theta}}{y !} \text{, for } y = 0, 1, 2, \dots$

\begin{aligned} p(y | \theta) & = \prod_{i = 1}^n \frac{1}{y_i!} \theta^{y_i} e^{-\theta} \\ & \propto \theta^{t(y)}e^{-n\theta} \end{aligned}

$p(y|\theta) \propto e^{-n\theta} e^{t(y) \log\theta}$

$p(\theta) \propto (e^{-\theta})^\eta e^{\nu \log\theta}$

$p(\theta) \propto e^{-\beta \theta} \theta^{\alpha - 1}$

$\theta | y \sim \text{Gamma} (\alpha + n\bar{y}, \beta + n)$

\begin{aligned} p(y) & = \frac{p(y | \theta) p(\theta)}{p(\theta | y)} \\ & = \frac{\text{Poisson}(y | \theta) \text{Gamma}(\theta | \alpha, \beta)}{\text{Gamma}(\theta | \alpha + y, \beta + 1)} \\ & = \frac{\frac{1}{y !}\theta^y e^{-\theta} \times \frac{1}{\Gamma(\alpha)}\frac{(\beta\theta)^\alpha}{\theta}e^{-\beta\theta}}{\frac{1}{\Gamma(\alpha + y)}\frac{[(1 + \beta)\theta]^{\alpha +y} e^{-(1 + \beta)\theta}}{\theta}} \\ & = \frac{\Gamma(\alpha + y) \beta^\alpha}{\Gamma(\alpha) y! (1 + \beta)^{\alpha + y}} \end{aligned}

$p(y) = {\alpha + y -1\choose \alpha -1}\left( \frac{\beta}{\beta + 1} \right)^\alpha \left( \frac{1}{\beta + 1} \right)^y$

$\text{Neg-bin}(y | \alpha, \beta) = \int \text{Poisson}(y | \theta) \text{Gamma}(\theta | \alpha, \beta) d\theta$

44.3 泊松模型的其他表達形式 poisson model parameterized in terms of rate and exposure

$y_i \sim \text{Poisson}(x_i \theta)$

$p(y | \theta) \propto \theta^{\sum_i y_i} e^{-(\sum_i x_i)\theta }$

$\theta \sim \text{Gamma}(\alpha, \beta)$

$\theta | y \sim \text{Gamma}\left( \alpha + \sum_{i = 1}^n y_i , \beta + \sum_{i = 1}^nx_i \right)$