6. [R] Estimation of the parameter for exponential distribution 1 (Jan12,14,17)

# 6. [R] Estimation of the parameter for exponential distribution 1 (Jan12,14,17)

This preview shows pages 1–2. Sign up to view the full content.

# Estimation of the parameter for exponential distribution # E(X) = 1/lam lam = .5 n = 40 x = rexp(n, lam) # 2 of many possible estimators lam.hat.1 = 1/mean(x) lam.hat.2 = 1/sqrt(var(x)) lam.hat.1 lam.hat.2 # Which is better? What is their sampling distribution? # sampling distribution # numerical aproximation to obtain this based on Monte Carlo simulation experiment M = 1000 lh.1.rep = rep(0, M) lh.2.rep = rep(0, M) lambda = lam for(i.rep in 1:M){ x.sim = rexp(n, lambda) lh.1.rep[i.rep] = 1/mean(x.sim) lh.2.rep[i.rep] =1/sqrt(var(x.sim)) } # the simulated pairs (lam.hat.1 , lam.hat.2) allows us to obtain approximations to various properties # of the sampling distribution of (lam.hat.1 , lam.hat.2) # Below we explore some of these in order to have some understanding of which simple summary measures # are useful in order to compare these two estimators. # scatter plot of lam.hat.1 versus lam.hat.2 # sometimes lam.hat.1 < lam and lam.hat.2 > lam plot( lh.1.rep, lh.2.rep) # based on this simulated values of lam.hat.1 and lam.hat.2 we can approximate many properties of

This preview has intentionally blurred sections. Sign up to view the full version.

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

## This note was uploaded on 01/17/2012 for the course AM 1234 taught by Professor Qqqq during the Spring '11 term at UWO.

### Page1 / 3

6. [R] Estimation of the parameter for exponential distribution 1 (Jan12,14,17)

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online