likelihood of bernoulli distribution