loglikelihood.normal

loglikelihood.normal, function

def autodiff pure loglikelihood.normal(mu: number, sigma: number, x: number): number

Returns the log-likelihood of observing x under a normal distribution with mean mu and standard deviation sigma.

Examples

table T = with
  [| as Mu, as Sigma, as X |]
  [| 0, 1, 0 |]
  [| 0, 2, 1 |]

T.LL = loglikelihood.normal(T.Mu, T.Sigma, T.X)

show table "Normal" with
  T.Mu
  T.Sigma
  T.X
  T.LL

This produces the following table:

Mu Sigma X LL
0 1 0 -0.9189385
0 2 1 -1.737086

See also

User Contributed Notes
0 notes + add a note