17
$\begingroup$

I've been trying to get my head around why a likelihood isn't a probability density function. My understanding says that for an event $X$ and a model parameter $m$:

$P(X\mid m)$ is a probability density function

$P(m\mid X)$ is not

It feels like it should be, and I can't find a clear explanation of why it's not. Does it also mean that a Likelihood can take a value greater than 1?

$\endgroup$

9 Answers 9

9
$\begingroup$

If $X$ is data and $m$ are the parameters, then the likelihood function $l(m) = p(X | m)$. I.e. it's $p(X | m)$, considered as a function of $m$.

Both $p(X|m)$ and $p(m|X)$ are pdfs: $p(X|m)$ is a density on $X$ and $p(m|X)$ is a density on $m$. But the likelihood is $p(X|m)$, not as a function of $X$ (it would indeed be a density as a function of X), but as a function of m. So it's not a pdf; in particular, it's not necessarily true that $$\sum_m p(X|m) = 1.$$

Edit: just to clarify, $p(m|X)$ isn't the likelihood. $p(X|m)$ is.

$\endgroup$
4
  • 3
    $\begingroup$ Some points in this answer are wrong. Look at my answer. $\endgroup$ Jun 29, 2012 at 6:29
  • 1
    $\begingroup$ I think it makes sense especially with regard to the question. In my opinion, the answer is not providing sufficient explanation about likelihood but it is enough to describe why likelihood function is not probability (density) distribution. That may be reason @StéphaneLaurent said 'Some' without pointing out the exactly wrong point...? $\endgroup$ Oct 31, 2018 at 17:41
  • $\begingroup$ I seldom post and then say something like the following: I have posted a better answer than this. But in this instance that is my claim. $\endgroup$ Jun 30, 2023 at 17:09
  • $\begingroup$ If you integrate a likelihood function with respect to the most obvious measure (e.g. Lebesgue measure on the line) in some cases you get $+\infty,$ so that cannot be a probability density function. $\endgroup$ Jun 30, 2023 at 17:09
18
$\begingroup$

The accepted answer is wrong. The likelihood is the function $\theta \mapsto L(\theta \mid x)=f(x \mid \theta)$ for a given $x$ in the observations space and $f(\cdot \mid \theta)$ is a Radon-Nikodym derivative of $P_\theta$ when the statistical model is given by a family of probabilities ${(P_\theta)}_{\theta\in\Theta}$ on the observations space.

In general there's not even a $\sigma$-field in the parameter space $\Theta$, hence the question "is the likelihood a pdf ?" is not even meaningful!

For more information see https://stats.stackexchange.com/questions/31238/what-is-the-reason-that-a-likelihood-function-is-not-a-pdf and https://stats.stackexchange.com/questions/29682/how-to-rigorously-define-the-likelihood

$\endgroup$
3
  • $\begingroup$ Could you elaborate why the answer is wrong and what the Radon-Nikodym derivative has to do with it? It seems to me that first link you provided says the same as the accepted answer. $\endgroup$
    – fabee
    Jun 30, 2012 at 20:31
  • 1
    $\begingroup$ mm difficult to elaborate more! The Radon-Nikodym derivative (=density) is nothing but the definition. See the third comment below the question of the first link, it precisely says that the present accepted answer is wrong. $\endgroup$ Jul 5, 2012 at 10:53
  • $\begingroup$ To be clear, is it true that in the bayesian case there is a sigma algebra on big theta and so in principle you could perform the integral? (Though it would still be meaningless) $\endgroup$
    – mmm
    Aug 11, 2019 at 19:08
8
$\begingroup$

From a Bayesian perspective, the reason the likelihood function isn't a probability density is that you haven't multiplied by a prior yet. But once you multiply by a prior distribution, the product is (proportional to) the posterior probability density for the parameters.

$\endgroup$
5
$\begingroup$

A few questions were asked, so a few answers will be given. (main point: likelihood is not necessarily a product density, though this is the common interpretation.)

Frequently, the likelihood is the product of densities over some provided set of examples. The examples are drawn i.i.d., and therefore this product density is the density for the corresponding product measure over the product space. What I'm saying is that yes, from this perspective, you have constructed a product density.

Since you are dealing with densities, not probabilities, values are not constrained to [0,1], and your density can easily be greater than one. In fact, if you are dealing with dirac measure (which puts all mass on one point on the real line), you essentially have "infinite" density. I put that in quotes since this is not a continuous probability measure, ie it does not have a density wrt to Lebesgue measure, let alone one with infinite mass on a point. (A quick fact check: the corresponding integral wrt lebesgue measure would have value zero since it is off zero only on a set of lebesgue measure zero, which means it is not a probability distribution; but it was, which contradicts this being its density.) perhaps a more apt example: any (continuous) distribution on [0,0.5] will have to have density greater than one on a set of nonzero lebesgue measure. (you can try to construct a sequence of these which convergence to something which violates what i said, but that will be the density of something which is not continuous!)

things can get a little confusing because you can write discrete probability distributions as densities wrt a measure putting 1 on each point in the support set of the probability (ie it is counting measure wrt that set). NOTE that this is a density wrt a measure which is NOT a probability measure. But anyway, the density values at each point are exactly the probability values. This allows an interchanging probability masses and densities, which can be confusing.

I'll close with some further reading. A good book on machine learning is "A probabilistic Theory of Pattern Recognition" by Devroye, Gyorfi, Lugosi. Chapter 15 is on maximum likelihood and you'll notice they do NOT define likelihood as being a product probability or density, but rather as a product of functions. This is because they are careful to encompass the differing interpretations; rather, they ignore the interpretations there and work out the math.

$\endgroup$
2
$\begingroup$

This is one of the reasons why, instead of saying that the density function of the normal distribution is $$ \varphi(x) = \frac1 {\sigma\sqrt{2\pi}} \exp\left(-\frac12 \left( \frac{x-\mu}\sigma \right)^2 \right), $$ I prefer to say that the normal distribution is (not that the density function of the normal distribution is) $$ \frac 1{\sqrt{2\pi}} \exp\left( -\frac12 \left( \frac{x-\mu}\sigma \right)^2 \right) \left( \frac{dx} \sigma \right). $$ (Here there is no stray $\sigma$ that is not accompanied by an $x$.)

A density function is a density function only with respect to a measure, which in this case is $dx,$ i.e. Lebesgue measure on the real line.

A likelihood function is not accompanied by such a measure. You can multiply a likelihood function by a measure and get another measure, and that is just what is done when you multiply the likelihood by the prior. The prior has a $\text{“}dx\text{”}$ in it; the likelihood function does not.

Moreover, densities are not defined pointwise, whereas likelihood functions are. You can change the value of a density function at an isolated point, or at all points in some set of measure $0$ and the density function you get is exactly equivalent. That is why I write (for example) $$ f(x)\,dx = \begin{cases} \exp(-\lambda x)(\lambda\,dx) & \text{for } x>0, \\ 0 & \text{for } x<0, \end{cases} $$ with $\text{“}{>}\text{”}$ and $\text{“}{<}\text{”}$ rather than $\text{“}{\ge}\text{”}$ and $\text{“}{\le}\text{”},$ whereas with c.d.f.s and likelihood functions I am careful about which ones are $\text{“}{>}\text{”}$ and which are $\text{“}{\ge}\text{”}.$

And in some cases if you integrate a likelihood function with respect to some obvious measure you get $+\infty,$ so that function cannot be a probability density function. For example, in $$ f_\theta(x) \,dx = \begin{cases} \dfrac{\theta\,dx}{(\theta x)^2} & \text{if } x>1/\theta, \\[6pt] \,\,\,0 & \text{if } x<1/\theta, \end{cases} $$ the function $f_\theta(x)$ is a probability density function, and the likelihood function based on a single observation $x>0$ is $$ L(\theta) = \begin{cases} 1/\theta & \text{if } \theta \ge1/x, \\[4pt] \,\,\, 0 & \text{if } 0<\theta<1/x. \end{cases} $$ If you integrate that with respect to Lebesgue measure, you get $+\infty.$

$\endgroup$
0
$\begingroup$

If m is a model parameter then it is not a RV. So it does not have a probability density function. m is just an unknown paramter.

$\endgroup$
0
$\begingroup$

You are essentially asking why likelihood density function cannot be used as probability density function. For a non-informative (uniform) Bayesian prior, the likelihood density function divided by its integral over entire space will give the probability density function. It is the normalization that makes the two different.

$\endgroup$
0
$\begingroup$

Likelihood is the chance that the reality you've hypothesized could have produced the particular data you got.

Likelihood: The probability of data given a hypothesis.

However Probability is the chance that the reality you're considering is true, given the data you have.

Bayesian Probability: Probability of a hypothesis given data

$\endgroup$
0
$\begingroup$

It is known fact that $p(X)=\sum_{Y}p(X|Y)p(Y)$.

But this also means that sum $\sum_{Y}p(X|Y)$ that is not weighted by probability of $Y$ can reach values higher than 1. And this means that it is not probability distribution over the $Y$ parameter.

$$\sum_{Y}p(X|Y) \geq \sum_Yp(X|Y)p(Y)$$

$$\sum_Yp(X|Y) \geq p(X)$$

$$\sum_X\sum_Yp(X|Y) \geq \sum_Xp(X) = 1$$

These expressions show that $p(X|Y)$ is not a probability distributed over $Y$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.