Code:
. swilk lmark4 Shapiro-Wilk W test for normal data Variable | Obs W V z Prob>z -------------+-------------------------------------------------- lmark4 | 23 0.95818 1.094 0.182 0.42766 . ttest lmark4, by( petequia) Two-sample t test with equal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- 0 | 21 8.803805 .0744901 .3413564 8.648421 8.959188 1 | 2 9.171853 .0337019 .0476617 8.74363 9.600076 ---------+-------------------------------------------------------------------- combined | 23 8.835809 .0714076 .3424588 8.687719 8.983899 ---------+-------------------------------------------------------------------- diff | -.3680485 .2466404 -.8809652 .1448683 ------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -1.4922 Ho: diff = 0 degrees of freedom = 21 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0753 Pr(|T| > |t|) = 0.1505 Pr(T > t) = 0.9247 . ttest lmark4, by( petequia) unequal Two-sample t test with unequal variances ------------------------------------------------------------------------------ Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] ---------+-------------------------------------------------------------------- 0 | 21 8.803805 .0744901 .3413564 8.648421 8.959188 1 | 2 9.171853 .0337019 .0476617 8.74363 9.600076 ---------+-------------------------------------------------------------------- combined | 23 8.835809 .0714076 .3424588 8.687719 8.983899 ---------+-------------------------------------------------------------------- diff | -.3680485 .0817593 -.5415563 -.1945407 ------------------------------------------------------------------------------ diff = mean(0) - mean(1) t = -4.5016 Ho: diff = 0 Satterthwaite's degrees of freedom = 15.792 Ha: diff < 0 Ha: diff != 0 Ha: diff > 0 Pr(T < t) = 0.0002 Pr(|T| > |t|) = 0.0004 Pr(T > t) = 0.9998
Gabriel Ferreira
(Stata 10.1 SE)
0 Response to ttest two group mean-comparasion test: How big should be the difference between the variances to considering unequal test?
Post a Comment