Typical results from a t.test()
(two-sample t-test in this example) look like this.
> t.test(extra~group,data=sleep,var.equal=TRUE)
Two Sample t-test with extra by group
t = -1.8608, df = 18, p-value = 0.07919
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-3.363874 0.203874
sample estimates:
mean in group 1 mean in group 2
0.75 2.33
We would not reject the null hypothesis with these results if \(\alpha=0.05\) was being used (note \(p=0.0792\)>\(\alpha\)). However, some students mistakenly interpret the third line of output as saying that the alternative hypothesis is true (and thus the null hypothesis is rejected). R does NOT make the rejection decision for you. The third line of output is simply a reminder of what you set the alternative hypothesis to in alt=
of t.test()
(note that the default is alt="two.sided"
or “not equals”). You must decide to reject or not to reject the null hypothesis by comparing the p-value reported in the second line of output to the \(\alpha\) that you have chosen to use.