# Name of the distribution $p^x(1-p)^{1-x}$?

We are given a random variable $$X$$ with PDF: \begin{align*} f(x ; p) &= p^x(1-p)^{1-x} \ , \\ \end{align*} where $$0 \leq p \leq 1$$ is the parameter and the support is $$x \in \{0,1\}$$.

Anyone knows what the name of this distribution is? And if so, could you please help me understand how I can infer to that? I only know of simple distributions such as uniform, gaussian...etc.

Update!

Thanks Minus One-Twelfth! I appreciate the quick answer, but I was hoping for some more elaboration on how I can infer to the distribution type.

• Note that $f(0;\,p)=1-p,\,f(1;\,p)=p$. – J.G. Mar 23 at 11:27
• "how I can infer to the distribution type" You either know the name or you don't. Regardless, knowing the name won't help you use it. The actual distribution (which you have a nice formula for there) is what lets you do that. – Arthur Mar 23 at 11:34

## 2 Answers

This is the Bernoulli distribution. Not sure what you mean by "infer to that".

This is the binomial distribution with $$n=1$$ trials $$\big(f(x)=\binom{1}{x}p^{x}(1-p)^{1-x}\big)$$, otherwise known as the Bernoulli distribution. It seems you are looking for intuition, so just note that, given $$p$$, the codomain of $$f(x)=p^{x}(1-p)^{1-x}$$ with $$x\in\{0,1\}$$ has cardinality 2; namely, $$f(x)\in\{p,1-p\}$$, which makes sense because if $$x=0$$, we get the probability of "failure" $$1-p$$, and if $$x=1$$, we get the probability of "success" $$p$$.