Where x ¯ {\displaystyle {\bar {x}}} and y ¯ {\displaystyle {\bar {y}}} are the two means and σ x ¯ {\displaystyle \sigma _{\bar {x}}} and σ y ¯ {\displaystyle \sigma _{\bar {y}}} are their standard errors:
z = x ¯ − y ¯ σ x ¯ 2 + σ x ¯ 2 {\displaystyle z={\frac {{\bar {x}}-{\bar {y}}}{\sqrt {\sigma _{\bar {x}}^{2}+\sigma _{\bar {x}}^{2}}}}} ,
where p = 2 ( 1 − Φ ( | z | ) ) {\displaystyle p=2(1-\Phi (|z|))} .