Dr. Hackney STA Solutions pg 84

Dr. Hackney STA Solutions pg 84 - 5-18 Solutions Manual for...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 5-18 Solutions Manual for Statistical Inference b. fX (x) = e-(log x-) 1 x 2 2 /2 2 . Let V gamma(, ) where 2 (e+( /2) )2 = 2(+2 ) , e - e2+2 since given and 2 we can set e2(+ ) - e2+ and = , e+(2 /2) 2 2 EV = = e+( and Var(V ) = 2 = e2(+ Now, follow the algorithm on page 254. c. fX (x) = e -x 2 2 /2) = EX 2 ) - e2+ = Var(X). x-1 . Let V exponential(). Now, follow the algorithm on page 254 where i = min Vi-1 -Vi -1 e Zi-1 +V -Z i i-1 +Zi-1 ,1 An R code to generate a sample size of 100 from a Weibull(3,2) is: #initialize a and b b <- 2 a <- 3 Z <- rexp(1,1/b) ranvars <- matrix(c(Z),byrow=T,ncol=1) for( i in seq(2000)) { U <- runif(1,min=0,max=1) V <- rexp(1,1/b) p <- pmin((V/Z)^(a-1)*exp((-V^a+V-Z+Z^a)/b),1) if (U <= p) Z <- V ranvars <- cbind(ranvars,Z) } #One option: choose elements in position 1001,1002,...,1100 to be the sample vector.1 <- ranvars[1001:1100] mean(vector.1) var(vector.1) #Another option: choose elements in position 1010,1020,...,2000 to be the sample vector.2 <- ranvars[seq(1010,2000,10)] mean(vector.2) var(vector.2) Output: [1] 1.048035 [1] 0.1758335 [1] 1.130649 [1] 0.1778724 5.69 Let w(v, z) = fY (v)fV (z) fV (v)fY (z) , and then (v, z) = min{w(v, z), 1}. We will show that Zi fY P (Zi+1 a) = P (Y a). ...
View Full Document

Ask a homework question - tutors are online