温莎日记 26

Maximum Likelihood Estimation

As before, we begin with a sample of X=(X_1,...,X_n)random variables chosen according to one of a family of probabilitiesP_\theta . In addition, f(x|\theta )x=(x_1,...,x_n) will be used to denote the density function for the data when \theta  is the true state of nature. 


Definition 1. The likelihood function is the density function regarded as a function of\theta

The MLE is, \hat{\theta } (x)=arg\max_{\theta }L(\theta |x).


Note that if \hat{\theta } (x) is a maximum likelihood estimator for \theta , then g(\hat{\theta } (x)) is a maximum likelihood estimator for g(\theta ). For example, if \theta  is a parameter for the variance and \hat{\theta }  is the maximum likelihood estimator, then \sqrt{\hat{\theta } }  is the maximum likelihood estimator for the standard deviation. This flexibility in the estimation criterion seen here is not available in the case of unbiased estimators. Typically, maximizing the score function lnL(\theta |x) will be easier.


Bernoulli Trials. If the experiment consists of n Bernoulli trial with a success probability\theta , then 

L(\theta |x)=\theta ^{x_1}(1-\theta )^{(1-x_1)}...\theta ^{x_n}(1-\theta )^{(1-x_n)}=\theta ^{(x_1+...+x_n)}(1-\theta )^{n-(x_1+...+x_n)},

lnL(\theta |x)=ln\theta (\sum_{i=1}^n x_i)+ln(1-\theta )(n-\sum_{i=1}^n x_i )=n\tilde{x} ln\theta +n(1-\tilde{x} )ln(1-\theta ),

\frac{\partial}{\partial \theta } lnL(\theta |x)=n(\frac{\tilde{x} }{\theta } -\frac{1-\tilde{x} }{1-\theta } ).

This equals zero when \theta =\tilde{x} .  Check that this is a maximum. Thus, \hat{\theta } (x)=\tilde{x} .

Normal Data. Maximum likelihood estimation can be applied to a vector-valued parameter. For a simple random sample of n normal random variables,

L(\mu , \sigma ^2|x)=(\frac{1}{\sqrt{2\pi \sigma ^2} } exp\left\{ \frac{-{(x_1-\mu )}^2}{2\sigma ^2}  \right\} )...(\frac{1}{\sqrt{2\pi \sigma ^2} } exp\left\{ \frac{-{(x_n-\mu )}^2}{2\sigma ^2}  \right\})=\frac{1}{(\sqrt{2\pi \sigma ^2}) ^n} exp {-\frac{1}{2\sigma ^2} \sum_{i=1}^n (x_i-\mu )^2 }.

lnL(\mu ,\sigma ^2|x)=-\frac{n}{2} 2\pi \sigma ^2 - \frac{1}{2\sigma ^2} \sum_{i=1}^n (x_i-\mu )^2

\frac{\partial}{\partial \mu } lnL(\mu ,\sigma ^2|x)=\frac{1}{\sigma ^2} \sum_{i=1}^n (x_i-\mu ) =\frac{1}{\sigma ^2} n(\tilde{x} -\mu ).

Because the second partial derivative with respect to \mu  is negative, \hat{\mu } (x)=\tilde{x}  is the maximum likelihood estimator. 

\frac{\partial}{\partial \sigma ^2} lnL(\mu ,\sigma ^2|x)=-\frac{n}{\sigma ^2} +\frac{1}{(\sigma ^2)^2} \sum_{i=1}^n {(x_i-\mu )}^2 =\frac{n}{(\sigma ^2)^2} (\sigma ^2-\frac{1}{n}\sum_{i=1}^n (x_i-\mu )^2  ).

Recalling that \hat{\mu } (x)=\tilde{x} , we obtain \hat{\sigma } ^2(x)=\frac{1}{n} \sum_{i=1}^n (x_i-\hat{x} )^2 .  Note that the MLE is a biased estimator.

Linear Regression. Our data is n observations with one explanatory variable and one response variable. The model is that y_i=\alpha + \beta x_i+\epsilon _i, where the \epsilon _i are independent mean 0 normal random variable. The unknown variance is \sigma ^2. The likelihood function 

L(\alpha ,\beta ,\sigma ^2|y,x)=\frac{1}{\sqrt{(2\pi \sigma ^2)^n} } exp{-\frac{1}{2\sigma ^2}} \sum_{i=1}^n (y_i-(\alpha +\beta x_i))^2.

lnL(\alpha ,\beta ,\sigma ^2|y,x)=-\frac{n}{2} ln2\pi \sigma ^2-\frac{1}{2\sigma ^2} \sum_{i=1}^n (y_i-(\alpha +\beta x_i))^2 .

This is the maximum likelihood estimators \hat{\alpha }  and \hat{\beta }  also the least square estimator. The predicted value for the response variable \hat{y}_i = \hat{\alpha }  +\hat{\beta } x_i.  The MLE for variance is \hat{\sigma } ^2_{MLE}=\frac{1}{n} \sum_{k=1}^n (y_i-\hat{y} _i)^2 . The unbiased estimator is \hat{\sigma } ^2_U=\frac{1}{n-2} \sum_{k=1}^n (y_i-\hat{y} _i)^2 .



Asymptotic Properties

Much of the attraction of maximum likelihood estimators is based on their properties for a large sample size.

Consistency. If \theta _0 is the state of nature, then L(\theta _0|X) > L(\theta |X), if and only if

\frac{1}{n} \sum_{i=1}^n ln\frac{f(X_i|\theta _0)}{f(X_i|\theta)} >0

By the strong law of large numbers, this sum converges to E_{\theta _0}[ln\frac{f(X_1|\theta _0)}{f(X_1|\theta )} ], which is greater than 0. From this, we obtain \hat{\theta } (X) \rightarrow \theta _0 as n \rightarrow  ∞. We call this property of the estimator consistency.

Asymptotic Normality and Efficiency. Under some assumptions that are meant to insure some regularity, a central limit theorem holds. Here we have \sqrt{n} (\hat{\theta }(X)-\theta _0 ) converged in distribution as n \rightarrow  ∞ to a normal random variable with mean 0 and variance \frac{1}{I(\theta _0)} , the Fisher information for one observation. Thus 

Var_{\theta _0}(\hat{\theta } (X))\approx \frac{1}{nI(\theta _0)}

the lowest possible under the Cramer-Rao lower bound. This property is called asymptotic efficiency.

Properties of the log-likelihood surface. For the large sample size, the variance of an MLE of a single unknown parameter is approximately the negative of the reciprocal of the Fisher information 

I(\theta )=-E[\frac{\partial^2}{\partial \theta ^2} lnL(\theta |X)]

Thus, the estimate of the variance given data x , 

\hat{\sigma } ^2=-1/\frac{\partial^2}{\partial \theta ^2} lnL(\hat{\theta } |x) , 

the negative reciprocal of the second derivative, also known as the curvature, of the log-likelihood function evaluated at the MLE.

If the curvature is small, then the likelihood surface is flat around its maximum value. If the curvature is large and thus the variance is small, the likelihood is strongly curved at the maximum. For a multidimensional parameter space \theta =(\theta _1,\theta _2,...,\theta _n). Fisher information I(\theta ) is a matrix, the ij-th entry is

I(\theta _i,\theta _j)=E_\theta [\frac{\partial}{\partial\theta _i} lnL(\theta |X)\frac{\partial}{\partial\theta _j} lnL(\theta |X)]=-E_\theta [\frac{\partial^2}{\partial\theta _i \partial\theta _j} lnL(\theta |X)].

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 218,858评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,372评论 3 395
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 165,282评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,842评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,857评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,679评论 1 305
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,406评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,311评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,767评论 1 315
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,945评论 3 336
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,090评论 1 350
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,785评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,420评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,988评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,101评论 1 271
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,298评论 3 372
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,033评论 2 355

推荐阅读更多精彩内容