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 # the r.v. (lam.hat.1 , lam.hat.2)

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.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern