A random variable X has a Bernoulli distribution, denoted by X∼Bernoulli(p) if and only if it has the probability distribution function as
where p=P(X=1)