[R] Is there t.test with null hypothesis?
rab45 at pitt.edu
Thu Sep 8 14:39:49 CEST 2016
You need to include the argument "mu=1" (without parentheses). For example:
> t.test(group1,group2, mu=1)
for a two-sample independent groups t-test. If you type:
you can see the help information for the t.test function.
On 09/08/2016 08:06 AM, Matti Viljamaa wrote:
> I’m trying to do a t-test, where the null hypothesis for the two data sets has to be:
> “the means are the same”/“difference in means is equal to one”
> Using the t.test function in R I’m able to see that it uses the following “alternative hypothesis”:
> alternative hypothesis: true difference in means is not equal to 0
> but does not seem to specify null hypothesis. I believe alternative and null hypotheses are different, although
> I don’t exactly know how.
> So what should I use for my t-test? Or is t.test ok?
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.R-project.org%2fposting-guide.html&data=01%7c01%7crab45%40pitt.edu%7c99a5b7c1533548c5ead708d3d7e0bb76%7c9ef9f489e0a04eeb87cc3a526112fd0d%7c1&sdata=eGCmYy70ceyiJ%2bpgDXA8SaHHma%2f4DbxhIbSARUDYwxg%3d
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help