In statistics, a likelihood function (often simply the likelihood) is a function of the parameters of a statistical model given data. Likelihood functions play a key role in statistical inference, especially methods of estimating a parameter from a set of statistics. In informal contexts, "likelihood" is often used as a synonym for "probability." In statistics, a distinction is made depending on the roles of outcomes vs. parameters. Probability is used before data are available to describe possible future outcomes given a fixed value for the parameter (or parameter vector). Likelihood is used after data are available to describe a function of a parameter (or parameter vector) for a given outcome.
The likelihood of a parameter value (or vector of parameter values), θ, given outcomes x, is equal to the probability (density) assumed for those observed outcomes given those parameter values, that is
The likelihood function is defined differently for discrete and continuous probability distributions.
Let X be a random variable with a discrete probability distribution p depending on a parameter θ. Then the function
considered as a function of θ, is called the likelihood function (of θ, given the outcome x of the random variable X). Sometimes the probability of the value x of X for the parameter value θ is written as ; often written as to emphasize that this differs from which is not a conditional probability, because θ is a parameter and not a random variable.