The equation for this test is the following (that's how it is stated in most texts). I got a proof that it indeed has a t-distribution:


However, I've also seen it in the following form:


How can we prove that also the second test has a t-distribution? Why some books describe the test with the second equation?


2 Answers 2


Under the usual null hypothesis, $H_0: \mu_x = \mu_y$, so the equations are identical.

  • 1
    $\begingroup$ So it works like: we take the first formula, assume the means are identical in both populations and see what's the probability of them being equal based on the distribution of T (second equation)? If the probablity is very low, we deduce that it's not very likely the means are equal. $\endgroup$ Commented Aug 13, 2015 at 16:39
  • $\begingroup$ yes. that is basically it. $\endgroup$
    – mandata
    Commented Aug 13, 2015 at 17:06
  • $\begingroup$ @user4205580 & mandata Without context it's hard to say, but my guess is the first formula is meant to test the null hypothesis $E(X) - E(Y) = \mu_X - \mu_Y$. Still, in both cases the statistic is t-distributed under the null hypothesis. $\endgroup$
    – A. Donda
    Commented Aug 13, 2015 at 18:18
  • $\begingroup$ This is not correct. The first equation works whether $\mu_z=\mu_y$ under the null hypothesis or not. $\endgroup$
    – Dave
    Commented Jun 6, 2023 at 0:48

To supplement the answer by @mandata, the first "version" could be useful if you want to test for an "effect size" greater than some pre-determined value, say $\Delta$. In this case, the null hypothesis

$$H_0: \mu_x - \mu_y = \Delta$$ could be tested against the alternative hypothesis $$H_1: \mu_x - \mu_y > \Delta.$$

In this setting, the distinction between the two test statistics becomes important.

  • $\begingroup$ It doesn’t even have to be for one-dozen testing. The first equation works for a two sided test. $\endgroup$
    – Dave
    Commented Jun 6, 2023 at 0:49
  • $\begingroup$ @Dave I'm unsure what you're trying to say. My answer wasn't meant to imply a difference between one-sided and two-sided testing. My point is simply that the first equation is more general than the second. To do a test like this (or a two-sided version, if you prefer), the second test statistic in the OP is not general enough. $\endgroup$
    – knrumsey
    Commented Jun 6, 2023 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.