Homework 4

Say \(X_1,..,X_n \sim \text{Exp}(\lambda)\), that is \(f(x\vert\lambda)=\lambda\exp\{-\lambda x\},x>0\). Let \(T = 1/\bar{x}\)

  1. find \(Z\), the Bayesian estimator of \(\lambda\) when \(\lambda\sim Exp(1)\) and using the mean of the posterior distribution.

  2. which (if any) of these estimators is unbiased?

  3. which of these estimators is a sufficient statistic?

  4. find a function \(g(T)\) which is an ancillary statistic of \(\lambda\).

  5. is \(T\) a consistent estimator of \(\lambda\) ?

  6. consider the estimators \(T\) and \(V=\log (2)/\text{median}(x)\). Write a routine in R that uses simulation to draw a curve for eff(V|T) either as a function of n (with \(\lambda\) fixed) or as a function of \(\lambda\) (with n fixed). (You can assume that T and V are unbiased)

as an example, your routine should do the following:

hw4p6(n=c(10, 50), lambda=1.5)

hw4p6(n=20, lambda=c(1.5, 10))