联系方式

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

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

日期:2019-04-05 10:17

Stat261 - Spring 2019

Assignment #5 - due Friday, April 5, 2019 in lab

When performing hypothesis test, you must follow the same steps as in

Assignment #4.

The files: Stat261-Assign5-R-2019.pdf and StudentPerformanceData.pdf are required to complete this

assignment. The Stat261-Assign5-R-2019.Rmd contains the code that generated Stat261-Assign5-R-

2019.pdf. Section numbers in the assignment questions refer to the sections in Stat261-Assign5-R-

2019.pdf.

We will use the variables G2, sex, and Walc in this data set. Look up the definitions of these

variables in the file StudentPerformanceData.pdf.

1. Using the information (summary and graphs) in Section 1.1, comment on the variables G2,

sex, and Walc.

2. Section 1.2 contains an analysis of the first 10 grade observations.

(a) Comment on the distribution of these 10 observations given Figures 3 and 4.

(b) What is a 95% confidence interval for the mean based on the 10 observations? How do

you interpret this interval?

(c) Using the 10 observations, perform a test of the hypothesis that the mean grade is 12.

Include a concluding sentence which could be incorporated into a report about this data

to your boss. Hint: the required computed quantities are given in this section.

3. We are interested in comparing the second period grades for boys and girls in Section 1.3.

(a) Comment on Figure 5.

(b) Assuming that the variances for the boys and girls are equal, perform a test of the hypothesis

that the mean grade for boys is the same as the mean grade for girls. Include

a concluding sentence which could be incorporated into a report about this data to your

boss.

(c) Without assuming that the variances for the boys and girls are equal, perform a test of the

hypothesis that the mean grade for boys is the same as the mean grade for girls. Include

a concluding sentence which could be incorporated into a report about this data to your

boss.

(d) Were your conclusions for the two tests above the same? Why do you suppose that is?

4. In Section 1.4, we are interested in whether there is a relationship between student grades and

Walc, weekend alcohol consumption.

(a) Comment on Figure 6 and 7.

(b) The results from fitting a straight line model to the grades as a function of weekend alcohol

consumption are given on page 10. What is the estimated straight line model for this data?

(c) Perform a test of the hypothesis that the slope parameter is zero. Include a concluding

sentence which could be incorporated into a report about this data to your boss.

(d) Figure 8 is a qqplot of the residuals from the straight line model fit. Comment on this

plot.

(e) Figure 10 contains the side-by-side boxplots of the grades by Walc, with the fitted line

drawn on top. Comment on this graph.

BONUS QUESTIONS:

1. (BONUS) Suppose that Y1, Y2, ..., Yn are independent N(α, σ2

). Show that if σ is unknown, the

likelihood ratio statistic for testing H0 : α = α0 is given by: (BONUS) Testing equality of variances. Consider k independent normal samples of sizes

n1, n2, ..., nk. Measurements from sample i have unknown variance

the sample variances computed from the sample data which are estimates of. Since

the measurements are normally distributed, we know that.

Using the above distribution, the log likelihood for σi

is therefore:

(a) Find the joint log likelihood function of σ1, σ2, ..., σk and show that it is maximized for

(b) Show that if σ1 = σ2 = ... = σk = σ, then the MLE of.

(c) Show that the likelihood ratio statistic for testing H0 : σ1 = σ2 = ...= σk = σ is given by D =Xk

i=1(ni 1) ln(s2pooled/s2i).


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

python代写
微信客服:codinghelp