**PLEASE USE R CODE.** Let

*X*_{1},*X*_{2}, …

,*X*_{8} 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

*H*_{0}:*Î¼*=20 against the alternative

*H*_{a}:*Î¼*>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**?