Where \(\bar x_1\) and \(\bar x_2\) are the two means, the test statistic is:
\[\begin{align} z=\frac{\bar x_1-\bar x_2}{s_{{\bar x_1} - {\bar x_2}}} \end{align}\]
where:
\(p \approx 2(1-\Phi(|z|)),\)
\(s_{{\bar x_1} - {\bar x_2}}\) is computed as the Standard Error (see Statistics) of \(d\),
the value for the \(i\)th observation is computed as \(d_i = x_{i1} - x_{i2}\), and
\(x_1\), \(x_2\) are the observed values on the two variables.