One of the most fundamental concepts of modern statistics is that of likelihood. In each of the discrete random variables we have considered thus far, the distribution depends on one or more parameters that are, in most statistical applications, unknown. In the Poisson distribution, the parameter is λ. In the binomial, the parameter of interest is p (since n is typically fixed and known).

Likelihood is a tool for summarizing the data’s evidence about unknown parameters. Let us denote the unknown parameter(s) of a distribution generically by θ. Since the probability distribution depends on θ, we can make this dependence explicit by writing f(x) as f(x ; θ). For example, in the Bernoulli distribution the parameter is θ =  π , and the distribution is

f(x;π)=πx(1−π)1−xx=0,1f(x;π)=πx(1−π)1−xx=0,1    (2)

Once a value of X has been observed, we can plug this observed value x into f(x ; π ) and obtain a function of π only. For example, if we observe X = 1, then plugging x = 1 into (2) gives the function π . If we observe X = 0, the function becomes 1 − π .

Whatever function of the parameter we get when we plug the observed data x into f(x ; θ), we call that function thelikelihood function.

We write the likelihood function as L(θ;x)=∏ni=1f(Xi;θ)L(θ;x)=∏i=1nf(Xi;θ) or sometimes just L(θ). Algebraically, the likelihoodL(θ ; x) is just the same as the distribution f(x ; θ), but its meaning is quite different because it is regarded as a function of θ rather than a function of x. Consequently, a graph of the likelihood usually looks very different from a graph of the probability distribution.

For example, suppose that X has a Bernoulli distribution with unknown parameter π . We can graph the probability distribution for any fixed value of π  . For example, if π = .5 we get this:

Now suppose that we observe a value of X, say X = 1. Plugging x = 1 into the distribution πx(1−π)1−xπx(1−π)1−x gives the likelihood function L(π ; x) = π , which looks like this:

For discrete random variables, a graph of the probability distribution f(x ; θ) has spikes at specific values of x, whereas a graph of the likelihood L(θ ; x) is a continuous curve (e.g. a line) over the parameter space, the domain of possible values for θ.

L(θ ; x) summarizes the evidence about θ contained in the event X = xL(θ ; x) is high for values of θ that make X =x more likely, and small for values of θ that make X = x unlikely. In the Bernoulli example, observing X = 1 gives some (albeit weak) evidence that π  is nearer to 1 than to 0, so the likelihood for x = 1 rises as p moves from 0 to 1.

For example, if we observe xx from Bin(n,π)Bin(n,π), the likelihood function is

L(π|x)=n!(n−x)!x!πx(1−π)n−x.L(π|x)=n!(n−x)!x!πx(1−π)n−x.

Any multiplicative constant which does not depend on θθ is irrelevant and may be discarded, thus,

L(π|x)∝πx(1−π)n−x.L(π|x)∝πx(1−π)n−x.

Loglikelihood

In most cases, for various reasons, but often computational convenience, we work with the loglikelihood

l(θ|x)=logL(θ|x)l(θ|x)=log⁡L(θ|x)

which is defined up to an arbitrary additive constant.

For example, the binomial loglikelihood is

l(π|x)=xlogπ+(n−x)log(1−π).l(π|x)=xlog⁡π+(n−x)log⁡(1−π).

In many problems of interest, we will derive our loglikelihood from a sample rather than from a single observation. If we observe an independent sample x1,x2,...,xnx1,x2,...,xn  from a distribution f(x|θ)f(x|θ), then the overall likelihood is the product of the individual likelihoods:

L(θ|x)==∏i=1nf(xi|θ)∏i=1nL(θ|xi)L(θ|x)=∏i=1nf(xi|θ)=∏i=1nL(θ|xi)

and the loglikelihood is:

l(θ|x)==log∏i=1nf(xi|θ)∑i=1nlogf(xi|θ)=∑i=1nl(θ|xi).l(θ|x)=log∏i=1nf(xi|θ)=∑i=1nlogf(xi|θ)=∑i=1nl(θ|xi).

Binomial loglikelihood examples:  
Plot of binomial loglikelihood function if n = 5 and we observe x = 0, x = 1, and x = 2 (see the lec1fig.R code on ANGEL on how to produce these figures):

In regular problems, as the total sample size nn grows, the loglikelihood function does two things:

  • it  becomes more sharply peaked around its maximum,  and
  • its shape becomes nearly quadratic (i.e. a  parabola, if there is a single parameter).

This is important since the tests such as Wald test based on z=statisticSE of statisticz=statisticSE of statistic only works if the logL approximates well to quadratic form. For example, the loglikelihood for a normal-mean problem is exactly quadratic. As the sample size grows, the inference comes to resemble the normal-mean problem. This is true even for discrete data. The extent to which normal-theory approximations work for discrete data does not depend on how closely the distribution of responses resembles a normal curve, but on how closely the loglikelihood resembles a quadratic function.

Transformations may help us to improve the shape of loglikelihood. More on this in Section 1.6 on Alternative Parametrizations. Next we will see how we use the likelihood, that is the corresponding loglikelihood, to estimate the most likely value of the unknown parameter of interest.

from: https://onlinecourses.science.psu.edu/stat504/node/27

似然和对数似然Likelihood & LogLikelihood的更多相关文章

  1. 负对数似然(negative log-likelihood)

    negative log likelihood文章目录negative log likelihood似然函数(likelihood function)OverviewDefinition离散型概率分布 ...

  2. 挑子学习笔记:对数似然距离(Log-Likelihood Distance)

    转载请标明出处:http://www.cnblogs.com/tiaozistudy/p/log-likelihood_distance.html 本文是“挑子”在学习对数似然距离过程中的笔记摘录,文 ...

  3. 二次代价函数、交叉熵(cross-entropy)、对数似然代价函数(log-likelihood cost)(04-1)

    二次代价函数 $C = \frac{1} {2n} \sum_{x_1,...x_n} \|y(x)-a^L(x) \|^2$ 其中,C表示代价函数,x表示样本,y表示实际值,a表示输出值,n表示样本 ...

  4. 最大似然预计(Maximum likelihood estimation)

    一.定义     最大似然预计是一种依据样本来预计模型參数的方法.其思想是,对于已知的样本,如果它服从某种模型,预计模型中未知的參数,使该模型出现这些样本的概率最大.这样就得到了未知參数的预计值. 二 ...

  5. 朴素贝叶斯-对数似然Python实现-Numpy

    <Machine Learning in Action> 为防止连续乘法时每个乘数过小,而导致的下溢出(太多很小的数相乘结果为0,或者不能正确分类) 训练: def trainNB0(tr ...

  6. 【MLE】最大似然估计Maximum Likelihood Estimation

    模型已定,参数未知 已知某个随机样本满足某种概率分布,但是其中具体的参数不清楚,参数估计就是通过若干次试验,观察其结果,利用结果推出参数的大概值.最大似然估计是建立在这样的思想上:已知某个参数能使这个 ...

  7. 回归——线性回归,Logistic回归,范数,最大似然,梯度,最小二乘……

    写在前面:在本篇博客中,旨在对线性回归从新的角度考虑,然后引入解决线性回归中会用到的最大似然近似(Maximum Likelihood Appropriation-MLA) 求解模型中的参数,以及梯度 ...

  8. EM 最大似然概率估计

    转载请注明出处 Leavingseason http://www.cnblogs.com/sylvanas2012/p/5053798.html EM框架是一种求解最大似然概率估计的方法.往往用在存在 ...

  9. LR为什么用极大似然估计,损失函数为什么是log损失函数(交叉熵)

    首先,逻辑回归是一个概率模型,不管x取什么值,最后模型的输出也是固定在(0,1)之间,这样就可以代表x取某个值时y是1的概率 这里边的参数就是θ,我们估计参数的时候常用的就是极大似然估计,为什么呢?可 ...

随机推荐

  1. Haproxy 开启日志记录

    CentOS 7上yum安装的Haproxy,默认没有记录日志.需要做一下配置才能记录日志.(不知道其他版本是否需要,已经忘记了)主要是用到了Haproxy,以前貌似没有这么麻烦,今天配置出了一些问题 ...

  2. java把html标签字符转换成普通字符(反转换成html标签)

    package net.jasonjiang.web; import org.junit.Test; import org.springframework.web.util.HtmlUtils; /* ...

  3. Python之路【第十篇】: python基础之socket编程

    阅读目录 一 客户端/服务器架构 二 osi七层 三 socket层 四 socket是什么 五 套接字发展史及分类 六 套接字工作流程 七 基于TCP的套接字 八 基于UDP的套接字 九 recv与 ...

  4. 迭代器模式 与 C# IEnumerator/IEnumerable

    Part1 迭代器模式 与 接口 IEnumerable IEnumerator interface IEnumerable { IEnumerator GetEnumerator(); } // 泛 ...

  5. 【我要学python】面向对象系统学习

    第一节:初识类的定义和调用 c1.py #类 = 面向对象 #类 最基本作用:封装 #类中不仅可以定义变量 还可以定义函数等等,例: class student( ): name = ' ' age ...

  6. 三、redis系列之事务

    1. 绪言 Redis也提供了事务机制,可以一次执行多个命令,本质是一组命令的集合.一个事务中的所有命令都会序列化,按顺序地串行化执行而不会被其他命令插入,不许加塞.但Redis对事务的支持是部分支持 ...

  7. 详细介绍如何在Eclipse中使用SVN

    一.在Eclipse中下载安装Subclipse插件   1 打开eclipse,在Help菜单中找到marketPlace,点击进入. 2 在搜索框Find中输入subclipse,点击右边的Go按 ...

  8. django使用admin

    1.在应用下的admin.py添加 #!/usr/bin/python # coding:utf-8 from django.contrib import admin from .models imp ...

  9. BZOJ.3105.[CQOI2013]新Nim游戏(线性基 贪心 博弈论)

    题目链接 如果后手想要胜利,那么在后手第一次取完石子后 可以使石子数异或和为0.那所有数异或和为0的线性基长啥样呢,不知道.. 往前想,后手可以取走某些石子使得剩下石子异或和为0,那不就是存在异或和为 ...

  10. CF1060C Maximum Subrectangle【乘法分配律】【最大子矩阵】

    CF1060C Maximum Subrectangle 题意翻译 现在给出一个长度为N的a数列,一个长度为M的b数列. 现在需要构造出一个矩阵c,其中ci,j​=ai​×bj​.再给出一个x,请在矩 ...