Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

On topic of statistical inference, point estimators and mean sample error, I have the following task: In this assignment we consider data collected from the

On topic of statistical inference, point estimators and mean sample error, I have the following task:

In this assignment we consider data collected from the donor database of Blood Transfusion Service Center in Hsin-Chu City in Taiwan. The center passes their blood transfusion service bus to one university in Hsin-Chu City to gather blood donated about every three months. The current assignment involves data collected on a random sample of 748 donors. The data was obtained from theUCI Machine Learning Repository. This data was assembled by Prof. I-Cheng Yeh.

The file"transfusion.csv"contains the data.The file contains 5 variables:

  • recency= The number of months since the last donation. (numeric)
  • frequency= The total number of donations. (numeric)
  • monetary= Total blood donated (in c.c.). (numeric)

Estimating the MSE

Consider the variablemonetary. We assume that the distribution of this variable is Exponential() and are interested in the estimation of the parameter . The proposed estimator is 1/X, whereXis the sample average. In Tasks 7-8 you are required to estimate the value of the parameter and estimate the mean square error (MSE) of the estimator.

You may apply a method calledThe Bootstrapin order to estimate the MSE. The bootstrap method initiates by estimating the parameter . It proceeds with a simulation to compute the MSE, with equal to the value estimated from the provided data.

Estimating the MSE:

7. The estimated value of for the variable "monetary" is:__0.0007__.

Attach the R code for conducting the computation

8. The estimated value of the MSE of the estimator of is:__0__.

Attach the R code for conducting the computation

Doing the task, I encountered values that didn't seem like correct answers, so I need help understanding if I'm moving in the right direction and an explanation which direction is correct and why.

So far I have the following code and results (I explicitly included the values necessary for computation even without access to the data set):

> transf <- read.csv("transfusion.csv")

> sample_mean <- mean(transf$monetary)

> sample_mean

[1] 1378.676

> lam <- 1/sample_mean

> lam.hat <- rep(0, 10^5)

> for (i in 1:10^5)

+ {

+X <- rexp(748, lam)

+lam.hat[i] <- 1/mean(X)

+ }

> mean(lam.hat)

[1] 0.0007262195

>

> bias <- mean(lam.hat) - lam

> bias

[1] 8.861472e-07

> mse <- var(lam.hat) + bias^2

> mse

[1] 7.156675e-10

The values seem to be very small to the point I can write 0 for the MSE. I wonder if I picked a correct sample size for simulating the Exponential distribution (I based it on the sample size that the original data set had).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

EnVision Algebra 1

Authors: Al Cuoco, Christine D. Thomas, Danielle Kennedy, Eric Milou, Rose Mary Zbiek

Student Edition

0328931578, 978-0328931576

More Books

Students also viewed these Mathematics questions