Question

In: Statistics and Probability

The exponential distribution with rateλhas meanμ= 1/λ. Thus the method of moments estimator of λ is...

The exponential distribution with rateλhas meanμ= 1/λ. Thus the method of moments estimator of λ is 1/X. Use the following steps to verify that X is unbiased, but 1/X is biased. USING R:

a) Generate 10000 samples of size n= 5 from the standard exponential distribution (i.e.λ= 1) using rexp(50000) and arranging the 50000 random numbers in a matrix with 5 rows.

b) Use the apply() function to compute the 10000 sample means and store them in the object means. The 10000 estimators of λ can be stored in the object lambdas by lambdas = 1/means

c) Compute the sample mean of the object means, and sample mean of the object lambdas. What can you say about the bias of Xand of 1/X?

d) Repeat with a sample of size n= 10, using rexp(100000), and report your estimate of the bias of 1/X. Has the bias decreased?

Please answer with r code

Solutions

Expert Solution

R Code for (a), (b) and (c)

set.seed(999)
#a)
x = rexp(50000)
matrices = matrix(data = c(x), nrow = 5)

#b)
means = apply(matrices, 2, mean)
lambdas = 1/means

#c)
xbar = mean(means)
lambda.bar = mean(lambdas)
#bias for X-bar
xbar - 1 # 1/lambda = 1

#bias for 1/X-bar
lambda.bar - 1 # lambda = 1

On running the code, the bias of = 0.004988631 0

Thus, is unbiased.

The bias of = 0.2411502

Thus, is biased.

d)

set.seed(999)
#a)
x = rexp(100000)
matrices = matrix(data = c(x), nrow = 10)

#b)
means = apply(matrices, 2, mean)
lambdas = 1/means

#c)
xbar = mean(means)
lambda.bar = mean(lambdas)
#bias for X-bar
xbar - 1 # 1/lambda = 1

#bias for 1/X-bar
lambda.bar - 1 # lambda = 1

Running with n = 10, we get the bias of = 0.001238622 0

The bias of = 0.112071

Yes, the bias is decreased with increase in the sample size.


Related Solutions

The exponential distribution with rate λ has mean μ = 1/λ. Thus the method of moments...
The exponential distribution with rate λ has mean μ = 1/λ. Thus the method of moments estimator of λ is 1/X. Use the following steps to verify that X is unbiased, but 1/X is biased. a) Generate 10000 samples of size n = 5 from the standard exponential distribution (i.e. λ = 1) using rexp(50000) and arranging the 50000 random numbers in a matrix with 5 rows. b) Use the apply() function to compute the 10000 sample means and store...
Determine the Maximum Likelihood Estimator for; 1. λ for the Poisson distribution. 2. θ for the...
Determine the Maximum Likelihood Estimator for; 1. λ for the Poisson distribution. 2. θ for the Exponential distribution. Caveat: These are examples of distributions for which the MLE can be found analytically in terms of the data x1, . . . , xn and so no advanced computational methods are required and also in each assume a random sample of size n, x1, x2, . . . , xn
If Y is a random variable with exponential distribution with mean 1/λ, show that E (Y...
If Y is a random variable with exponential distribution with mean 1/λ, show that E (Y ^ k) = k! / (λ^k), k = 1,2, ...
List all basic distributions for which: a) MLE is unbiased, but Method of Moments (MM) estimator...
List all basic distributions for which: a) MLE is unbiased, but Method of Moments (MM) estimator is biased b) MLE is biased, but MM estimator is unbiased
For a random sample of sizenfrom an Exponential distribution with rate parameter λ (so that the...
For a random sample of sizenfrom an Exponential distribution with rate parameter λ (so that the density is fY(y) =λe−λy), derive the maximum likelihood estimator, the methods of moments estimator, and the Bayes estimator (that is, the posterior mean) using a prior proportional to λe−λ, for λ >0. (Hint: the posterior distribution will be a Gamma.)
Exponential distribution with λ = 0.5 Apply Chi-Square test to see whether the your hypothesized distribution...
Exponential distribution with λ = 0.5 Apply Chi-Square test to see whether the your hypothesized distribution fits your data. using excel
Suppose the time to failure follows an exponential distribution with parameter λ. Based on type II...
Suppose the time to failure follows an exponential distribution with parameter λ. Based on type II censoring determine the likelihood and the maximum likelihood estimator for λ. Assume that n = 3 and the experiment ends after 2 failures.
a) Find the analytic MLE formula for exponential distribution exp(λ). Show that MLE is the same...
a) Find the analytic MLE formula for exponential distribution exp(λ). Show that MLE is the same as MoM estimator here. (b) A random sample of size 6 from the exp(λ) distribution results in observations: 1.636, 0.374, 0.534, 3.015, 0.932, 0.179. Find the MLE on this data set in two ways: by numerical optimization of the likelihood and by the analytic formula. For (b): please give both values from the analytic MLE formula and numerical MLE solution on this data set....
Given below are 10 observations which we believe comes from the exponential distribution with λ= 10....
Given below are 10 observations which we believe comes from the exponential distribution with λ= 10. Give the 10 ordered pairs which you would need to construct a probability plot you could use to verify this assumption. 1.08, 4.24, 33.40, 29.26, 2.94, 15.92, 1.96, 10.47, 16.71, 14.27
Consider a two-server queue with Exponential arrival rate λ. Suppose servers 1 and 2 have exponential...
Consider a two-server queue with Exponential arrival rate λ. Suppose servers 1 and 2 have exponential rates μ1 and μ2, with μ1 > μ2. If server 1 becomes idle, then the customer being served by server 2 switches to server 1. a) Identify a condition on λ,μ1,μ2 for this system to be stable, i.e., the queue does not grow indefinitely long. b) Under that condition, and the long-run proportion of time that server 2 is busy.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT