The Bernoulli random variable \(X\):

\[p_X(x) = \begin{cases} p, & \text{if $x = 1$,} \\ 1-p, & \text{if $x = 0$,} \\ 0, & \text{otherwise.} \\ \end{cases} \]
We refer to \(X\) as a Bernoulli RV with parameter \(p\).
Or simply
\[ X \sim \text{Bernoulli}(p) \]
Tossing a fair coin
\[ X \sim \text{Bernoulli}(0.5) \]
\[ X \sim \text{Bernoulli}(p) \]
\[ p_X(x) = \begin{cases} p, & \text{if $x = 1$,} \\ 1-p, & \text{if $x = 0$,} \\ 0, & \text{otherwise.} \\ \end{cases} \]
\[ \text{E}[X]=1 \cdot p + 0 \cdot (1-p)=p \]
\[ \begin{aligned} \text{var}(X)&=\text{E}[X^2]-\big(\text{E}[X]\big)^2 \\ \\ \text{E}[X^2]&=1^2 \cdot p + 0^2 \cdot (1-p)=p \\ \\ \text{var}(X)&=p-p^2=p(1-p) \end{aligned} \]