Definition:Bernoulli Distribution

Let $$X$$ be a discrete random variable on a probability space.

Then $$X$$ has the Bernoulli distribution with parameter $$p$$ if:


 * $$X$$ has exactly two possible values, e.g. $$\operatorname{Im} \left({X}\right) = \left\{{a, b}\right\}$$


 * $$\Pr \left({X = a}\right) = p$$


 * $$\Pr \left({X = b}\right) = 1 - p$$

where $$0 \le p \le 1$$.

That is, the probability mass function is given by:
 * $$p_X \left({x}\right) = \begin{cases}

p & : x = a \\ 1 - p & : x = b \\ 0 & : x \notin \left\{{a, b}\right\} \\ \end{cases}$$

Success or Failure
The actual values of $$a$$ and $$b$$ depends on the particular experiment in question.

However, it is conventional to consider that the outcome whose probability is $$p$$ is determined to be a success, while the other outcome is determined to be a failure.