Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. The beta distribution is a flexible distribution for continuous data that are between 0 and 1. Take a look at the beta distribution on
3. The beta distribution is a flexible distribution for continuous data that are between 0 and 1. Take a look at the beta distribution on wikipedia to familiarize yourself with it. a. Using the "rbeta" command in R, simulate 200 random variables, each with distribution x; ~ Beta(2,5)where the "shape1" parameter is 2 and the "shape?" parameter is 5. Plot a histogram of your simulated data. b. Use "optim" in R to numerically find the MLEs of both shape parameters using the data you simulated. Show all code used, and clearly show your estimate. c. Now repeat (a) and (b) 100 times. That is, simulate 200 random variables, run optim using those 200 random variables, and save the MLEs for "shape1" and "shape?", then do this over and over again 100 times. Plot a histogram of your MLEs for "shape1", and another histogram of your 200 MLEs for "shape?"
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started