Part of a series on |
Bayesian statistics |
---|
![]() |
Posterior =Likelihood ×Prior ÷Evidence |
Background |
Model building |
Posterior approximation |
Estimators |
Evidence approximation |
Model evaluation |
Alikelihood function (often simply called thelikelihood) measures how well astatistical model explainsobserved data by calculating the probability of seeing that data under differentparameter values of the model. It is constructed from thejoint probability distribution of therandom variable that (presumably) generated the observations.[1][2][3] When evaluated on the actual data points, it becomes a function solely of the model parameters.
Inmaximum likelihood estimation, theargument that maximizes the likelihood function serves as apoint estimate for the unknown parameter, while theFisher information (often approximated by the likelihood'sHessian matrix at the maximum) gives an indication of the estimate'sprecision.
In contrast, inBayesian statistics, the estimate of interest is theconverse of the likelihood, the so-calledposterior probability of the parameter given the observed data, which is calculated viaBayes' rule.[4]
The likelihood function, parameterized by a (possibly multivariate) parameter, is usually defined differently fordiscrete and continuousprobability distributions (a more general definition is discussed below). Given a probability density or mass function
where is a realization of the random variable, the likelihood function isoften written
In other words, when is viewed as a function of with fixed, it is a probability density function, and when viewed as a function of with fixed, it is a likelihood function. In thefrequentist paradigm, the notation is often avoided and instead or are used to indicate that is regarded as a fixed unknown quantity rather than as arandom variable being conditioned on.
The likelihood function doesnot specify the probability that is the truth, given the observed sample. Such an interpretation is a common error, with potentially disastrous consequences (seeprosecutor's fallacy).
Let be a discreterandom variable withprobability mass function depending on a parameter. Then the function
considered as a function of, is thelikelihood function, given theoutcome of the random variable. Sometimes the probability of "the value of for the parameter value " is written asP(X =x |θ) orP(X =x;θ). The likelihood is the probability that a particular outcome is observed when the true value of the parameter is, equivalent to the probability mass on; it isnot a probability density over the parameter. The likelihood,, should not be confused with, which is the posterior probability of given the data.
Consider a simple statistical model of a coin flip: a single parameter that expresses the "fairness" of the coin. The parameter is the probability that a coin lands heads up ("H") when tossed. can take on any value within the range 0.0 to 1.0. For a perfectlyfair coin,.
Imagine flipping a fair coin twice, and observing two heads in two tosses ("HH"). Assuming that each successive coin flip isi.i.d., then the probability of observing HH is
Equivalently, the likelihood of observing "HH" assuming is
This is not the same as saying that, a conclusion which could only be reached viaBayes' theorem given knowledge about the marginal probabilities and.
Now suppose that the coin is not a fair coin, but instead that. Then the probability of two heads on two flips is
Hence
More generally, for each value of, we can calculate the corresponding likelihood. The result of such calculations is displayed in Figure 1. The integral of over [0, 1] is 1/3; likelihoods need not integrate or sum to one over the parameter space.
Let be arandom variable following anabsolutely continuous probability distribution withdensity function (a function of) which depends on a parameter. Then the function
considered as a function of, is thelikelihood function (of, given theoutcome). Again, is not a probability density or mass function over, despite being a function of given the observation.
The use of theprobability density in specifying the likelihood function above is justified as follows. Given an observation, the likelihood for the interval, where is a constant, is given by. Observe thatsince is positive and constant. Because
where is the probability density function, it follows that
The firstfundamental theorem of calculus provides that
Then
Therefore,and so maximizing the probability density at amounts to maximizing the likelihood of the specific observation.
Inmeasure-theoretic probability theory, thedensity function is defined as theRadon–Nikodym derivative of the probability distribution relative to a common dominating measure.[5] The likelihood function is this density interpreted as a function of the parameter, rather than the random variable.[6] Thus, we can construct a likelihood function for any distribution, whether discrete, continuous, a mixture, or otherwise. (Likelihoods are comparable, e.g. for parameter estimation, only if they are Radon–Nikodym derivatives with respect to the same dominating measure.)
The above discussion of the likelihood for discrete random variables uses thecounting measure, under which the probability density at any outcome equals the probability of that outcome.
The above can be extended in a simple way to allow consideration of distributions which contain both discrete and continuous components. Suppose that the distribution consists of a number of discrete probability masses and a density, where the sum of all the's added to the integral of is always one. Assuming that it is possible to distinguish an observation corresponding to one of the discrete probability masses from one which corresponds to the density component, the likelihood function for an observation from the continuous component can be dealt with in the manner shown above. For an observation from the discrete component, the likelihood function for an observation from the discrete component is simplywhere is the index of the discrete probability mass corresponding to observation, because maximizing the probability mass (or probability) at amounts to maximizing the likelihood of the specific observation.
The fact that the likelihood function can be defined in a way that includes contributions that are not commensurate (the density and the probability mass) arises from the way in which the likelihood function is defined up to a constant of proportionality, where this "constant" can change with the observation, but not with the parameter.
In the context of parameter estimation, the likelihood function is usually assumed to obey certain conditions, known as regularity conditions. These conditions areassumed in various proofs involving likelihood functions, and need to be verified in each particular application. For maximum likelihood estimation, the existence of a global maximum of the likelihood function is of the utmost importance. By theextreme value theorem, it suffices that the likelihood function iscontinuous on acompact parameter space for the maximum likelihood estimator to exist.[7] While the continuity assumption is usually met, the compactness assumption about the parameter space is often not, as the bounds of the true parameter values might be unknown. In that case,concavity of the likelihood function plays a key role.
More specifically, if the likelihood function is twice continuously differentiable on thek-dimensional parameter space assumed to be anopenconnected subset of there exists a unique maximum if thematrix of second partials isnegative definite for every at which the gradient vanishes,and if the likelihood function approaches a constant on theboundary of the parameter space, i.e.,which may include the points at infinity if is unbounded. Mäkeläinen and co-authors prove this result usingMorse theory while informally appealing to a mountain pass property.[8] Mascarenhas restates their proof using themountain pass theorem.[9]
In the proofs ofconsistency and asymptotic normality of the maximum likelihood estimator, additional assumptions are made about the probability densities that form the basis of a particular likelihood function. These conditions were first established by Chanda.[10] In particular, foralmost all, and for allexist for all in order to ensure the existence of aTaylor expansion. Second, for almost all and for every it must be thatwhere is such that This boundedness of the derivatives is needed to allow fordifferentiation under the integral sign. And lastly, it is assumed that theinformation matrix,ispositive definite and is finite. This ensures that thescore has a finite variance.[11]
The above conditions are sufficient, but not necessary. That is, a model that does not meet these regularity conditions may or may not have a maximum likelihood estimator of the properties mentioned above. Further, in case of non-independently or non-identically distributed observations additional properties may need to be assumed.
In Bayesian statistics, almost identical regularity conditions are imposed on the likelihood function in order to proof asymptotic normality of theposterior probability,[12][13] and therefore to justify aLaplace approximation of the posterior in large samples.[14]
Alikelihood ratio is the ratio of any two specified likelihoods, frequently written as:
The likelihood ratio is central tolikelihoodist statistics: thelaw of likelihood states that the degree to which data (considered as evidence) supports one parameter value versus another is measured by the likelihood ratio.
Infrequentist inference, the likelihood ratio is the basis for atest statistic, the so-calledlikelihood-ratio test. By theNeyman–Pearson lemma, this is the mostpowerful test for comparing twosimple hypotheses at a givensignificance level. Numerous other tests can be viewed as likelihood-ratio tests or approximations thereof.[15] The asymptotic distribution of the log-likelihood ratio, considered as a test statistic, is given byWilks' theorem.
The likelihood ratio is also of central importance inBayesian inference, where it is known as theBayes factor, and is used inBayes' rule. Stated in terms ofodds, Bayes' rule states that theposterior odds of two alternatives, and, given an event, is theprior odds, times the likelihood ratio. As an equation:
The likelihood ratio is not directly used in AIC-based statistics. Instead, what is used is the relative likelihood of models (see below).
Inevidence-based medicine, likelihood ratiosare used in diagnostic testing to assess the value of performing adiagnostic test.
Since the actual value of the likelihood function depends on the sample, it is often convenient to work with a standardized measure. Suppose that themaximum likelihood estimate for the parameterθ is. Relative plausibilities of otherθ values may be found by comparing the likelihoods of those other values with the likelihood of. Therelative likelihood ofθ is defined to be[16][17][18][19][20]Thus, the relative likelihood is the likelihood ratio (discussed above) with the fixed denominator. This corresponds to standardizing the likelihood to have a maximum of 1.
Alikelihood region is the set of all values ofθ whose relative likelihood is greater than or equal to a given threshold. In terms of percentages, ap% likelihood region forθ is defined to be[16][18][21]
Ifθ is a single real parameter, ap% likelihood region will usually comprise aninterval of real values. If the region does comprise an interval, then it is called alikelihood interval.[16][18][22]
Likelihood intervals, and more generally likelihood regions, are used forinterval estimation within likelihoodist statistics: they are similar toconfidence intervals in frequentist statistics andcredible intervals in Bayesian statistics. Likelihood intervals are interpreted directly in terms of relative likelihood, not in terms ofcoverage probability (frequentism) orposterior probability (Bayesianism).
Given a model, likelihood intervals can be compared to confidence intervals. Ifθ is a single real parameter, then under certain conditions, a 14.65% likelihood interval (about 1:7 likelihood) forθ will be the same as a 95% confidence interval (19/20 coverage probability).[16][21] In a slightly different formulation suited to the use of log-likelihoods (seeWilks' theorem), the test statistic is twice the difference in log-likelihoods and the probability distribution of the test statistic is approximately achi-squared distribution with degrees-of-freedom (df) equal to the difference in df's between the two models (therefore, thee−2 likelihood interval is the same as the 0.954 confidence interval; assuming difference in df's to be 1).[21][22]
In many cases, the likelihood is a function of more than one parameter but interest focuses on the estimation of only one, or at most a few of them, with the others being considered asnuisance parameters. Several alternative approaches have been developed to eliminate such nuisance parameters, so that a likelihood can be written as a function of only the parameter (or parameters) of interest: the main approaches are profile, conditional, and marginal likelihoods.[23][24] These approaches are also useful when a high-dimensional likelihood surface needs to be reduced to one or two parameters of interest in order to allow agraph.
It is possible to reduce the dimensions by concentrating the likelihood function for a subset of parameters by expressing the nuisance parameters as functions of the parameters of interest and replacing them in the likelihood function.[25][26] In general, for a likelihood function depending on the parameter vector that can be partitioned into, and where a correspondence can be determined explicitly, concentration reducescomputational burden of the original maximization problem.[27]
For instance, in alinear regression with normally distributed errors,, the coefficient vector could bepartitioned into (and consequently thedesign matrix). Maximizing with respect to yields an optimal value function. Using this result, the maximum likelihood estimator for can then be derived aswhere is theprojection matrix of. This result is known as theFrisch–Waugh–Lovell theorem.
Since graphically the procedure of concentration is equivalent to slicing the likelihood surface along the ridge of values of the nuisance parameter that maximizes the likelihood function, creating anisometricprofile of the likelihood function for a given, the result of this procedure is also known asprofile likelihood.[28][29] In addition to being graphed, the profile likelihood can also be used to computeconfidence intervals that often have better small-sample properties than those based on asymptoticstandard errors calculated from the full likelihood.[30][31]
Sometimes it is possible to find asufficient statistic for the nuisance parameters, and conditioning on this statistic results in a likelihood which does not depend on the nuisance parameters.[32]
One example occurs in 2×2 tables, where conditioning on all four marginal totals leads to a conditional likelihood based on the non-centralhypergeometric distribution. This form of conditioning is also the basis forFisher's exact test.
Sometimes we can remove the nuisance parameters by considering a likelihood based on only part of the information in the data, for example by using the set of ranks rather than the numerical values. Another example occurs in linearmixed models, where considering a likelihood for the residuals only after fitting the fixed effects leads toresidual maximum likelihood estimation of the variance components.
A partial likelihood is an adaption of the full likelihood such that only a part of the parameters (the parameters of interest) occur in it.[33] It is a key component of theproportional hazards model: using a restriction on the hazard function, the likelihood does not contain the shape of the hazard over time.
The likelihood, given two or moreindependentevents, is the product of the likelihoods of each of the individual events:This follows from the definition of independence in probability: the probabilities of two independent events happening, given a model, is the product of the probabilities.
This is particularly important when the events are fromindependent and identically distributed random variables, such as independent observations orsampling with replacement. In such a situation, the likelihood function factors into a product of individual likelihood functions.
The empty product has value 1, which corresponds to the likelihood, given no event, being 1: before any data, the likelihood is always 1. This is similar to auniform prior in Bayesian statistics, but in likelihoodist statistics this is not animproper prior because likelihoods are not integrated.
Log-likelihood function is the logarithm of the likelihood function, often denoted by a lowercasel or, to contrast with the uppercaseL or for the likelihood. Because logarithms arestrictly increasing functions, maximizing the likelihood is equivalent to maximizing the log-likelihood. But for practical purposes it is more convenient to work with the log-likelihood function inmaximum likelihood estimation, in particular since most commonprobability distributions—notably theexponential family—are onlylogarithmically concave,[34][35] andconcavity of theobjective function plays a key role in themaximization.
Given the independence of each event, the overall log-likelihood of intersection equals the sum of the log-likelihoods of the individual events. This is analogous to the fact that the overalllog-probability is the sum of the log-probability of the individual events. In addition to the mathematical convenience from this, the adding process of log-likelihood has an intuitive interpretation, as often expressed as "support" from the data. When the parameters are estimated using the log-likelihood for themaximum likelihood estimation, each data point is used by being added to the total log-likelihood. As the data can be viewed as an evidence that support the estimated parameters, this process can be interpreted as "support from independent evidenceadds", and the log-likelihood is the "weight of evidence". Interpreting negative log-probability asinformation content orsurprisal, the support (log-likelihood) of a model, given an event, is the negative of the surprisal of the event, given the model: a model is supported by an event to the extent that the event is unsurprising, given the model.
A logarithm of a likelihood ratio is equal to the difference of the log-likelihoods:
Just as the likelihood, given no event, being 1, the log-likelihood, given no event, is 0, which corresponds to the value of the empty sum: without any data, there is no support for any models.
Thegraph of the log-likelihood is called thesupport curve (in theunivariate case).[36]In the multivariate case, the concept generalizes into asupport surface over theparameter space.It has a relation to, but is distinct from, thesupport of a distribution.
The term was coined byA. W. F. Edwards[36] in the context ofstatistical hypothesis testing, i.e. whether or not the data "support" one hypothesis (or parameter value) being tested more than any other.
The log-likelihood function being plotted is used in the computation of thescore (the gradient of the log-likelihood) andFisher information (the curvature of the log-likelihood). Thus, the graph has a direct interpretation in the context ofmaximum likelihood estimation andlikelihood-ratio tests.
If the log-likelihood function issmooth, itsgradient with respect to the parameter, known as thescore and written, exists and allows for the application ofdifferential calculus. The basic way to maximize a differentiable function is to find thestationary points (the points where thederivative is zero); since the derivative of a sum is just the sum of the derivatives, but the derivative of a product requires theproduct rule, it is easier to compute the stationary points of the log-likelihood of independent events than for the likelihood of independent events.
The equations defined by the stationary point of the score function serve asestimating equations for the maximum likelihood estimator.In that sense, the maximum likelihood estimator is implicitly defined by the value at of theinverse function, where is thed-dimensionalEuclidean space, and is the parameter space. Using theinverse function theorem, it can be shown that iswell-defined in anopen neighborhood about with probability going to one, and is a consistent estimate of. As a consequence there exists a sequence such that asymptoticallyalmost surely, and.[37] A similar result can be established usingRolle's theorem.[38][39]
The second derivative evaluated at, known asFisher information, determines the curvature of the likelihood surface,[40] and thus indicates theprecision of the estimate.[41]
The log-likelihood is also particularly useful forexponential families of distributions, which include many of the commonparametric probability distributions. The probability distribution function (and thus likelihood function) for exponential families contain products of factors involvingexponentiation. The logarithm of such a function is a sum of products, again easier to differentiate than the original function.
An exponential family is one whose probability density function is of the form (for some functions, writing for theinner product):
Each of these terms has an interpretation,[a] but simply switching from probability to likelihood and taking logarithms yields the sum:
The and each correspond to achange of coordinates, so in these coordinates, the log-likelihood of an exponential family is given by the simple formula:
In words, the log-likelihood of an exponential family is inner product of the natural parameter and thesufficient statistic, minus the normalization factor (log-partition function). Thus for example the maximum likelihood estimate can be computed by taking derivatives of the sufficient statisticT and the log-partition functionA.
Thegamma distribution is an exponential family with two parameters, and. The likelihood function is
Finding the maximum likelihood estimate of for a single observed value looks rather daunting. Its logarithm is much simpler to work with:
To maximize the log-likelihood, we first take thepartial derivative with respect to:
If there are a number of independent observations, then the joint log-likelihood will be the sum of individual log-likelihoods, and the derivative of this sum will be a sum of derivatives of each individual log-likelihood:
To complete the maximization procedure for the joint log-likelihood, the equation is set to zero and solved for:
Here denotes the maximum-likelihood estimate, and is thesample mean of the observations.
The term "likelihood" has been in use in English since at least lateMiddle English.[42] Its formal use to refer to a specificfunction in mathematical statistics was proposed byRonald Fisher,[43] in two research papers published in 1921[44] and 1922.[45] The 1921 paper introduced what is today called a "likelihood interval"; the 1922 paper introduced the term "method of maximum likelihood". Quoting Fisher:
[I]n 1922, I proposed the term 'likelihood,' in view of the fact that, with respect to [the parameter], it is not a probability, and does not obey the laws of probability, while at the same time it bears to the problem of rational choice among the possible values of [the parameter] a relation similar to that which probability bears to the problem of predicting events in games of chance. . . . Whereas, however, in relation to psychological judgment, likelihood has some resemblance to probability, the two concepts are wholly distinct. . . ."[46]
The concept of likelihood should not be confused with probability as mentioned by Sir Ronald Fisher
I stress this because in spite of the emphasis that I have always laid upon the difference between probability and likelihood there is still a tendency to treat likelihood as though it were a sort of probability. The first result is thus that there are two different measures of rational belief appropriate to different cases. Knowing the population we can express our incomplete knowledge of, or expectation of, the sample in terms of probability; knowing the sample we can express our incomplete knowledge of the population in terms of likelihood.[47]
Fisher's invention of statistical likelihood was in reaction against an earlier form of reasoning calledinverse probability.[48] His use of the term "likelihood" fixed the meaning of the term within mathematical statistics.
A. W. F. Edwards (1972) established the axiomatic basis for use of the log-likelihood ratio as a measure of relative support for one hypothesis against another. Thesupport function is then the natural logarithm of the likelihood function. Both terms are used inphylogenetics, but were not adopted in a general treatment of the topic of statistical evidence.[49]
Among statisticians, there is no consensus about what thefoundation of statistics should be. There are four main paradigms that have been proposed for the foundation:frequentism,Bayesianism,likelihoodism, andAIC-based.[50] For each of the proposed foundations, the interpretation of likelihood is different. The four interpretations are described in the subsections below.
![]() | This section is empty. You can help byadding to it.(March 2019) |
InBayesian inference, although one can speak about the likelihood of any proposition orrandom variable given another random variable: for example the likelihood of a parameter value or of astatistical model (seemarginal likelihood), given specified data or other evidence,[51][52][53][54] the likelihood function remains the same entity, with the additional interpretations of (i) aconditional density of the data given the parameter (since the parameter is then a random variable) and (ii) a measure or amount of information brought by the data about the parameter value or even the model.[51][52][53][54][55] Due to the introduction of a probability structure on the parameter space or on the collection of models, it is possible that a parameter value or a statistical model have a large likelihood value for given data, and yet have a lowprobability, or vice versa.[53][55] This is often the case in medical contexts.[56] FollowingBayes' Rule, the likelihood when seen as a conditional density can be multiplied by theprior probability density of the parameter and then normalized, to give aposterior probability density.[51][52][53][54][55] More generally, the likelihood of an unknown quantity given another unknown quantity is proportional to theprobability of given.[51][52][53][54][55]
![]() | This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(April 2019) (Learn how and when to remove this message) |
In frequentist statistics, the likelihood function is itself astatistic that summarizes a single sample from a population, whose calculated value depends on a choice of several parametersθ1 ...θp, wherep is the count of parameters in some already-selectedstatistical model. The value of the likelihood serves as a figure of merit for the choice used for the parameters, and the parameter set with maximum likelihood is the best choice, given the data available.
The specific calculation of the likelihood is the probability that the observed sample would be assigned, assuming that the model chosen and the values of the several parametersθ give an accurate approximation of thefrequency distribution of the population that the observed sample was drawn from. Heuristically, it makes sense that a good choice of parameters is those which render the sample actually observed the maximum possiblepost-hoc probability of having happened.Wilks' theorem quantifies the heuristic rule by showing that the difference in the logarithm of the likelihood generated by the estimate's parameter values and the logarithm of the likelihood generated by population's "true" (but unknown) parameter values is asymptoticallyχ2 distributed.
Each independent sample's maximum likelihood estimate is a separate estimate of the "true" parameter set describing the population sampled. Successive estimates from many independent samples will cluster together with the population's "true" set of parameter values hidden somewhere in their midst. The difference in the logarithms of the maximum likelihood and adjacent parameter sets' likelihoods may be used to draw aconfidence region on a plot whose co-ordinates are the parametersθ1 ...θp. The region surrounds the maximum-likelihood estimate, and all points (parameter sets) within that region differ at most in log-likelihood by some fixed value. Theχ2 distribution given byWilks' theorem converts the region's log-likelihood differences into the "confidence" that the population's "true" parameter set lies inside. The art of choosing the fixed log-likelihood difference is to make the confidence acceptably high while keeping the region acceptably small (narrow range of estimates).
As more data are observed, instead of being used to make independent estimates, they can be combined with the previous samples to make a single combined sample, and that large sample may be used for a new maximum likelihood estimate. As the size of the combined sample increases, the size of the likelihood region with the same confidence shrinks. Eventually, either the size of the confidence region is very nearly a single point, or the entire population has been sampled; in both cases, the estimated parameter set is essentially the same as the population parameter set.
![]() | This sectionneeds expansion. You can help byadding to it.(March 2019) |
Under theAIC paradigm, likelihood is interpreted within the context ofinformation theory.[57][58][59]