def Likelihood(self, data, hypo): """Computes the likelihood of a test score, given efficacy.""" p_correct = hypo score = data k = self.exam.Reverse(score) n = self.exam.max_score like = thinkbayes.EvalBinomialPmf(k, n, p_correct) return like
def Likelihood(self, data, hypo): """Likelihood of the data given the hypothesis. data: number of particles counted hypo: number of particles hitting the counter, n """ k = data n = hypo p = self.f return thinkbayes.EvalBinomialPmf(k, n, p)