# Likelihood Examples

Document Sample

```					Likelihood Examples

Example 7: 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
(2 )
i 1
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 8: 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

i 1
log( f ( yi , θ))   log( 2 )  n log( )  (2 2 ) 1  ( yi    xi ) 2
2                                   i 1

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

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 1 posted: 8/7/2012 language: pages: 2
How are you planning on using Docstoc?