Moment Generating Function of Bernoulli Distribution
Formula
$X \sim$ When $\operatorname{Bin}(1, p)$, the moment generating function of $X$ is given below.
$$ m(t) = 1 - p + pe^{t} = q + pe^{t}, \qquad q = 1 - p $$
Proof
For $p \in [0, 1]$, a discrete probability distribution with the following probability mass function is referred to as a Bernoulli distribution.
$$ f(x) = p^{x}(1-p)^{1-x}, \qquad x = 0, 1 $$
From the Definition of Moment Generating Function
By the definition of the moment generating function,
$$ \begin{align*} E(e^{tX}) &= \sum\limits_{x = 0, 1} e^{tx} f(x) \\ &= \sum\limits_{x = 0, 1} e^{tx} (1 - p)^{1-x} p^{x} \\ &= (1 - p) e^{t \cdot 0} p^{0} + p e^{t \cdot 1} (1 - p)^{1-1} \\ &= 1 - p + pe^{t} \end{align*} $$
■
From the Binomial Distribution
The Bernoulli distribution is a special case of the binomial distribution $\operatorname{Bin}(n, p)$ where $n = 1$. The moment generating function of the binomial distribution is as follows.
$$ m(t)= [1 - p + pe^{t}]^{n} $$
Therefore, the moment generating function of the Bernoulli distribution is as follows.
$$ m(t) = 1 - p + pe^{t} = q + pe^{t} $$
■