Function for generating values from Bernoulli distributions.
bernoulli(p:real) : int
0.0<=p<=1.0. The value returned is either 0 or 1. The function returns a drawing from a Bernoulli distribution with probability
p for success (i.e., success=1).
Bernoulli exception if
Throw a die and observe if a six was thrown. This experiment has a Bernoulli distribution with parameter
p=1/6 for success.
You must be logged in to post a comment.