loglikelihood.poisson

loglikelihood.poisson, function

def autodiff pure loglikelihood.poisson(lambda: number, k: number): number

Returns the log-likelihood of observing k under a Poisson distribution with mean lambda.

Examples

table T = with
  [| as Lambda, as K |]
  [| 2, 3 |]
  [| 5, 0 |]

T.LL = loglikelihood.poisson(T.Lambda, T.K)

show table "Poisson" with
  T.Lambda
  T.K
  T.LL

This produces the following table:

Lambda K LL
2 3 -1.712318
5 0 -5

See also

User Contributed Notes
0 notes + add a note