4 Binomial distribution
\[ \require{physics} \require{braket} \]
\[ \newcommand{\dl}[1]{{\hspace{#1mu}\mathrm d}} \newcommand{\me}{{\mathrm e}} \]
\[ \newcommand{\Exp}{\operatorname{E}} \newcommand{\Var}{\operatorname{Var}} \newcommand{\Mode}{\operatorname{mode}} \]
\[ \newcommand{\pdfbinom}{{\tt binom}} \newcommand{\pdfbeta}{{\tt beta}} \newcommand{\pdfpois}{{\tt poisson}} \newcommand{\pdfgamma}{{\tt gamma}} \newcommand{\pdfnormal}{{\tt norm}} \newcommand{\pdfexp}{{\tt expon}} \]
\[ \newcommand{\distbinom}{\operatorname{B}} \newcommand{\distbeta}{\operatorname{Beta}} \newcommand{\distgamma}{\operatorname{Gamma}} \newcommand{\distexp}{\operatorname{Exp}} \newcommand{\distpois}{\operatorname{Poisson}} \newcommand{\distnormal}{\operatorname{\mathcal N}} \]
Let \(\mathcal Y=\set{0,\ldots,n}\).
Definition 4.1 (Binomial distribution) \(Y\in\mathcal Y\) has a binomial distribution with probability \(\theta\), denoted by \(Y\sim\distbinom(n, \theta)\), if \[ p(y\mid\theta)=\pr\rdb{Y=y\mid \theta}=\pdfbinom(y,n,\theta)=\dbinom{n}{y}\theta^y(1-\theta)^{n-y}. \]
4.1 Expected values
Theorem 4.1 Let \(Y\sim\distbinom(n,\theta)\). Then \[ \Exp\sqb{Y}=n\theta. \]
Proof. \[ \begin{split} \Exp\sqb{Y}&=\sum_{y=0}^n\dbinom{n}{y}y\theta^y(1-\theta)^{n-y}=\sum_{y=0}^n\frac{n!}{y!(n-y)!}y\theta^y(1-\theta)^{n-y}\\ &=\sum_{y=1}^nn\theta\frac{(n-1)!}{(y-1)!(n-1-(y-1))!}\theta^{y-1}(1-\theta)^{n-y}\\ &=n\theta\sum_{y=0}^{n-1}\frac{(n-1)!}{y!(n-1-y)!}\theta^y(1-\theta)^{n-1-y}\\ &=n\theta(\theta+1-\theta)^{n-1}=n\theta. \end{split} \]
4.2 Variance
dd