首页 > > 详细

Likelihood留学生讲解、HTML file辅导、讲解Java,c/c++编程、Python语言辅导 解析Haskell程序|讲解Data

Lab Assignment 2
Fill in your Name
Fill in the date
Likelihood methods for the Poisson distribution
DO NOT CHANGE the chunk name or the set.seed() values below.
Execute each chunk of code to ensure that your code works properly.
Then HTML knit the entire document.
If you cannot compile all of your code without errors before the end of the class, comment out the
chunks that are not working.
Open the HTML document in a browser.
Save the HTML file as a pdf file.
Submit your pdf assignment.
1. First generate 25 observations from the Poisson(lambda=10) distribution and
save them in a vector.
2. Write a function to compute the Log-likelihood for a vector of values of the
mean lambda given the n observations you generated in question 1. Plot the
log-likelihood for a sequence of values of lambda. Axes must be labelled and the
plot must have a title. Ensure that you choose a sequence of lambda values that
bracket the MLE for lambda.
3. Compute the MLE of lambda using the data from question 1 and the function
you defined in question 2 and the optimize() function.
4. Write a function to compute the log relative likelihood - ln(p), r(lambda) -
ln(p) and graph it for a sequence of lambda values and p=.147.
5. Compute the 14.7% Likelihood Interval as the roots of r(lambda) - ln(.147)
= 0. Show the results.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!