Could you please do it in R program 1 Assume that we draw n

Could you please do it in R program?

1. Assume that we draw n data values independently from an exponential distribution with rate parameter , ie. (1, n ~ Exp(A). The exponential distribution is a positive and right skewed distribution function (see the Wikipedia entry here and the R help output here) and the probability distribution function is given by It is well known that the mean of the exponential distribution is EX- and the variance is Var(X] 2 . The median of the exponential distribution is given by log(2) Now a statistician is considering using two statistics to estimate the mean of the distribution . The two statistics are: . The sample mean T1 = X = M 72 . The sample median divided by log(2), i.e. T2-X/log(2) The statistician knows that because Xi,... ,Xn are independent and identically dis- nVar(X tributed (iid.), Var(T) = (a) Using the central limit theorem, what is the asymptotic distribution of V n(-1)? (b) Using the lecture notes, what is the asymptotic distribution of Vn(X - lo2)? (c) Using the property that Var(cT-cyar(T) for any statistic T and scalar c, along with the answer in part a, derive the formula for the asymptotic variance Var(T2) (d) If we were to compare the two statistics, what is the asymptotic relative efficiency ar(T (e) Based upon part c, which statistic is the most efficient statistic to estimate 1? Broadly speaking, discuss the advantages and disadvantages of both statistics? (f) Generate 1000 Exp(1) random variables using

Solution

X1,X2,…..,Xn is a random sample from Exp() distribution.

E(Xi)=1/    for i=1(1)n

V(Xi)=1/2 for i=1(1)n

(a)

Given T1= Xbar = (X1+X2+…..+Xn)/n

Then E(T1 ) =1/   and V(T1) = 1/n2

Using Lindeberg Levy Central limit theorem (clt) we get

(T1-1/)/(1/sqrt(n))    ~ N(0,1) asymptotically

=> sqrt(n)(T1-1/ ) ~ N(0,1) asymptotically

=> sqrt(n)( T1-1/ ) ~ N(0,1/2) asymptotically

(b)

The asymptotic distribution of sample median med(X) is normal distribution with mean = population median and                       variance = 1/4n{f(pop med)}2

The population median is given as

med = log(2)/

Then f(log(2)/) = e-*log(2)/ = e-log(2) = /2

Then var=1/(4n*2/4) = 1/n2

Then med(X) ~ N(log(2)/,1/n 2) asymptotically.

=> med(X) – log(2)/ ~ N(0,1/n 2) asymptotically

=> sqrt(n){med(X)-log(2)/ ) ~ N(0, 1/2) asymptotically

(c)

V(T2) = V(med(X)/log(2))

= V(med(X))/{log(2)}2

= 1/n 2 {log(2)}2   asymptotically

(d)

ARE(T1,T2) = V(T1)/V(T2)

= {1/n2}/{1/n2(log(2))2}

= {log(2)}2

(e)

Note that E(T1)=1/   for all >0

But E(T2)= 1/ asymptotically

Also note that

ARE(T1,T2) = V(T1)/V(T2) < 1

=> V(T1) < V(T2)    asymptotically

Though both T1 and T2 are unbiased for asymptotically, asymptotic variance of T1 is lesser than that of T2 implying that T1 is better estimator of 1/ than T2 .

(f)

Using the following codes in R we get

Code:

x<-rexp(1000,1);summary(x)

The output is

Min.          1st Qu.        Median     Mean         3rd Qu.     Max.

0.001265   0.271700   0.746000   1.087000   1.509000   6.689000

Here we observe that sample mean is closer to the original mean value (1 in this case) than median. This random sample also suggests that mean is a better estimator of population mean than the one derived using median.

Could you please do it in R program? 1. Assume that we draw n data values independently from an exponential distribution with rate parameter , ie. (1, n ~ Exp(A
Could you please do it in R program? 1. Assume that we draw n data values independently from an exponential distribution with rate parameter , ie. (1, n ~ Exp(A

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site