> x=c(5,3,1,6,4,3,2,4,7)
> y=c(7,4,1,8,5,2,4,7,9)
> mean(x)
[1] 3.888889
> mean(y)
[1] 5.222222
> sd(x)
[1] 1.900292
> sd(y)
[1] 2.728451
> t.test(x,y,var.equal=T)
Two Sample t-test
data: x and y
t = -1.203, df = 16, p-value = 0.2465
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-3.682888 1.016221
sample estimates:
mean of x mean of y
3.888889 5.222222
> t.test(x,y,var.equal=F)
Welch Two Sample t-test
data: x and y
t = -1.203, df = 14.283, p-value = 0.2485
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-3.706056 1.039389
sample estimates:
mean of x mean of y
3.888889 5.222222
>
What conclusion can be made regarding the first t-test in terms of
statistical significance?
Does inequality of variance change that conclusion?
Modify the code for the first t-test to test the alternative hypothesis that ux<uy
What conclusion can be made regarding the first t-test in terms of statistical significance?
since p-value = 0.2465 > 0.05
we fail to reject the null hypothesis , , we conclude that there is not sufficient evidence that there is difference between x and y.
Does inequality of variance change that conclusion?
No, because still p-value = 0.2485 > 0.05
Modify the code for the first t-test to test the alternative hypothesis that ux<uy
t.test(x,y ,alternative="less", var.equal=TRUE)
Get Answers For Free
Most questions answered within 1 hours.