Let $x_1, x_2, \ldots, x_{n_1}$ and $y_1, y_2, \ldots, y_{n_2}$ are two independent random samples from normal population with same variance. To test the hypothesis, the t-test is given by : [Here $\mu_1$ and $\mu_2$ are means of two samples].
Show Hint
In hypothesis testing, the numerator is always (Observed Value - Expected Value). Since we are testing the difference between two groups, we look for the subtraction sign between the means.