Where \(\bar{x} \) and \(\bar{y} \) are the two means and \(s_x\) and \(s_y\) are their Standard Deviations (see Statistics), the test statistic is:
\[\begin{align} t=\frac{\bar{x}-\bar{y}}{\sqrt{s^2_\bar{x} + s^2_\bar{y}}} \end{align},\]
where:
\(p = 2\Pr(t_v \ge |t|),\)
\(s^2_\bar{i} = \frac{s^2_i}{n_i},\)
\(i = x, y\)
\(v = \frac{(s^2_\bar{x} +s^2_\bar{y})^2}{\frac{(s^2_\bar{x})^2}{n_x-1}+\frac{s^2_\bar{y})^2}{n_y-1} }\)
\(n_i \) is the sample size.