Question

R1. Now that youve seen both MME and MLE, we might begin comparing the two worlds. In class, we studied X Uni (0.0) and showed the MLE is aMLE = max Xi One can show the MME for this setup is θΜΜΕ 2 X. As seen in HW2, these estimators are RVs, and each will have its own (sampling) distribution. The sampling distribution gives a good sense of what types of values youll get from θ when you draw a random sample. Use the internet to learn how to create overlapping histograms in R. Then, on the same set of axes, make a red histogram that shows 10000 values of θΜΜΕ based on 10000 random samples of size 40, Next, overlay a green histogram that shows 10000 values of eMLE based on 10000 new random samples of size 40. Draw from the Unif (0,6) distribution Include your code and a sketch of the overlapping histograms.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

R-code( Debugged with comments included)

#Random numbers
tmme=c()
tmle=c()

#Generating the Method of Moments estimator and Maximum Likelihood Estimator

for (i in 1:10000)
{
s<-runif(40,min = 0,max=6)
tmme[i]=2*mean(s)
tmle[i]=max(s)
}

# Histogram Colored (red and green)

hist(tmme, col="red",main="Overlapping Histogram", xlab="Estimates of theta")
hist(tmle, col="green",xlim=c(0,10),add=T)
legend("topright",c("MLE","MME"),col=c("green","red"),lty=c(1,1))
box()

Overlapping Histogram MLE MME 4 Estimates of theta

Add a comment
Know the answer?
Add Answer to:
R1. Now that you've seen both MME and MLE, we might begin comparing the two worlds....
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • R1. Now that you've seen both MME and MLE, we might begin comparing the two worlds....

    R1. Now that you've seen both MME and MLE, we might begin comparing the two worlds. In class, we studied X Uni (0.0) and showed the MLE is θMLE max Xi. One can show the MME for this set up is all -2 . X. As seen in HW2, these estinators are RVs, and each will have its own (sampling) distribution. The sampling distribution gives a good sense of what types of values you'll get from θ when you draw...

  • R1. Now that you've seen both MME and MLE, we might begin comparing the two worlds....

    R1. Now that you've seen both MME and MLE, we might begin comparing the two worlds. In class, we studied XUnif(0,0) and showed the MLE is OSILE-max Xi. One can show the MME for this setup is OMME -2 X. As seen in HW2, these estimators are RVs, and each will have its own (sampling) distribution. The sampling distribution gives a good sense of what types of values you'll get from θ when you draw a random sample. Use the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT