Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

T test: Manually vs. with Stata


From   Jen Zhen <[email protected]>
To   [email protected]
Subject   T test: Manually vs. with Stata
Date   Tue, 29 Mar 2011 14:42:27 +0200

Dear list members,

I have a question that makes me feel very stupid, yet is troubling me:

I would like to compute the T-statistic to test that there is no
difference in variable between groups G1 and G2.
The respective summary statistics are:

G1: Mean1=16.59, SD1=1.05, N1= 330
G2: Mean2=18.82, SD2=1.26, N2=155.

Manually I would use these to compute SE1=SD1/sqrt(N1)=0.057800598,
SE2=SD2/sqrt(N2)=0.101205635, SE_pooled=sqrt(SE1^2+SE2^2)=0.116548229,
and then T=(Mean1-Mean2)/SE_pooled=-19.13370984.

However, when I use Stata's -ttest-, I get T=20.4468. I suspect that
Stata is correct on this and that it does some degrees of freedom
correction, which I'm missing when doing this manually, but I'm not
sure where I'm going astray. Would anyone happen to know?

Thanks a lot,
JZ
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index