Assuming that you have to calculate the test statistic for the difference between the population means, μ₁, μ₂. To calculate the statistic you have to subtract the population parameter from the point estimate and divide it by the standard deviation.
The population parameter is (μ₁ - μ₂)
The point estimator is (x-bar₁ - x-bar₂)
The standard deviation is [(S₁/√n₁) +(S₂/√n₂)]
Let's say, for example, that the test is two-tailed, then:

The test statistic can be calculated as:
![\frac{(\bar{x}_1-\bar{x_2})-(\mu_1-\mu_2)}{(\frac{S_1}{\sqrt[]{n_1}}+\frac{S_2}{\sqrt[]{n_1}})}](https://img.qammunity.org/2023/formulas/mathematics/college/78i9bsydxmyk72zvgfqdryw5g06tf2xjii.png)
n₁= 50
x-bar₁= 2.31
S₁= 0.89
n₂=30
x-bar₂= 2.02
S₂= 0.61
For the difference between the population means you have to use the value under the null hypothesis, in this case, μ₁ - μ₂ = 0
![\frac{(2.31-2.02)-0}{(\frac{0.89}{\sqrt[]{50}}+\frac{0.61}{\sqrt[]{30}})}=(0.29)/(0.237)=1.22](https://img.qammunity.org/2023/formulas/mathematics/college/2fxzmau4sohpy388ncsotqkkwq6f3j5zgt.png)
The value of the statistic is 1.22