def Likelihood(self, data, hypo): """Computes the likelihood of the data under the hypothesis. hypo: goal rate in goals per game data: number of goals scored in a game """ lam = hypo goals = data return thinkbayes2.EvalPoissonPmf(goals, lam)
def Likelihood(self, data, hypo): """Computes the likelihood of the data under the hypothesis. Evaluates the Poisson PMF for lambda and k. hypo: goal scoring rate in goals per game data: goals scored in one period """ lam = hypo k = data like = thinkbayes2.EvalPoissonPmf(k, lam) return like
def Likelihood(self, data, hypo): """Computes the likelihood of the data under the hypothesis. Evaluates the Poisson PMF for lambda and k. hypo: elapsed time since the last train data: tuple of arrival rate and number of passengers """ x = hypo lam, k = data like = thinkbayes2.EvalPoissonPmf(k, lam * x) return like
def Likelihood(self, data, hypo): """Computes the likelihood of the data under the hypothesis. Evaluates the Poisson PMF for lambda and k. hypo: arrival rate in passengers per second data: tuple of elapsed_time and number of passengers """ lam = hypo x, k = data like = thinkbayes2.EvalPoissonPmf(k, lam * x) return like
def Likelihood(self, data, hypo): lam = hypo k = data like = thinkbayes2.EvalPoissonPmf(k, lam) return like