# Beta分布

Bernoulli过程就是多次的独立的试验形成的一个结果序列，这个系列中每个随机变量的成功概率就可以用Beta分布来建模。

## 贝塔函数 The Beta Function

🌰 ：

$$g_2(p|x)=\frac{p^x(1-p)^{n-x}}{\int^{1}_{0}q^x(1-q)^{n-x}dx} \text{ for }0<p<1$$

Definition The Beta Function .For each positive $\alpha$ and $\beta$ ,define:
$$B(\alpha,\beta)=\int^{1}_{0}x^{\alpha-1}(1-x)^{\beta-1}dx$$
the function B is called the beta function

Theorem For all $\alpha,\beta >0$ ,
$$B(\alpha,\beta)=\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}$$

## 贝塔分布的定义 Definition of the Beta Distributions

Definition Beta Distributions.Let $\alpha ,\beta >0$ and let X be a random variable with p.d.f.
$$f(x|\alpha,\beta)= \begin{cases} \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}x^{\alpha-1}(1-x)^{\beta-1}&\text{ for }0<x<1\\ 0&\text{otherwise} \end{cases}\tag{5.8.3}$$

$$f_2(p)=\frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}x^{\alpha-1}(1-x)^{\beta-1} \text{ , for }0<x<1$$
X在给定P=p条件下的概率函数：
$$g_1(x|p)=\begin{pmatrix}200\\x\end{pmatrix}p^x(1-p)^{220-x}\text{, for }x=0,\dots,220$$

\begin{aligned} g_2(p|100)&=\frac{\begin{pmatrix}220\\100\end{pmatrix}p^{100}(1-p)^{120} \cdot \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}x^{\alpha-1}(1-x)^{\beta-1}}{f_1(100)}\\ &=\frac{\begin{pmatrix}220\\100\end{pmatrix}\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)f_1(100)}p^{\alpha+100-1}(1-p)^{\beta+120-1} \end{aligned}

Theorem Suppose that $P$ has the beta distribution with parameters $\alpha$ and $\beta$ ,and the conditional distribution of $X$ given $P=p$ is the binomial distribution with parameters $n$ and $p$ .Then the conditional distribution of $P$ given $X=x$ is the beta distribution with parameters
$\alpha+x$ and $\beta+n-x$

## 贝塔分布的距 Moments of Beta Distributions

Theorem Moments.Suppose that X has the beta distribution with parameters $\alpha$ and $\beta$ .Then for each positive integer k,
$$E(X^k)=\frac{\alpha(\alpha+1)\dots(\alpha+k-1)}{(\alpha+\beta)(\alpha+\beta+1)\dots(\alpha+\beta+k-1)}$$
In particular,
$$E(X)=\frac{\alpha}{\alpha+\beta},\\ Var(X)=\frac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)}$$

For $k=1,2,\dots$

\begin{aligned} E(X^k)&=\int^{1}_{0}x^kf(x|\alpha,\beta)dx\\ &=\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\int^{1}_{0}x^{\alpha+k-1}(1-x)^{\beta-1}dx \end{aligned}

$$E(X^k)=\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\cdot\frac{\Gamma(\alpha+k)\Gamma(\beta)}{\Gamma(\alpha+k+\beta)}$$

beta分布有很多不同参数组合形式，计算器均值和c.d.f.是非常有用技能。

$$E(X)=\frac{\alpha}{\alpha+\beta}=0.791\Rightarrow \alpha=3.785\beta$$

Subscribe