The test statistic is:
\[\begin{align} z = \frac{\bar{x} - \bar{y}}{\sqrt{\frac{\sigma^2_x}{m} + \frac{\sigma^2_y}{n}}}\end{align}\]
where:
\(\bar{x} \) and \(\bar{y} \) are the average values of variables \(x\) and \(y\) respectively, where each of these variables represents the data from two independent groups,
the groups have sample sizes of \(m\) and \(n\) respectively,
\(\sigma^2_x\) and \(\sigma^2_y\) are the variances in the two groups,
\(p = 2(1-\Phi(|z|))\).