Skip to content

Is there t.test with null hypothesis?

4 messages · Rick Bilonick, Michael Dewey, Matti Viljamaa

#
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?
#
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:

 > ?t.test

you can see the help information for the t.test function.

RIck
On 09/08/2016 08:06 AM, Matti Viljamaa wrote:
#
Dear Matti
On 08/09/2016 13:06, Matti Viljamaa wrote:
That is two statements not one. Do you mean that your null is that the 
difference is 1? If so just subtract 1 from all the scores in the group 
which is predicted to be higher and run the t-test on the resulting scores.
It means that the null is that the difference is zero.

  
    
  
#
Sorry typo, should of course be:

?the means are the same?/?difference in means is equal to zero?

so they are synonymous.