首页 > > 详细

辅导R编程、R语言讲解留学生、Statistics and Computing设计辅导留学生

STAT 2150 Statistics and Computing
Winter Term 2018
Assignment 3
Due on Tuesday, 13th March at 11:59 PM
Instructions:
1. Assignments must be submitted to UM Learn Dropbox before 11.59 PM on due date.
2. You must submit one pdf le which includes answers to the questions and R code written by
you.
3. Make sure that your plots and graphs are properly labeled.
4. You must comment on any results obtained from R whenever ask to do so.
5. Prepare your answers in a word document. Include properly commented R code at the bottom
of the document as an appendix. Finally, save the document as a pdf le in order to submit
to UM Learn Dropbox.
6. How to Submit on UM Learn Dropbox:
1. Click on the \Assignments" button on the \Assessments" tab in UM Learn.
2. Click on Assignment 1 under Folder.
3. Click on \Add a File" under Submit Files.
4. Select the pdf le (that you want to submit) from your computer and click Open.
5. After uploading the pdf le, you must click Submit to complete the submission.
6. You should see the submission con rmation page with notice that you have been sent a
con rmation of submission email. You can also ensure your submission was successful
by going to Assignments in the Assessments tab and by clicking on \View History". If
you do not see the con rmation page, a con rmation email in your UM Learn linked
email account, You haven’t submitted the assignment correctly.
7. An advice: Start to work on the assignment questions early and give yourself enough time to
complete it properly as you will require more time to do R coding.
1
1. Let X1;:::;Xn be a random sample from Bernoulli( ).
(a) Write a R function to compute the likelihood of the data. Your function should have
arguments for the data and and must return the likelihood for given data and .
(b) Consider an observed sample of data
(1;0;1;0;0;1;1;0;0;0;1;0;1;1;1;1;0;1;1;1;1;0;1;0;1;0;0;1;1;1). Plot the likelihood
of data as a function of .
(c) Compute the maximum likelihood and the method of moments estimates of using the
data given in (b).
2. Let X1;:::;Xn be a random sample from Poisson( ).
(a) Generate 1000 random samples of size n = 100 from Poisson( = 1) distribution.
(b) For each sample in (a), compute MME and MLE estimates for and graph the results.
(c) Compute the variance of the estimators by computing the sample variance of the 1000
estimates.
3. Let X1;:::;Xn be a random sample from N( ; 2): Consider the following estimators of 2.
T1 = S2 =
Pn
i=1(Xi X)2n 1 ; T2 = n 1n S2; T3 = n 1n+1S2.
It can be shown that (n 1)S2= 2 2n 1 so
MSE(T1) = 2 4n 1
MSE(T2) = 4n2 (2n 1)
MSE(T3) = (n 1n+1)2 2 4n 1 + 4(n 1n+1 1)2.
(a) Compare the estimators by graphing MSE as a function of 2 for n = 5.
(b) Repeat (a) for n = 10 and n = 30 and comment on the results.

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

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