A Bernoulli random variable

*X*takes on two possible values, here

*0*and

*1*. The probability that

*X*assumes the value

*1*is

*p*and the probability that

*X*assumes the value

*0*is

*1 - p*.

#### Function List

- int Bernoulli_Random_Variate(double p)

This function returns*X*where*X*is the Bernoulli random variable which assumes the value*1*with probability*p*and the value*0*with probability*1 - p*where*0 ≤ p ≤ 1*.

#### Source Code

*C*source code is available for this routine: