Question

R1. It is easy to show the MME for a Poisson distribution is λ = X. Our goal in this problem is to realize that λ is itself a RV. This is because different samples will give rise to different values for X, and hence λ. If something is a RV, it should have a distribution showing the different possible values and how likely they are. This is known as a sampling distribution if you are modeling a statistic or estimator. Write a single line of code in R that finds the average of a random sample of size 40 from the Poisson distribution with λ = 1.81 (this is the value we are estimating and usually it is not known!). In R, the Poisson distribution is called pois, so you can type ?dpois at the prompt to learn about the d-p-g-r quartet R2. In RI, we found one value of λ based on one sample. Now we would like to repeat this process many times and get lots of values for X. Use the internet to learn about the replicate function in R, and then use this to find 10.000 values for λ (based on 10,000 different random samples). Your answer should be a single line of code and store your values in a variable called lambdahats

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

R1.

The code to find the average of a random sample of size 40 from the Poisson distribution with \lambda = 1.81 is,

mean(rpois(n = 40, lambda = 1.81))

R2.

Use the below command in R to find 10,000 values for \hat{\lambda}

lambdahats = replicate(10000, mean(rpois(n = 40, lambda = 1.81)))

Add a comment
Know the answer?
Add Answer to:
R1. It is easy to show the MME for a Poisson distribution is λ = X....
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
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