Beispiel #1
0
    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)
Beispiel #2
0
    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
Beispiel #3
0
    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
Beispiel #4
0
    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
Beispiel #5
0
    def Likelihood(self, data, hypo):
        lam = hypo
        k = data
        like = thinkbayes2.EvalPoissonPmf(k, lam)

        return like