[R] t-statistic for independent samples

peter dalgaard pdalgd at gmail.com
Thu Apr 18 11:14:13 CEST 2013


On Apr 18, 2013, at 05:35 , Thomas Lumley wrote:

> I just looked more carefully at your code.
> 
> You are computing the unequal-variance (Welch) version of the t-test, so
> that's why there isn't a problem.  Compare it with the equal-variance
> t-test, using the pooled variance estimate, which does have a problem, as
> below
> 
>    -thomas

In principle, there should be a problem because the DF are being computed from the equal-variance formula. However, with the values on the web page, the adjusted DF from the Welch test come out as 18.54 intead of 19, which is not likely to be discernible.

It should be more apparent if you put the larger variance in the smaller group. (I get DF=6.98) for that case.

(Thomas' example also switches the variances, it seems.)

-- 
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list