联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp2

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2022-03-04 01:39

QUEEN MARY, UNIVERSITY OF LONDON

MTH6991/MTH791U/MTH791P

Computational Statistics with R

Exercise Sheet 4 Spring 2022

Question 1 is due to be handed in for assessment along with two questions from the previous

exercise sheet. The link for submission will be in the week 6 section on QMPlus. The deadline

is 1pm on Thursday the 3rd March. Please include an R script file with the R code used, and

a separate file with all answers asked for (you can submit more than one file).

Late submissions will receive zero marks.

1. (Problem for handing in) 50 marks

This question uses a dataset on QMPlus. There is a different dataset for each student,

which can be found via the link “Exercise 4 datasets” in the week 5 section. For each

student, there should be a file called “exercise4 XYZ.txt”, where XYZ is your ID number

(you need to be logged in to QMPlus). If you cannot see a file, please send me an email.

The dataset contains one column, called Please don't copy and paste the code, type it in yourself. You will learn it better that way.

3. Using R, draw a histogram with the data from question (2), with the same intervals,

and check that the probability density function estimate is the same as you calculated

by hand.

4. For a general kernel function K (which is by definition a pdf), if σ > 0 is the standard

deviation of this pdf, then we can define the rescaled kernel K? by K?

(x) = σK(σx).

Show that K?

is a pdf, and that it has standard deviation 1.

5. Using the same data as question 2, without using R, calculate the kernel density estimate

?fn,h(y) using the rectangular kernel, and with bandwidth h = 1, for the values of

y = 0, 1, 3 and 4.

6. In R, simulate a sample of size 1000 from an exponential distribution with parameter 1,

which can be done with the command Please don't copy and paste the code, type it in yourself. You will learn it better that way.

Please don't copy and paste the code, type it in yourself. You will learn it better that way.

Please don't copy and paste the code, type it in yourself. You will learn it better that way.


相关文章

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp