This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ), we can get c = 2 e . Rejection algorithm: step1: Generate x ∼ Uniform (1 , 3). 2 step2: Generate u ∼ Uniform (0 , 1). step3: Accept x if u ≤ l ( x ) cg ( x ) = e 1 x-1 . 6 Problem 6 let l ( x ) = e-x e-e-x and h ( x ) = x . We can choose gamma(2,1) as our proposal distribution, so g ( x ) = xe-x , x > 0. Then the IS algorithm is: step1: Draw x ( i ) ∼ gamma (2 , 1) ,i = 1 , 2 ,...,n . step2: Calculate weights w ( i ) = e-x ( i ) e-e-x ( i ) x ( i ) e-x ( i ) = e-e-x ( i ) x ( i ) . step3: Estimate μ by ˆ μ = ∑ n i =1 w ( i ) h ( x ( i ) ) ∑ n i =1 w ( i ) . 3...
View Full Document
- Spring '08
- Cumulative distribution function, CDF, Inverse CDF algorithm