This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Midterm 2 STAT 5601 Fall 2010 This paper contains 40 points. Show the details of your calculations for full credit. Name: SID: In the following, interpret the questions in terms of R commands. 1. State in 1 short paragraph what the following function does. [8 points] TestOutputs=function(X, NHV,AH,CI.Level){ TTest.Data=t.test(X, mu=NHV,alternative=AH,conf.level=CI.Level) T.O=TTest.Data$statistic SR.O=wilcox.test(X, mu=NHV,alternative=AH)$statistic Sign.O=sum(X>NHV) return(list(T=T.O, SR=SR.O, S=Sign.O)) } Answer: This is a R function. It takes in the data as X , and a constant as NHV , the nature of the alternative hypothesis is speci 1 fied in AH , and the desired level of confidence for the interval esti mate is given in CI.Level . The test statistics from the ttest , the wilcoxon signed rank test and the sign test are computed, and returned as a list. 2. Now consider the following lines of R code. Describe in 1 sentence for each item what the relevant bit of R code is implementing.code is implementing....
View Full
Document
 Fall '06
 Staff
 Statistics

Click to edit the document details