Question

Perform Monte-Carlo estimation where theta = E(e^U) where U is a continuous uniform random variable between...

Perform Monte-Carlo estimation where theta = E(e^U) where U is a continuous uniform random variable between zero and one a. Estimate !using 1000 data points and obtain a 95% confidence interval for this case. b. Perform part a) 100 times. Check how often the true !actually does fall within the 100 resulting confidence intervals. Please solve in R.

Homework Answers

Answer #1

(a) We use 1000 data points from U[0,1] and estimated theta. The R-codes are given below:

U=runif(1000,0,1)
mean(exp(U))

and the output is:

[1] 1.724483.

To calculate the 95% confidence interval we use the function CI() and we need the package Rmisc.

R-codes are given below:

install.packages("Rmisc")
library(Rmisc)
CI(x, ci = 0.95)

and the output is:

upper mean lower
1.720706 1.717510 1.714314

(b) We now perform the process(a) to get 100 estimates for theta as:

x=replicate(100,mean(exp(runif(1000,0,1))));x

The histogram of x is:

Now to calculate the percentage of estimated values of theta falls in the 95%confidence interval, we use the codes:

length(which(x>1.714314&x<1.720706))

and the output is : 18.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old...
READ THE CASE STUDY AND ANSWER THE FOLLOWING QUESTIONS 2nd CASE: An Unexplained Death A 65-year-old man of Scandinavian descent was rushed to the Emergency Room of your local hospital after a family member discovered him unconscious in his home. The woman who dialed “911” told the dispatcher that the man, her brother, was the local librarian of the past 10 years and had no spouse or children. She reported that they had spoken the day before, and he had...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT