[R] Question about interpretation of paired t-tests

Greg Snow Greg.Snow at imail.org
Mon Feb 1 19:33:56 CET 2010


I appears that you have the logic backwards.  P-values less than alpha (0.05 in your example) mean that you can reject the null hypothesis that the true mean difference is 0.

Also, for the 2 sided test you either compare the 1-tail p-value to alpha/2 or double the 1-tail p-value (what R does if you specify 2 tails) and compare that to alpha.  It looks like you are comparing 2*p-value to alpha/2 which is over correcting (doing a 4-tailed test, hmm, need to think of an example where that makes sense).

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Beat Meier
> Sent: Monday, February 01, 2010 2:37 AM
> To: r-help at r-project.org
> Subject: [R] Question about interpretation of paired t-tests
> 
> hi there,
> 
> i have a few questions about the correct interpretation of a paired t-
> test.
> (i don't think that this matters, but I'm using R 2.10.1 on Windows).
> 
> to my questions:
> 
> i've been using a lot of time about this minor concerns now and I hope
> you can help me...
> 
> I use one- and two-sided t-tests. My questons are on one side about how
> R uses the hypothesis' and the second one is about p-vaues. First the
> one-sided:
> 
>  > t.test(var1,var2,paired=T,alternative="g")
> 
>          Paired t-test
> 
> data:  var1 and var2
> t = 4.3456, df = 50, p-value = 3.401e-05
> alternative hypothesis: true difference in means is greater than 0
> 95 percent confidence interval:
>   0.00825842        Inf
> sample estimates:
> mean of the differences
>               0.01344257
> 
> This tests (H0-Hypothesis), whether the difference in means is smaller
> or equal to 0? Here, the p-value is smaller than 0.05, which should
> mean
> that at a level of 95% one can't reject the H0-hypothesis? there is no
> strong evidence for rejecting the hypothesis, that the difference in
> means is smaller or equal to 0?
> (Question is, if I write "alternative="g"", if this defines my
> alternative hypothesis (difference in means > 0) which I couldn't
> reject
> if the p-value was >0.05?)
> 
> The two-sided:
>  > t.test(var1,var2,paired=T,alternative="t")
> 
>          Paired t-test
> 
> data:  var1 and var2
> t = 4.3456, df = 50, p-value = 6.801e-05
> alternative hypothesis: true difference in means is not equal to 0
> 95 percent confidence interval:
>   0.007229405 0.019655737
> sample estimates:
> mean of the differences
>               0.01344257
> 
> This tests, whether the difference in means is 0. p-value is smaller
> than 0.025 (alpha/2) at a level of 95%, so the hypothesis that the
> difference in means is 0 can't be rejected?
> 
> 
> Thanks a lot,
> B. Meier
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list