Computes the two-sided paired-samples t-test comparing two matched vectors –
the one-sample t-test of the within-pair differences \(d = x - y\):
\(t = \bar{d} / (s_d / \sqrt{n})\) on \(n - 1\) degrees of freedom. The
standard test for before/after or condition-A/condition-B measurements on the
same subjects. Reproduces stats::t.test(x, y, paired = TRUE) and
scipy.stats.ttest_rel bit-for-bit.