Likelihood[dist,{x1,x2,…}]
gives the likelihood function for observations x1, x2, … from the distribution dist.
Likelihood[proc,{{t1,x1},{t2,x2},…}]
gives the likelihood function for the observations xi at time ti from the process proc.
Likelihood[proc,{path1,path2,…}]
gives the likelihood function for observations from path1, path2, … from the process proc.
Likelihood
Likelihood[dist,{x1,x2,…}]
gives the likelihood function for observations x1, x2, … from the distribution dist.
Likelihood[proc,{{t1,x1},{t2,x2},…}]
gives the likelihood function for the observations xi at time ti from the process proc.
Likelihood[proc,{path1,path2,…}]
gives the likelihood function for observations from path1, path2, … from the process proc.
Details
- The likelihood function Likelihood[dist,{x1,x2,…}] is given by
, where
is the probability density function at xi, PDF[dist,xi]. - For a scalar‐valued process proc the likelihood function Likelihood[proc,{{t1,x1},{t2,x2},…}] is given by Likelihood[SliceDistribution[proc,{t1,t2,…}],{{x1,x2,…}}].
- For a vector-valued process proc the likelihood function Likelihood[proc,{{t1,{x1,…,z1}},{t2,{x2,…,z2}},…}] is given by Likelihood[SliceDistribution[proc,{t1,t2,…}],{{x1,…,z1,x2,…,z2,…}}].
- The likelihood function for a collection of paths Likelihood[proc,{path1,path2,…}] is given by ∏iLikelihood[proc,pathi].
Examples
open all close allBasic Examples (4)
Get the likelihood function for a normal distribution:
Likelihood[NormalDistribution[μ, σ], {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3], Subscript[x, 4], Subscript[x, 5]}]Compute a likelihood for numeric data:
data = RandomVariate[GammaDistribution[2, 3], 100];Likelihood[GammaDistribution[2, 3], data]Plot likelihood contours as a function of
and
on a log scale:
ContourPlot[Log[Likelihood[GammaDistribution[α, β], data]], {α, 1, 3}, {β, 1, 5}]Compute the likelihood for multivariate data:
data = RandomVariate[BinormalDistribution[.8], 100];Likelihood[BinormalDistribution[ρ], data]Compute the likelihood for a process:
proc = WienerProcess[];
data = RandomFunction[proc, {1, 2, .1}];LogLikelihood[proc, data]Scope (12)
Univariate Parametric Distributions (2)
Compute the likelihood for a continuous distribution:
data = RandomVariate[GumbelDistribution[3, 6], 100];Likelihood[GumbelDistribution[3, 6], data]Compute the likelihood for a discrete distribution:
Likelihood[GeometricDistribution[1 / 4], Range[10]]Plot the likelihood, assuming
is unknown:
LogPlot[Likelihood[GeometricDistribution[p], Range[10]], {p, 0.01, 0.99}]Multivariate Parametric Distributions (2)
Obtain the log‐likelihood for a continuous multivariate distribution with unknown parameters:
data = RandomVariate[DirichletDistribution[{2, 5, 10}], 100];like = Likelihood[DirichletDistribution[{Subscript[γ, 1], Subscript[γ, 2], Subscript[γ, 3]}], data]Visualize the log of the likelihood surface, assuming
:
Plot3D[Log[like /. Subscript[γ, 3] -> 3], {Subscript[γ, 1], 0.1, 2.2}, {Subscript[γ, 2], 1.1, 2.9}]For a multivariate discrete distribution:
𝒟 = MultinomialDistribution[100, {.3, .2, .5}];data = RandomVariate[𝒟, 100];Likelihood[𝒟, data]Derived Distributions (5)
Compute the likelihood for a truncated standard normal:
𝒟 = TruncatedDistribution[{-1, 3 / 2}, NormalDistribution[]];
data = RandomVariate[𝒟, 100];Likelihood[TruncatedDistribution[{-1, 3 / 2}, NormalDistribution[]], data]Compute the likelihood for a constructed distribution:
data = {1.4, 5.1, 1.7, 1.6, 1.1, 3.9, 2.2, 1.3, 2., 1.5};dist = ProbabilityDistribution[λ Exp[λ(min - x)], {x, min, Infinity}, Assumptions -> λ > 0 && min > 0]Likelihood[dist, data]//SimplifyVisualize the likelihood contours as a function of the lower bound and
:
ContourPlot[Likelihood[dist, data], {min, 0.4, Min[data]}, {λ, .1, 2}]Compute the likelihood for a product distribution:
𝒟 = ProductDistribution[BetaDistribution[2, 3], LaplaceDistribution[10, 1]];
data = RandomVariate[𝒟, 10];Likelihood[𝒟, data]Obtain the result as a product of the independent componentwise likelihoods:
Likelihood[BetaDistribution[2, 3], data[[All, 1]]] * Likelihood[LaplaceDistribution[10, 1], data[[All, 2]]]Compute the likelihood for a copula distribution:
𝒟 = CopulaDistribution[{"Frank", α}, {GammaDistribution[2, 3], ChiSquareDistribution[10]}];SeedRandom[34];
data = RandomVariate[𝒟 /. α -> 3, 50];Plot the likelihood as a function of the kernel parameter:
LogPlot[Likelihood[𝒟, data], {α, 1.01, 10}]Compute the likelihood for a component mixture:
𝒟 = MixtureDistribution[{1 / 3, 2 / 3}, {GammaDistribution[2, 3], NormalDistribution[1, 1 / 4]}];data = RandomVariate[𝒟, 100];Likelihood[𝒟, data]Random Processes (3)
Compute the likelihood of a continuous parametric process:
proc = GeometricBrownianMotionProcess[1, 2, 1];
data = RandomFunction[proc, {1, 2, .1}];Likelihood[proc, data]Compute the likelihood of a scalar-valued discrete parametric process:
proc = BinomialProcess[.3];
data = RandomFunction[proc, {10}];Likelihood[proc, data]Plot the likelihood as a function of the process parameter:
Plot[Likelihood[BinomialProcess[p], data], {p, 0, 1}]Compute the likelihood of a scalar-valued time series process:
proc = ARMAProcess[{.3, .2}, {-.8}, 1];
data = RandomFunction[proc, {100}];Likelihood[proc, data]Compute the likelihood of a vector-valued time series process:
phi = {{{.2, .1}, {.3, .1}}};
sigma = {{1, .3}, {.3, .5}};
proc = ARProcess[phi, sigma];
data = RandomFunction[proc, {100}];Likelihood[proc, data]Applications (2)
Solve for the Poisson maximum likelihood estimate in closed form:
like = Likelihood[PoissonDistribution[μ], {x, y, z}]Solve[Refine[D[like, μ] == 0, x > 0 && y > 0 && z > 0], μ]Compute a maximum likelihood estimate directly:
data = RandomVariate[GeometricDistribution[1 / 2], 100];lfun[p_] = Likelihood[GeometricDistribution[p], data];Maximize using the log of the likelihood for numeric stability:
max = FindMaximum[{Log[lfun[p]], 0 < p < 1}, p]Label the optimal point on a plot of the likelihood function:
LogPlot[lfun[p], {p, .01, .99}, Epilog -> {Directive[Orange, PointSize[.05]], Point[{p /. max[[2]], max[[1]]}]}]Properties & Relations (4)
Likelihood is a product of PDF values for the data:
𝒟 = ChiSquareDistribution[10];
data = RandomVariate[𝒟, 100];Likelihood[𝒟, data]Apply[Times, PDF[𝒟, data]]The log of Likelihood is LogLikelihood:
𝒟 = BetaDistribution[2, 6];
data = RandomVariate[𝒟, 100];llhd = Likelihood[𝒟, data]Log[llhd]LogLikelihood[𝒟, data]EstimatedDistribution estimates parameters by maximizing the likelihood:
𝒟 = BinomialDistribution[10, p];
SeedRandom[14];
data = RandomVariate[𝒟 /. p -> .14, 100];EstimatedDistribution[data, 𝒟]FindDistributionParameters gives the parameter estimates as rules:
phat = FindDistributionParameters[data, 𝒟]Visualize the likelihood function near the optimal value:
Show[Plot[Likelihood[𝒟, data], {p, .1, .2}, PlotRange -> All], Graphics[{PointSize[Large], Orange, Point[{p, Likelihood[𝒟, data]} /. phat]}]]Likelihood of a process can be computed using its slice distribution:
proc = ARMAProcess[{.3, -.2}, {.8}, .5];
data = RandomFunction[proc, {100}];Likelihood[proc, data]dist = proc[data["Times"]];Likelihood[dist, data["ValueList"]]phi = {{{.2, .1}, {.3, .1}}};
sigma = {{1, .3}, {.3, .5}};
proc = ARProcess[phi, sigma];
data = RandomFunction[proc, {100}];Likelihood[proc, data]dist = proc[data["Times"]];Vectorize the path values for use in the LogLikelihood of the time slice distribution:
Likelihood[dist, Flatten /@ data["ValueList"]]Possible Issues (1)
Likelihood of a continuous parametric process may be undefined:
proc = GeometricBrownianMotionProcess[1, 3, 1 / 4];
data = RandomFunction[proc, {0, .2, .1}];Likelihood[proc, data]This is due to degenerate slice distribution at time 0:
Plot[Table[PDF[proc[t], x], {t, r = {10^-4, 10^-3, 10^-2, 10^-1}}]//Evaluate, {x, 0.1, 0.6}, PlotRange -> All, PlotLegends -> (Row[{"t = ", #}]& /@ N@r)]data = RandomFunction[proc, {0.1, 1, .1}];
Likelihood[proc, data]Neat Examples (2)
Visualize isosurfaces for an exponential power likelihood:
data = {2.03, 2.92, 3.32, 1.51, 2.28, 2.13, 2.09, 1.12, 0.73, 1.06};ContourPlot3D[Likelihood[ExponentialPowerDistribution[k, μ, σ], data]//Evaluate, {k, 0.5, 2}, {μ, 1.5, 2.5}, {σ, 0.5, 1.3}]Visualize isosurfaces for a bivariate normal likelihood:
data = {{2.03, 2.92}, {3.32, 1.51}, {2.28, 2.13}, {2.09, 1.12}, {0.73, 1.06}};ContourPlot3D[Evaluate@Likelihood[BinormalDistribution[{μ, μ}, {σ, σ}, ρ], data], {μ, 1, 1.5}, {σ, .5, 1.5}, {ρ, -.75, .75}, ViewPoint -> {1, -1, 1}]See Also
Related Guides
Text
Wolfram Research (2010), Likelihood, Wolfram Language function, https://reference.wolfram.com/language/ref/Likelihood.html (updated 2014).
CMS
Wolfram Language. 2010. "Likelihood." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Likelihood.html.
APA
Wolfram Language. (2010). Likelihood. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Likelihood.html
BibTeX
@misc{reference.wolfram_2026_likelihood, author="Wolfram Research", title="{Likelihood}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Likelihood.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_likelihood, organization={Wolfram Research}, title={Likelihood}, year={2014}, url={https://reference.wolfram.com/language/ref/Likelihood.html}, note=[Accessed: 13-June-2026]}