Lecture 4. B) Bernoulli

From Significant Statistics
Jump to navigation Jump to search

Bernoulli Distribution

A r.v. [math]X[/math] has a Bernoulli distribution with parameter [math]p\in\left[0,1\right][/math] if [math]X[/math] is discrete with p.m.f.

[math]f_{X}\left(x\right)=\begin{cases} p, & if\,x=1\\ 1-p, & if\,x=0\\ 0 & otherwise \end{cases}[/math]

The Bernoulli distribution captures the outcome of a binary experiment. For example, one could toss a biased coin, with probability of Heads equal to [math]p[/math].

Mean

[math]E\left(X\right)=\sum_{x\in S}xf_{X}\left(\left.x\right|p\right)=0.f_{X}\left(\left.0\right|p\right)+1.f_{X}\left(\left.1\right|p\right)=p,\,[/math] where [math]S=\left\{ x:f_{X}\left(\left.x\right|p\right)\gt 0\right\}[/math] is the support of [math]X[/math].

Variance

[math]Var\left(X\right)=E\left[\left(X-E\left(X\right)\right)^{2}\right]=E\left(X^{2}\right)-E\left(X\right)^{2}=\underset{0^{2}.f_{X}\left(\left.0\right|p\right)+1^{2}.f_{X}\left(\left.1\right|p\right)}{\underbrace{p}-p^{2}}=p\left(1-p\right)[/math]

MGF

[math]\begin{aligned} M_{X}\left(t\right) & =E\left(\exp\left(Xt\right)\right)=\sum_{x\in S}\exp\left(tx\right)f_{X}\left(\left.x\right|p\right)\\ & =\exp\left(t.0\right)f_{X}\left(\left.0\right|p\right)+\exp\left(t.1\right)f_{X}\left(\left.1\right|p\right)\\ & =1-p+\exp\left(t\right)p\end{aligned}[/math]