Alternative formula for the Bernoulli pmf? If I understand correctly, a Bernoulli pmf just needs to assign a probability $p$ if there is a success $(x=1)$, and $1-p$ otherwise $(x = 0)$. Rather than the usual formula, can't the following function also satisfy this condition and represent a the pmf of a Bernoulli RV?
$
f(x) = xp + (1-x)(1-p).
$
So if $f(x=1) = p, f(x=0) = 1-p.$
What would be wrong in formulating it this way?
 A: There's nothing wrong with it as it evaluates the values, it should evaluate. The usual formulation however uses powers so it becomes a case of binomial distribution with $n=1$ sample size. Recall that the probability mass function of binomial distribution is
$$
{n \choose x} \,p^x (1-p)^{n-x}
$$
Where we have $n$ independent Bernoulli distributed with $x$ successes observed, hence $p^x$, and $n-x$ failures. The ${n \choose x}$ corrects for the fact that we want to account for the successes and failures appearing in any possible combination. With $n=1$ and $x \in \{0,1\}$ it reduces to Bernoulli distribution formulated with the powers
$$
\,p^x (1-p)^{1-x}
$$
A: Your alternative form is often written braced form as
$$
f(x)=\begin{cases} p & \text{if $x=1$} \\
                   1-p & \text{if $x=0$}
      \end{cases} $$
and there is nothing wrong with that. It might be useful, for instance, for programming and for elementary exposition.
But if you want to do any form of algebra or calculus, it is inconvenient, so the other form is preferred. But both forms are equally valid, it is only a pragmatic question of what works best for whatever you are doing with it.
A: This is fine, assuming that the domain of $f$ is $\{0,1\}$.
This is also true of the formulations in the other answers.
A different formulation involving the Iverson bracket is
\begin{align*}
f(x) = (1-p)[x=0]+p[x=1].\tag{1}
\end{align*}
One defines
\begin{align*}
[P] &= \begin{cases}
1, & \textrm{if $P$ is true}, \\
0, & \textrm{else.}
\end{cases}
\end{align*}
The Iverson bracket has many interesting algebraic properties that capture the logic of the statement $P$. One interesting difference with formulation (1) is that the domain of $f$ can be thought of as all of $\mathbb{Z}$ (or indeed all of $\mathbb{R}$).
This allows one to be loose with notation in a way that is totally rigorous.
For example, the expected value of $g(x)$ is
$$\sum_x g(x)f(x),$$
where the sum is typically understood to be over all of $\mathbb{Z}$, with the result
$$g(0)(1-p) + g(1)p.$$
