LogLikelihood
✖
LogLikelihood
gives the log‐likelihood function for observations x1, x2, … from the distribution dist.
gives the log-likelihood function for the observations xi at time ti from the process proc.
gives the log-likelihood function for the observations from path1, path2, … from the process proc.
Details

- The log‐likelihood function LogLikelihood[dist,{x1,x2,…}] is given by
, where
is the probability density function at xi, PDF[dist,xi].
- For a scalar‐valued process proc, the log-likelihood function LogLikelihood[proc,{{t1,x1},{t2,x2},…}] is given by LogLikelihood[SliceDistribution[proc,{t1,t2,…}],{{x1,x2,…}}].
- For a vector‐valued process proc, the log-likelihood function LogLikelihood[proc,{{t1,{x1,…,z1},{t2,{x2,…,z2}},…}] is given by LogLikelihood[SliceDistribution[proc,{t1,t2,…}],{{x1,…,z1,x2,…,z2,…}}].
- The log-likelihood function for a collection of paths LogLikelihood[proc,{path1,path2,…}] is given by
LogLikelihood[proc,pathi].
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Get the log‐likelihood function for a normal distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-od6gxj

Compute a log‐likelihood for numeric data:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-0cu12

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-dyiizg

Plot log‐likelihood contours as a function of and
:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-d57rdp

Compute the log‐likelihood for multivariate data:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ekvidp

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-gf9yr4

Compute the log-likelihood for a process:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-qpn81m

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-8ozx37

Scope (12)Survey of the scope of standard use cases
Univariate Parametric Distributions (2)
Compute the log‐likelihood for a continuous distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-eu39i7

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-j3wpsc

Compute the log‐likelihood for a discrete distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-fgnof8

Plot the log‐likelihood, assuming is unknown:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cjpa2p

Multivariate Parametric Distributions (2)
Obtain the log‐likelihood for a continuous multivariate distribution with unknown parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ego0yg

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-c6uc1g

Visualize the log‐likelihood surface, assuming :

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-evkacj

For a multivariate discrete distribution with known parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-5gnmf

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bdihyc

Derived Distributions (5)
Compute the log‐likelihood for a truncated standard normal:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cnhaze

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bl5hmb

Plot the log‐likelihood contours as a function of the truncation points:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-lgny14

Compute the log‐likelihood for a constructed distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-xjacs


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-d6iz7v

Compute the log‐likelihood for a product distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-siutcl

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ove1pe

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-iqkewk

Obtain the result as a sum of the independent componentwise log‐likelihoods:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-djj9ap

Compute the log‐likelihood for a copula distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bcoybi

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-kajyvr
Plot the log‐likelihood as a function of the kernel parameter:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cirhpa

Compute the log‐likelihood for a component mixture:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-wcap1b

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-g5qjhs

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-dsbx4n

Random Processes (3)
Compute the log-likelihood of a continuous parametric process:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cs75ib

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-p0tbtg

Compute the log-likelihood of a scalar-valued discrete parametric process:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-mqlbiq

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-eld3yv

Plot the log‐likelihood as a function of the process parameter:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-52xkly

Compute the log-likelihood of a scalar-valued time series process:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-zh9md3

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ymrsh8

Compute the log-likelihood of a vector-valued time series process:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-k36by3

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-h5mb9e

Applications (4)Sample problems that can be solved with this function
Visualize the log‐likelihood surface for a distribution of two parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-hh5i95

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-m7xxjk

Visualize as contours of equal log‐likelihood:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-e00bj2

Show log-likelihood functions with mixed continuous and discrete parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bvhwer

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-7k5cjp


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-j5amgy

Solve for the Poisson maximum log-likelihood estimate in closed form:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-j96ax1


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-i1myd3

Compute a maximum log-likelihood estimate directly:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-crbq1v

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-exyi3y

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-e0bzeb

Label the optimal point on a plot of the log-likelihood function:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-lepzyu

Estimate the variance of the MLE estimator as the reciprocal of the expectation of second derivative of the log-likelihood function with respect to parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ncqygf

Properties & Relations (5)Properties of the function, and connections to other functions
LogLikelihood is the sum of logs of PDF values for data:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-fs61wa

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-hiudw6


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-5kxsv

LogLikelihood is the log of Likelihood:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bnand1

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-jyhke


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-q3x8b


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-fmqao1

EstimatedDistribution estimates parameters by maximizing the log‐likelihood:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cvbqgt

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-i7a7vi

FindDistributionParameters gives the parameter estimates as rules:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-pyzmqq

Visualize the log‐likelihood function near the optimal value:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-kudrs0

Log-likelihood of a process can be computed using its slice distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-sdxem7

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bb7exr


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ydisrd

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-c3qtc7


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-pw7f0w

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-1exu07


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-n1azj1
Vectorize the path values for use in the LogLikelihood of the time slice distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-gk1vja

Given a sample from a distribution , the difference between values of LogLikelihood for and the MLE estimated distribution doubled is random and follows ChiSquareDistribution with degrees of freedom equal to the number of distribution parameters:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-hvwr9m
Draw samples from a 5-parameter binormal distribution in 1000 batches:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-d3v2ef
Compute the difference of log-likelihoods for each batch:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-0qkmm
Check that the log-likelihood differences are consistent with ‐distribution:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-cnrjap


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-bew7em

Possible Issues (1)Common pitfalls and unexpected behavior
Log-likelihood of a continuous parametric process may be undefined:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-w3eatt

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-01fnmc


This is due to degenerate slice distribution at time 0:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-tc3yav


https://wolfram.com/xid/0hyxiu9ag5ft2nmp-ii4umh

Neat Examples (2)Surprising or curious use cases
Visualize isosurfaces for an exponential power log‐likelihood:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-hsh8v

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-c5qar6

Visualize isosurfaces for a bivariate normal log‐likelihood:

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-boxj9d

https://wolfram.com/xid/0hyxiu9ag5ft2nmp-jjaypq

Wolfram Research (2010), LogLikelihood, Wolfram Language function, https://reference.wolfram.com/language/ref/LogLikelihood.html (updated 2014).
Text
Wolfram Research (2010), LogLikelihood, Wolfram Language function, https://reference.wolfram.com/language/ref/LogLikelihood.html (updated 2014).
Wolfram Research (2010), LogLikelihood, Wolfram Language function, https://reference.wolfram.com/language/ref/LogLikelihood.html (updated 2014).
CMS
Wolfram Language. 2010. "LogLikelihood." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/LogLikelihood.html.
Wolfram Language. 2010. "LogLikelihood." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/LogLikelihood.html.
APA
Wolfram Language. (2010). LogLikelihood. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LogLikelihood.html
Wolfram Language. (2010). LogLikelihood. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LogLikelihood.html
BibTeX
@misc{reference.wolfram_2025_loglikelihood, author="Wolfram Research", title="{LogLikelihood}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/LogLikelihood.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_loglikelihood, organization={Wolfram Research}, title={LogLikelihood}, year={2014}, url={https://reference.wolfram.com/language/ref/LogLikelihood.html}, note=[Accessed: 16-April-2025
]}