MTH6991/MTH791U/MTH791P Computational Statistics with R

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

Computational Statistics with R
Exercise Sheet 3 Spring 2023
The questions in the first section are due to be handed in for assessment along with those in
the first section from the next exercise sheet. The link for submission will be in the week 6
section on QMPlus. The deadline is 13:00 on Thursday the 2nd March, late submissions
will receive zero marks.
Problems for handing in
1. (50 marks)
This question uses a dataset on QMPlus, which is not the same as the dataset for the first
two exercise sheets. For each student, there should be a file called “exercise3 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.
Hand in: an R script with all the R code used, plus a separate file with your solutions
– write the solutions (briefly) in your own words rather than copying and pasting any
console output from R.
The dataset contains two columns, labelled “before” and “after”. Assume these are the
test marks for each student in a class before and after some extra teaching sessions. We
want to find out if there is a difference between the marks for each student, without
assuming the data are normally distributed.
(a) Which type of data is this Motivate your answer, also explaining the main dif_xfffe_ferences between (two-sample) independent data and (one-sample) matched pair
data.
(b) For this part, do the calculations by hand (and calculator). Using only the first
three rows of the dataset, calculate the test statistic for the permutation test, which
is the sum of the differences between the marks. Then find the null distribution
for the permutation test of whether the before and after marks have the same
distribution. Finally, calculate the p-value considering the alternative hypothesis
of having different distributions.
(c) For this part, use the whole dataset. Use Please don’t copy and paste the code, type it in yourself. You will learn it better that way.
Additional problems
2) For this part, use the first six rows in the question 1. dataset. By hand, calculate
the Wilcoxon signed-rank statistic W+ based on the differences between the before and
after marks. Hence, using the 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.

发表评论

了解 KJESSAY历史案例 的更多信息

立即订阅以继续阅读并访问完整档案。

继续阅读