bernoulli_dist function

Create a Bernoulli distribution object for energy testing