# 伯努利和二项分布

## 伯努利分布 The Bernoulli Distributions

Definition Bernoulli Distribution.A random variable X has the Bernoulli distribution with parameter $p$ ( $0\leq p\leq 1$ )if X can take only the values 0 and 1 and the probabilities are
$$Pr(X=1)=p$$
and
$$Pr(X=0)=1-p$$

$$f(x|p)= \begin{cases} p^x(1-p)^{1-x}&\text{ for }x=0,1\\ 0&\text{otherwise} \end{cases}$$
p.f.的表示方法可以看出伯努利分布是依赖于参数 $p$ 的，所以 $p$ 可以看成一个条件，那么我们后面所有类似的分布都可以将其p.f.或者p.d.f.写成这种形式。
c.d.f.（似乎我们学c.d.f的时候已经讲过了）可以被写成：
$$F(x|p)= \begin{cases} 0&\text{ for }x<0 \\ 1-p&\text{ for }0 < x < 1 \\ 1&\text{ for }x\geq 1 \end{cases}$$

### 期望 Expectation

$$E(X)=p\times1 + 0\times(1-p)=p$$

$$E(X^2)=p\times1^2 + (1-p)\times0^2=p$$

### 方差 Variance

$$Var(X)=E[(X-E(X))^2]\\ =(1-p)^2p+(-p)^2(1-p)=p(1-p)(1-p+p)=p(1-p)$$

$$Var(X)=E[X^2]-E^2[X]=p-p^2=p(1-p)$$

### 距生成函数 m.g.f.

\begin {aligned} \psi(t)=E[e^{tX}]=p(e^{t\times 1})+(1-p)(e^{t\times 0}) &\text{ for } -\infty<t<\infty \end {aligned}

### 伯努利过程 Bernoulli Trials/Process

Definition Bernoulli Trails/Process.If the random variables in a finite or infinite sequence $X_1,X_2,\dots$ and i.i.d.,and if each random variable $X_i$ has the Bernoulli distribution with parameter p,then it is said that $X_1,X_2,\dots$ are Bernoulli trials with parameter $p$ .An infinite sequence of Bernoulli trials is also called a Bernoulli Process.

## 二项分布 The Binomial Distributions

Definition Binomial Distribution.A random variable $X$ has the binomial distribution with parameters $n$ and $p$ if $X$ has a discrete distribution for which the p.f. is as follow:
$$f(x|n,p)= \begin{cases} \begin{pmatrix}n\\x\end{pmatrix} p^x(1-p)^{n-x }&\text{ for }x=0,1,\dots\\ 0&\text{otherwise} \end{cases}$$
in this distribution ,$n$ must be a positive integer, and $p$ must lie in the interval $0\leq p\leq 1$

Theorem If the random varibales $X_1,\dots,X_n$ from $n$ Bernoulli trials with parameter $p$ ,and if $X=X_1+\dots+X_n$ ,then $X$ has the binomial distribution with parameters $n$ and $p$

### 期望 Expectation

$$E(X)=\sum^{n}_{i=0}E(X_i)=np$$

1. 独立的随机变量的和的期望，等于期望的和

### 方差 Variance

$$Var(X)=\sum^{n}_{i=1}=np(1-p)$$

1. 独立的随机变量的和的方差，等于方差的和

### 距生成函数 m.g.f.

$$\psi(t)=E(e^{tX})=\Pi^{n}_{i=1}E(e^{tX_i})=(pe^t+1-p)^n$$

1. 独立的随机变量的和的m.g.f.，等于m.g.f.的累积

### 二项分布随机变量相加

Theorem If $X_1,\dots,X_n$ are independent random varibales,and if $X_i$ has the binomial distribution with parameters $n_i$ and $p$ ( $i=1,\dots,k$ ) ,then the sum $X_1+\dots+X_k$ has the binomial distribution with parameters $n=n_1+\dots+n_k$ and $p$ .

1. 所有随机变量相互独立
2. 参数 $p$ 必须相同

Subscribe