PLEASE USE R CODE. Let
X1,X2, …
,X8 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
H0:μ=20 against the alternative
Ha:μ>20. Our test statistic will be
T = (xbar – 20) / (s/(sqrt(8))). 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
using R code?
c) If we test at the 1% level then what is the critical value
using R code?
d) What is the p-value based upon our sample using R
code?
f) If we repeat a 1% level test 300 times then about how many
times do we expect to commit a type(I) error using R
code?