September 27, 2005

 

Documentation for Two-sample Independent t Test

 

Minn M. Soe, MD, MPH, MCTM : msoe@sph.emory.edu

Kevin M. Sullivan, PhD, MPH, MHA: cdckms@sph.emory.edu

 

This analysis is conducted to observe whether there is a significant difference in means between two independent samples, given respective standard deviation or standard error. The data input screen is as follows:

 

 

 

 

            The input values requested are:

·         Two-sided confidence intervals (%) that can be chosen are between 0 and 100.

·         Enter individual sample means.

·         Enter standard deviation (or) standard error of individual sample mean.

 

 

 

The result of the calculation is shown next:

 

 

The interpretation of the test is that there is no significant difference between the means of these two groups. It is noteworthy that before interpreting as above, F test for the equality of variances from these two independent, normally distributed samples should be first checked. If the two variances are not significantly different, ie. p-value of test for equality of variance is >0.05, the result of difference in means should be interpreted from t statistics and p-value based on equal variance. In the example above, the two variances are significantly different, ie. p-value of F test is 0.004, and therefore, the p-value of difference in means is 0.2424.

 

In addition, the confidence interval of difference in means is also displayed.

             

 

 

The formulae for two-sample t test are as follows:

All statistics are derived from formulae of the text 'Fundamentals of Biostatistics' (5th edition) by Bernard Rosner;  For two-sample t test with equal variance, statistics were based on equation 8.11 to 8.13;    If assuming unequal variance, statistics were based on equation 8.21 to 8.23.

 

 

·        Two-sample t test with equal variance:


S = pooled estimate of the variance.

= degree of freedom

 

 

·        Two-sample t test with unequal variance:

Satterthwaite’s method (see also Welch's modified t test)

 

 

= approximate degree of freedom.

Standard error=Standard deviation/√n

 

 

·        Hartley's f test for equal variance: 

 

 S2= the larger of two variances;

  S2S = the smaller of two variances

 

Note: test for equality of variance is based on equation 8.15-8.16.

 

 

Reference:

·        Bernard Rosner. Fundamentals of Biostatistics (5th edition).

·        Welch, B. L. (1938). The significance of the difference between two means when the population variances are unequal. Biometrika 29, 350-362.

·        Statterthwaite, F. E. (1946). An approximate distribution of estimates of variance components. Biometrics Bulletin 2, 110-114.

 

 

Acknowledgement:

Default values were obtained from example 8.18 (pg. 297-8) described in 'Fundamentals of Biostatistics' (5th edition) by Bernard Rosner.