maximum likelihood - coordinación de ciencias …emorales/cursos/nvoaprend/... · ejemplo ! en la...

27
MAXIMUM LIKELIHOOD Jesús A. González y Eduardo Morales

Upload: others

Post on 18-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

MAXIMUM LIKELIHOOD Jesús A. González y Eduardo Morales

Page 2: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Maximum Likelihood Estimation (MLE)

¨  Método preferido para estimación de parámetros en estadística

¨  Indispensable para muchas técnicas de modelado estadístico ¤  Modelado no-lineal con datos que no siguen una distribución normal

¨  La meta del modelado es deducir la forma de un proceso al probar la viabilidad de el modelo

25/02/13 2:53 pm

2

Page 3: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Maximum Likelihood Estimation (MLE)

¨  Al especificar un modelo y sus parámetros para un conjunto de datos ¤ Evaluar qué tan bien se ajusta el modelo a los datos

observados

¨  El “buen ajuste” se evalúa al encontrar los parámetros del modelo que mejor se ajustan a los datos ¤ Este proceso se conoce como

n Estimación de parámetros

25/02/13 2:53 pm

3

Page 4: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Estimación de Parámetros

¨  Dos métodos generales para estimación de parámetros: 1.  Least-squares estimation (LSE)

n  Estimación por mínimos cuadrados n  Utilizado en varios conceptos

n  Regresión lineal n  Suma de errores cuadrados n  Desviación de la raíz del cuadrado de la media

n  No requiere (o mínima) asunción de la distribución n  Útil para obtener medida descriptiva para sumarizar los datos

observados n  No tiene base para pruebas de hipótesis o construir intervalos de

confianza

25/02/13 2:53 pm

4

Page 5: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Estimación de Parámetros

¨  Dos métodos generales para estimación de parámetros: 1.  Maximum likelihood estimation (MLE)

n  Estimación por máxima verosimilitud n  Estándar para estimación de parámetros e inferencia en

estadística n  MLE tiene muchas propiedades óptimas en la estimación

n  Información completa del parámetro de interés contenido en su estimador MLE

n  Consistencia: sobre el valor del parámetro verdadero que generó los datos, que se recupera asintóticamente (con suficientes datos)

n  Eficiencia: se obtiene la menor-posible varianza de los estimados del parámetro, recuperado asintóticamente

n  Invarianza a la parametrización (obtiene la misma solución MLE independientemente de la parametrización utilizada)

25/02/13 2:53 pm

5

Page 6: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Estimación de Parámetros

¨  Muchos métodos estadísticos de inferencia están basados en MLE ¤ Prerequisito para

n  Prueba chi-square n Prueba G-square n Métodos bayesianos n  Inferencia con valores faltantes n Modelado de efectos aleatorios n Modelos de criterios de selección: criterio de información de

Akaike y criterio de información Bayesiana

25/02/13 2:53 pm

6

Page 7: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Especificación del Modelo

¨  Función de densidad de probabilidad ¤ Muestra aleatoria de una población desconocida

n y = (y1, …, ym)

¤ La meta del análisis de datos n  Identificar cuál es la población más probable de haber

generado la muestra

¤ En estadística, cada población se identifica por su correspondiente distribución de probabilidad

¤ A cada distribución se asocia un valor único del parámetro del modelo

25/02/13 2:53 pm

7

Page 8: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Especificación del Modelo

¨  Función de densidad de probabilidad (continuación…) ¤ Cambiar el valor del parámetro, genera diferentes

distribuciones de probabilidad ¤ Un modelo se define como una familia de distribuciones

de probabilidad indexada por los parámetros del modelo

¨  f(y|w) à función de densidad de probabilidad ¤ Nos dice la probabilidad de observar el vector de

datos y dado el parámetro w

25/02/13 2:53 pm

8

Page 9: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Especificación del Modelo

¨  Función de densidad de probabilidad (continuación…) ¤ w = (w1, …, wk)

n  Vector definido en el espacio de parámetros multi-dimensional n  Si yi’s son estadísticamente independientes una de otra

n  De acuerdo a teoría de probabilidad

n  La PDF de los datos y=(y1, …, ym) dado el vector de parámetros w se puede expresar como una multiplicación de PDFs de observaciones individuales

25/02/13 2:53 pm

9

f (y = (y1, y2,..., yn ) |w) = f1(y1 |w) f2 (y2 |w)... fn (ym |w).

Page 10: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

25/02/13 2:53 pm

10

¨  Caso más simple: una observación y un parámetro ¤ m = k = 1 ¤ Los datos, y representan una secuencia de sucesos de

10 tiradas Bernoulli (tirar una moneda 10 veces) n Probabilidad de éxito en cada tirada, w = 0.2

Page 11: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

25/02/13 2:53 pm

11

¨  Distribución binomial para el experimento con n = 10, y variando w: 0.2, 0.7

f (y | n =10,w = 0.2) = 10!y!(10− y)!

(0.2)y (0.8)10−y

(y = 0,1,...,10)

f (y | n =10,w = 0.7) = 10!y!(10− y)!

(0.7)y (0.3)10−y

(y = 0,1,...,10)

f (y | n,w) = n!y!(n− y)!

(w)y (1−w)n−y

(0 ≤ w ≤1; y = 0,1,...,n)

Page 12: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

In this tutorial paper, I introduce the maximumlikelihood estimation method for mathematical model-ing. The paper is written for researchers who areprimarily involved in empirical work and publish inexperimental journals (e.g. Journal of ExperimentalPsychology) but do modeling. The paper is intended toserve as a stepping stone for the modeler to movebeyond the current practice of using LSE to moreinformed modeling analyses, thereby expanding his orher repertoire of statistical instruments, especially innon-linear modeling. The purpose of the paper is toprovide a good conceptual understanding of the methodwith concrete examples. For in-depth, technically morerigorous treatment of the topic, the reader is directed toother sources (e.g., Bickel & Doksum, 1977, Chap. 3;Casella & Berger, 2002, Chap. 7; DeGroot & Schervish,2002, Chap. 6; Spanos, 1999, Chap. 13).

2. Model specification

2.1. Probability density function

From a statistical standpoint, the data vector y !"y1;y; ym# is a random sample from an unknownpopulation. The goal of data analysis is to identify thepopulation that is most likely to have generated thesample. In statistics, each population is identified by acorresponding probability distribution. Associated witheach probability distribution is a unique value of the

model’s parameter. As the parameter changes in value,different probability distributions are generated. For-mally, a model is defined as the family of probabilitydistributions indexed by the model’s parameters.

Let f "yjw# denote the probability density function(PDF) that specifies the probability of observing datavector y given the parameter w: Throughout this paperwe will use a plain letter for a vector (e.g. y) and a letterwith a subscript for a vector element (e.g. yi). Theparameter w ! "w1;y;wk# is a vector defined on amulti-dimensional parameter space. If individual ob-servations, yi’s, are statistically independent of oneanother, then according to the theory of probability, thePDF for the data y ! "y1;y; ym# given the parametervector w can be expressed as a multiplication of PDFsfor individual observations,

f "y ! "y1; y2;y; yn# jw# ! f1"y1 j w# f2"y2 j w#?fn"ym j w#: "1#

To illustrate the idea of a PDF, consider the simplestcase with one observation and one parameter, that is,m ! k ! 1: Suppose that the data y represents thenumber of successes in a sequence of 10 Bernoulli trials(e.g. tossing a coin 10 times) and that the probability ofa success on any one trial, represented by the parameterw; is 0.2. The PDF in this case is given by

f "y j n ! 10;w ! 0:2# ! 10!

y!"10$ y#!"0:2#y"0:8#10$y

"y ! 0; 1;y; 10# "2#

Fig. 1. Binomial probability distributions of sample size n ! 10 and probability parameter w ! 0:2 (top) and w ! 0:7 (bottom).

I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–100 91

25/02/13 2:53 pm

12

Page 13: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

¨  En la distribución binomial del ejemplo: ¤ El número de intentos (tiradas), n, se considera un

parámetro ¤ La función de y especifica la probabilidad de los datos

y para valores dados de n y w ¤ A la colección de todas las PDFs generadas al variar

los parámetros en el rango (0-1en este caso para w, n>=1) define un modelo.

25/02/13 2:53 pm

13

Page 14: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

25/02/13 2:53 pm

14

¨  Dado un conjunto de valores de parámetros ¨  La PDF correspondiente muestra que algunos datos

son más probables que otros ¨  En el ejemplo, con w = 2, y = 2 es más probable de

ocurrir que y = 5 (0.302 vs. 0.026)

Page 15: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

¨  Sin embargo, tenemos el problema inverso ¤ Ya observamos los datos ¤ Dados los datos observados y un modelo de interés

n Encontrar la PDF, entre todas las densidades de probabilidad que provee el modelo, que tiene la mayor probabilidad de haber producido los datos

¨  Para resolver el problema se define la función de verosimilitud invirtiendo los roles del vector de datos y y el vector de parámetros w en f(y|w) ¤ LL(w|y) = f(y|w).

25/02/13 2:53 pm

15

Page 16: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

¨  L(w|y) representa la verosimilitud del parámetro w dados los datos observados y. ¤ Por ejemplo, con y = 7 y n = 10:

25/02/13 2:53 pm

16

L(w | n =10, y = 7) = f (y = 7 | n =10,w)

=10!7!3!

w7(1−w)3 (0 ≤ w ≤1).

Page 17: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

which is known as the binomial distribution withparameters n ! 10; w ! 0:2: Note that the number oftrials "n# is considered as a parameter. The shape of thisPDF is shown in the top panel of Fig. 1. If theparameter value is changed to say w ! 0:7; a new PDFis obtained as

f "y j n ! 10;w ! 0:7# ! 10!

y!"10$ y#!"0:7#y"0:3#10$y

"y ! 0; 1;y; 10# "3#

whose shape is shown in the bottom panel of Fig. 1. Thefollowing is the general expression of the PDF of thebinomial distribution for arbitrary values of w and n:

f "yjn;w# ! n!

y!"n$ y#!wy"1$ w#n$y

"0pwp1; y ! 0; 1;y; n# "4#

which as a function of y specifies the probability of datay for a given value of n and w: The collection of all suchPDFs generated by varying the parameter across itsrange (0–1 in this case for w; nX1) defines a model.

2.2. Likelihood function

Given a set of parameter values, the correspondingPDF will show that some data are more probable thanother data. In the previous example, the PDF with w !0:2; y ! 2 is more likely to occur than y ! 5 (0.302 vs.0.026). In reality, however, we have already observed thedata. Accordingly, we are faced with an inverseproblem: Given the observed data and a model of

interest, find the one PDF, among all the probabilitydensities that the model prescribes, that is most likely tohave produced the data. To solve this inverse problem,we define the likelihood function by reversing the roles ofthe data vector y and the parameter vector w in f "yjw#;i.e.

L"wjy# ! f "yjw#: "5#

Thus L"wjy# represents the likelihood of the parameterw given the observed data y; and as such is a function ofw: For the one-parameter binomial example in Eq. (4),the likelihood function for y ! 7 and n ! 10 is given by

L"w j n ! 10; y ! 7# ! f "y ! 7 j n ! 10;w#

! 10!

7!3!w7"1$ w#3 "0pwp1#: "6#

The shape of this likelihood function is shown in Fig. 2.There exist an important difference between the PDF

f "yjw# and the likelihood function L"wjy#: As illustratedin Figs. 1 and 2, the two functions are defined ondifferent axes, and therefore are not directly comparableto each other. Specifically, the PDF in Fig. 1 is afunction of the data given a particular set of parametervalues, defined on the data scale. On the other hand, thelikelihood function is a function of the parameter givena particular set of observed data, defined on theparameter scale. In short, Fig. 1 tells us the probabilityof a particular data value for a fixed parameter, whereasFig. 2 tells us the likelihood (‘‘unnormalized probabil-ity’’) of a particular parameter value for a fixed data set.Note that the likelihood function in this figure is a curve

Fig. 2. The likelihood function given observed data y ! 7 and sample size n ! 10 for the one-parameter model described in the text.

I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–10092

25/02/13 2:53 pm

17

Page 18: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

¨  Diferencia importante entre las funciones PDF f(y|w) y de verosimilitud L(w|y) (ver figuras). ¤ Se definen sobre ejes diferentes ¤ No son directamente comparables ¤  f(y|w) se define en la escala de datos

n Función de los datos dado un conjunto de valores de parámetros

¤ L(w|y) se define en la escala de parámetros n Función del parámetro, dado un conjunto particular de datos

observados

25/02/13 2:53 pm

18

Page 19: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Función de Verosimilitud (likelihood)

¨  Fig. 1 nos dice la probabilidad de un valor de datos en particular para un parámetro fijo.

¨  Fig. 2 nos dice la verosimilitud (“probabilidad no normalizada”) de un parámetro particular para un conjunto de datos fijo.

25/02/13 2:53 pm

19

In this tutorial paper, I introduce the maximumlikelihood estimation method for mathematical model-ing. The paper is written for researchers who areprimarily involved in empirical work and publish inexperimental journals (e.g. Journal of ExperimentalPsychology) but do modeling. The paper is intended toserve as a stepping stone for the modeler to movebeyond the current practice of using LSE to moreinformed modeling analyses, thereby expanding his orher repertoire of statistical instruments, especially innon-linear modeling. The purpose of the paper is toprovide a good conceptual understanding of the methodwith concrete examples. For in-depth, technically morerigorous treatment of the topic, the reader is directed toother sources (e.g., Bickel & Doksum, 1977, Chap. 3;Casella & Berger, 2002, Chap. 7; DeGroot & Schervish,2002, Chap. 6; Spanos, 1999, Chap. 13).

2. Model specification

2.1. Probability density function

From a statistical standpoint, the data vector y !"y1;y; ym# is a random sample from an unknownpopulation. The goal of data analysis is to identify thepopulation that is most likely to have generated thesample. In statistics, each population is identified by acorresponding probability distribution. Associated witheach probability distribution is a unique value of the

model’s parameter. As the parameter changes in value,different probability distributions are generated. For-mally, a model is defined as the family of probabilitydistributions indexed by the model’s parameters.

Let f "yjw# denote the probability density function(PDF) that specifies the probability of observing datavector y given the parameter w: Throughout this paperwe will use a plain letter for a vector (e.g. y) and a letterwith a subscript for a vector element (e.g. yi). Theparameter w ! "w1;y;wk# is a vector defined on amulti-dimensional parameter space. If individual ob-servations, yi’s, are statistically independent of oneanother, then according to the theory of probability, thePDF for the data y ! "y1;y; ym# given the parametervector w can be expressed as a multiplication of PDFsfor individual observations,

f "y ! "y1; y2;y; yn# jw# ! f1"y1 j w# f2"y2 j w#?fn"ym j w#: "1#

To illustrate the idea of a PDF, consider the simplestcase with one observation and one parameter, that is,m ! k ! 1: Suppose that the data y represents thenumber of successes in a sequence of 10 Bernoulli trials(e.g. tossing a coin 10 times) and that the probability ofa success on any one trial, represented by the parameterw; is 0.2. The PDF in this case is given by

f "y j n ! 10;w ! 0:2# ! 10!

y!"10$ y#!"0:2#y"0:8#10$y

"y ! 0; 1;y; 10# "2#

Fig. 1. Binomial probability distributions of sample size n ! 10 and probability parameter w ! 0:2 (top) and w ! 0:7 (bottom).

I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–100 91

which is known as the binomial distribution withparameters n ! 10; w ! 0:2: Note that the number oftrials "n# is considered as a parameter. The shape of thisPDF is shown in the top panel of Fig. 1. If theparameter value is changed to say w ! 0:7; a new PDFis obtained as

f "y j n ! 10;w ! 0:7# ! 10!

y!"10$ y#!"0:7#y"0:3#10$y

"y ! 0; 1;y; 10# "3#

whose shape is shown in the bottom panel of Fig. 1. Thefollowing is the general expression of the PDF of thebinomial distribution for arbitrary values of w and n:

f "yjn;w# ! n!

y!"n$ y#!wy"1$ w#n$y

"0pwp1; y ! 0; 1;y; n# "4#

which as a function of y specifies the probability of datay for a given value of n and w: The collection of all suchPDFs generated by varying the parameter across itsrange (0–1 in this case for w; nX1) defines a model.

2.2. Likelihood function

Given a set of parameter values, the correspondingPDF will show that some data are more probable thanother data. In the previous example, the PDF with w !0:2; y ! 2 is more likely to occur than y ! 5 (0.302 vs.0.026). In reality, however, we have already observed thedata. Accordingly, we are faced with an inverseproblem: Given the observed data and a model of

interest, find the one PDF, among all the probabilitydensities that the model prescribes, that is most likely tohave produced the data. To solve this inverse problem,we define the likelihood function by reversing the roles ofthe data vector y and the parameter vector w in f "yjw#;i.e.

L"wjy# ! f "yjw#: "5#

Thus L"wjy# represents the likelihood of the parameterw given the observed data y; and as such is a function ofw: For the one-parameter binomial example in Eq. (4),the likelihood function for y ! 7 and n ! 10 is given by

L"w j n ! 10; y ! 7# ! f "y ! 7 j n ! 10;w#

! 10!

7!3!w7"1$ w#3 "0pwp1#: "6#

The shape of this likelihood function is shown in Fig. 2.There exist an important difference between the PDF

f "yjw# and the likelihood function L"wjy#: As illustratedin Figs. 1 and 2, the two functions are defined ondifferent axes, and therefore are not directly comparableto each other. Specifically, the PDF in Fig. 1 is afunction of the data given a particular set of parametervalues, defined on the data scale. On the other hand, thelikelihood function is a function of the parameter givena particular set of observed data, defined on theparameter scale. In short, Fig. 1 tells us the probabilityof a particular data value for a fixed parameter, whereasFig. 2 tells us the likelihood (‘‘unnormalized probabil-ity’’) of a particular parameter value for a fixed data set.Note that the likelihood function in this figure is a curve

Fig. 2. The likelihood function given observed data y ! 7 and sample size n ! 10 for the one-parameter model described in the text.

I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–10092

Page 20: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ecuación de Verosimilitud

¨  Las estimaciones “MLE” pueden no existir o pueden no ser únicas.

¨  Veremos sólo cuando existen y son únicas. ¨  Por conveniencia, MLE se obtiene maximizando la

función log-likelihood: lnL(w|y) ¤  lnL(w|y) y L(w|y) están monotónicamente relacionadas

una a la otra n Se obtiene el mismo estimado MLE maximizando cualquiera

de ellas

25/02/13 2:53 pm

20

Page 21: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ecuación de Verosimilitud

¨  Asumiendo que lnL(w|y) es diferenciable, si wMLE existe, debe satisfacer la siguiente ecuación diferencial parcial conocida como “likelihood equation”

¤ con wi = wi,MLE para todo i = 1, …, k.

25/02/13 2:53 pm

21

∂ lnL(w | y)∂wi

= 0

Page 22: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ecuación de Verosimilitud

¨  La ecuación representa una condición necesaria para la existencia de un estimado MLE

¨  Condición adicional a satisfacer para asegurar que lnL(w|y) sea un máximo y no un mínimo ¤  La primera derivada no revela esta condición

n  Para ser un máximo, la forma de la función “log-likelihood” debe ser convexa (representar un pico y no un valle) en la vecindad de wMLE

¤  Se puede verificar con la segunda derivada de “log-likelihoods” y mostrando si son todos negativos en wi = wi,MLE para i = 1, …, k

25/02/13 2:53 pm

22

∂2 lnL(w | y)∂w2

i

< 0

Page 23: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

25/02/13 2:53 pm

23

¨  Con L(w|n = 10, y = 7), obtenemos el log-likelihood como:

¨  La primera derivada del log-likelihood:

¨  Se requiere que esta ecuación sea cero y el estimado MLE deseado se obtiene como: wMLE = 0.7

lnL(w | n =10, y = 7) = ln 10!7!3!

+ 7lnw+3ln(1−w)(9)

d lnL(w | n =10, y = 7)dw

=7w−

31−w

=7−10ww(1−w)

.

Page 24: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ejemplo

¨  Para asegurar que la solución representa un máximo y no un mínimo, se obtiene la segunda derivada del log-likelihood en w = wMLE

¨  es negativo, como se desea.

25/02/13 2:53 pm

24

d 2 lnL(w | n =10, y = 7)dw2 =

7w2 −

3(1−w)2

= −47.62 < 0.

Page 25: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ecuación de Verosimilitud

¨  En la práctica, (usualmente) no es posile obtener una solución en forma analítica para el estimado MLE ¤ Aún más cuando el modelo tiene muchos parámetros y su

PDF es altamente no-lineal. ¤  En esas situaciones, el estimado MLE se debe ser buscado

numéricamente usando algoritmos de optimización no-lineales n  Buscar subconjuntos mucho más pequeños del espacio de

parámetros multi-dimensional, en lugar de búsqueda exhaustiva de todo el espacio de parámetros

n  Intratable conforme aumenta el número de parámetros

25/02/13 2:53 pm

25

Page 26: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Ecuación de Verosimilitud

searching much smaller sub-sets of the multi-dimen-sional parameter space rather than exhaustively search-ing the whole parameter space, which becomesintractable as the number of parameters increases. The‘‘intelligent’’ search proceeds by trial and error over thecourse of a series of iterative steps. Specifically, on eachiteration, by taking into account the results from theprevious iteration, a new set of parameter values isobtained by adding small changes to the previousparameters in such a way that the new parameters arelikely to lead to improved performance. Differentoptimization algorithms differ in how this updatingroutine is conducted. The iterative process, as shown bya series of arrows in Fig. 3, continues until theparameters are judged to have converged (i.e., point Bin Fig. 3) on the optimal set of parameters on anappropriately predefined criterion. Examples of thestopping criterion include the maximum number ofiterations allowed or the minimum amount of change inparameter values between two successive iterations.

3.2. Local maxima

It is worth noting that the optimization algorithmdoes not necessarily guarantee that a set of parametervalues that uniquely maximizes the log-likelihood will befound. Finding optimum parameters is essentially aheuristic process in which the optimization algorithm

tries to improve upon an initial set of parameters that issupplied by the user. Initial parameter values are choseneither at random or by guessing. Depending upon thechoice of the initial parameter values, the algorithmcould prematurely stop and return a sub-optimal set ofparameter values. This is called the local maximaproblem. As an example, in Fig. 3 note that althoughthe starting parameter value at point a2 will lead to theoptimal point B called the global maximum, the startingparameter value at point a1 will lead to point A, which isa sub-optimal solution. Similarly, the starting parametervalue at a3 will lead to another sub-optimal solution atpoint C.

Unfortunately, there exists no general solution to thelocal maximum problem. Instead, a variety of techni-ques have been developed in an attempt to avoid theproblem, though there is no guarantee of theireffectiveness. For example, one may choose differentstarting values over multiple runs of the iterationprocedure and then examine the results to see whetherthe same solution is obtained repeatedly. When thathappens, one can conclude with some confidence that aglobal maximum has been found.2

Fig. 3. A schematic plot of the log-likelihood function for a fictitious one-parameter model. Point B is the global maximum whereas points A and Care two local maxima. The series of arrows depicts an iterative optimization process.

2A stochastic optimization algorithm known as simulated annealing(Kirkpatrick, Gelatt, & Vecchi, 1983) can overcome the local maximaproblem, at least in theory, though the algorithm may not be a feasibleoption in practice as it may take an realistically long time to find thesolution.

I.J. Myung / Journal of Mathematical Psychology 47 (2003) 90–10094

25/02/13 2:53 pm

26

Page 27: MAXIMUM LIKELIHOOD - Coordinación de Ciencias …emorales/Cursos/NvoAprend/... · Ejemplo ! En la distribución binomial del ejemplo: ! El número de intentos (tiradas), n, se considera

Referencia

25/02/13 2:53 pm

27

¨  In Jae Myung, Tutorial on maximum likelihood estimation. Journal of Mathematical Psychology 47, pp. 90 – 100, 2003.