Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Let xx, . be a sample of observations from a normal population with unknown mean

ID: 3314138 • Letter: L

Question

Let xx, . be a sample of observations from a normal population with unknown mean and unknown standard deviation . Suppose the sample mean is x and the sample standard deviation is s. We wish to test the null hypothesis Ho:-20 against the alternative Ha:>20. Our test statistic will be T = . Our sample yields x = 22.25 and s = 1.91. Answer the following using R code. a)If xbar 22.25 and s = 1.91 then what is the value of T? b) T has a t distribution. How many degrees of freedom does this distribution have? 0 7 c) If we test at the 1% level then what is the critical value? d) What is the p-value based upon our sample? e) Do we reject the null hypothesis at the 1% level ?(Y/N)? O N f) If we repeat a 1% level test 300 times then about how many times do we expect to commit a type(1) error? g) Copy your R script for the above into the text box here.

Explanation / Answer

a)> t.test.fromSummaryStats <- function(mu,n,s) {
+ -diff(mu) / sqrt( sum( s^2/n ) )
+ }
> mu <- c(22.25,20)
> n <- 8
> s <- 1.91
> t <- t.test.fromSummaryStats(mu,n,s)
> t

[1] 3.331917

b) df= N-1 =7

c) #Critical value(one tail)

> crit <- qt(0.99,df=7)
> crit
[1] 2.997952

d) #P-value one tail
>p <- pt(-abs(t),df=n-1)
>p

[1] 0.006279012

e) Yes we reject null hypothesis at 0.01 significant level.

f)1% error mean, 1 per 100 or 0.01 times

Expecting to commit type 1 error=300*0.01= 3

g)