Bernouli Distribution

#Math
A Bernoulli random variable takes two values: $0$ and $1$, which are both specified by the below $p_X$ and functions

$X\sim\text{Bernoulli}(p)\text{ for }p\in (0,1)$

$p_X(x)= \begin{cases} p~~~\qquad\text{if }x=1\ 1-p\quad\text{if }x=0 \end{cases}$

$F_X(x) = \begin{cases} 0 ~~~~~~~\quad \text{if }x < 0\ 1 - p\quad\text{if }0 \le x < 1\ 1 ~~~\qquad \text{if }x \ge 1 \end{cases}$

$M_X(t) =$

$\mathbb{E}[X]=p$

$\text{var}(X)=p(1-p)$