likelihood function of bernoulli distribution