Likelihood Examples

Document Sample
Likelihood Examples Powered By Docstoc
					Likelihood Examples



Example 5.1: Suppose Yi ~ N(μ, σ 2) all i. In this case
                                     exp{( yi  μ)2 /(2σ 2 )}
                       f ( yi , θ)                            i = 1,2,...,n
                                               2πσ 2
Therefore the likelihood is the product of these
                                                                                    n

                               n                              exp{ (2σ 2 ) 1  ( yi  μ) 2 }
                              f ( y , θ) 
                              i 1
                                             i
                                                                                   i 1
                                                                           (2πσ 2 ) n / 2

The loglikelihood is therefore
                   n                                                                                          n
                                                         n
                  log( f ( y , θ))   2 log(2 )  n log( )  (2
                  i 1
                                     i
                                                                                                 2 1
                                                                                                     )    (y
                                                                                                          i 1
                                                                                                                      i     )2



Example 5.2: Suppose Yi ~ N (   xi , 2 ) , i = 1, 2, ..., n. The only difference from the
previous example is that the μ depend on i. Thus the loglikelihood is:

                   n                                                                                      n
                                                         n
                  log( f ( y , θ))   2 log(2π )  n log(σ )  (2σ
                  i 1
                                     i
                                                                                                2 1
                                                                                                 )       (y
                                                                                                         i 1
                                                                                                                  i    α  βxi ) 2



Bernoulli example: A Bernoulli random variable Y takes just two possible values 0 or 1:

                            Y = 1 with probability p
                            Y = 0 with probability (1 - p)

The likelihood is thus simply p if Y = 1, (1-p) if Y = 0

Thus for a sample Yi ~ Bernoulli(π (xi , β)) the likelihood is

                 lik     π (x , β)  (1  π (x , β))
                         i:Yi 1
                                         i
                                                 j :Y j  0
                                                                       j



                 log lik           log(π (x , β))   log(1  π (x , β))
                               i:Yi 1
                                                        i
                                                                    j :Y j  0
                                                                                            j




Regression example: This is very similar to the linear regression case:

         n                                                              n
                                  n
        
        i 1
             log( f ( yi , θ))   log( 2π )  n log(σ )  (2σ 2 ) 1  ( yi  η( xi , θ)) 2
                                  2                                   i 1
Gamma Distribution Example:
Gamma Distribution:

                             y α 1e  y / β
             pdf: f ( y, α, β )             0 y
                              β α Γ(α)
             cdf: No simple explicit expression

             Mean = αβ
             Variance = αβ 2


                               n
                                   yiα 1e  yi / β
             likelihood =      β α Γ(α)
                              i 1




                   n
loglikelihood =   {α log( β )  log Γ(α)  (α  1) log( y )  y / β}
                  i 1
                                                             i     i

                                                                        n
                                 nα log( β )  n log Γ(α )  (α  1) {log( yi )  β 1 yi }
                                                                       i 1

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:9/14/2012
language:Unknown
pages:2