Stat5601Midterm2_10_31_10_Solved

# Stat5601Midterm2_10_31_10_Solved - Midterm 2 STAT 5601 Fall...

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
This is the end of the preview. Sign up to access the rest of the 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 t-test , 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

{[ snackBarMessage ]}

### Page1 / 5

Stat5601Midterm2_10_31_10_Solved - Midterm 2 STAT 5601 Fall...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online