PLEASE USE R CODE. We wish to compare the
expected values, μx and μy
of two independent normal populations, say X and Y, with known
standard deviations μx = 1.1 and
μy = 1.3 . We take a random sample of size 12
from X (X1,X2, …
,X12) and a random sample of size 9 from Y
(Y1,Y2, …
,Y9) as follows:
X: 3.84, 6.18, 5.85, 5.82, 3.66, 3.83, 4.09, 7.25, 5.69, 3.99,
6.17, 5.36
Y: 5.34, 6.43, 5.61, 5.17, 6.93, 3.37, 6.06, 4.15, 5.83
We are interested in examining μx –
μy. Call the sample means of X and Y, Xbar and
Ybar respectively(xbar and ybar realized values). Assume that all
distributions are normal. Use R for
computations.
a) What is the critical value used for a 95% confidence interval
for μx –
μy? (using R
code)
b) Create a 95% confidence interval for μx –
μy. (using R code)
c) What is the length of your 95% confidence interval for
μx –
μy? (using R
code)
d) What would the p value have been if we used this data to test
H0:μx –
μy=0
against the alternative Ha:μx –
μy > 0? (using R
code)
e) Calculate the variance of Xbar (using R
code)
f) Calculate the variance of Ybar. (using R
code)
g) Calculate the variance of Xbar –
Ybar. (using R code)