t-statistics for testing sample difference

34 Views Asked by At

Say in the whole sample, there are males and females. And I want to test the difference of mean salary of male and female. So I calculate the t-statistics which is 4. Then if I divide them randomly to 5 groups, for each group can I calculate the similar t-statistics?

For what I did, the whole sample t-statistics is $t=\frac{\bar{m}-\bar{w}}{S_w}\sqrt{\frac{mw}{m+w}}$, where $m,n$ are the number of males and females respectively and $S_w^2=\frac{(m-1)S_m^2+(w-1)S_w^2}{m+w-2}$. So I proceed to calculate the sample t-statistics, but felt like $S_w^2(\text{sample})$ cannot be calculated?