I'm trying to do a hypothesis test and I've been told that my alternative hypothesis is that male students are older on average than female students in this particular survey. I've set it up as follows:
H(alternative): u1 > u2 H(null): u1 < u2
my n1 = 24, n2 = 32
s1 = 3.27042
s2 = 1.840133
sample mean 1 = 21.5
sample mean 2 = 20.03125
My variances are also unequal so I am using this test:

my S^2 spooled I found was 6.499 (3dp)
so when I came to finding t-statistic I did the following:
t = (21.5 - 20.03125) / sqrt((6.499/24) + (6.499/32))
and got a t value of 2.13359
however in R I am getting a t-value of 1.9778. Is this just a rounding error on my end or have I done something wrong in my calculations?
Hint:
The hypotheses are
$H_0:U_1 = U_2$
and $H_a: U_1 > U_2$
I a two sample t-test, you are assuming the U_1-U_2 = 0 and the formula in the numerator is just $(\bar X_1 - \bar X_2) - (U_1-U_2)$ and the later is zero according to your hypothesis. U_1 and U_2 are the population means and you don't need them.
An example of this is as follows. Male Height: $$\bar X_1 = 564.9, n_1 = 10, s_1^2 = 21544.76667$$
Female Height: $$\bar X_2 = 484.5, n_2 = 10, s_2^2 = 17221.16667$$
$s_p^2 = \dfrac{(n_1-1)S_1^2 + (n_2-1)S_2^2}{(n_1 + n_2-2)} = 19382.96667$
Hypothesis $H_0 : \mu_2 = \mu_1$ $H_a : \mu_2 > \mu_1$
Test Statistic:
$$ t = \dfrac{\bar x_2- \bar x_1}{\sqrt{s_p^2/n}} = - 1.82619$$
The test statistic is distributed as Student's t distribution with $(n_1+n_2-2)$ degrees of freedom.
With alpha = .05 and df , find the t-critical. We reject H0 if t > t_critical.
(6) Statistical decision
We reject $H_0$ because t-statistic > t-critical and conclude that the males are on average taller than females.
Something of this sort.
Thanks
Satish