I've noticed that the formula for the t-statistic takes on a number of forms depending on the nature of the test being performed, i.e.,:

  • one sample
  • independent samples (equal variances)
  • independent samples (unequal variances)
  • paired samples

This doesn't bode well for me given that I have such a bad memory.

So instead, I need a super-formula from which I can yield all of the different forms - one general formula is easier to remember than four case-specific ones. Luckily (or incorrectly), I think I've noticed a common theme between all the forms which can be expressed thus:

$$\frac{ \bar{X} - \bar{Y} }{ \delta (\bar{X} - \bar{Y})}$$

where $X$ is a sample of randomly selected continuous data, and $\bar{Y}$ could be anything from:

  • a reference value like $\mu_0$ with no associated uncertainty
  • the mean of an independent sample (with an equal/unequal variances to that of $X$)
  • the mean of a paired sample like $X^\prime$

and $\delta (\bar{X} - \bar{Y})$ is the error on the difference of the means.

For example, when comparing $\bar{X}$ with a reference mean, $\mu_0$, the error on the mean would be $s_X/\sqrt{n_X}$. When comparing with an independent sample, the two errors would be added in quadrature:

$$\delta({\bar{X} - \bar{Y})} = \sqrt{ \Bigg( \frac{s_X}{\sqrt{n_X}} \Bigg)^2 + \Bigg(\frac{s_Y}{\sqrt{n_Y}} \Bigg)^2 }$$

Whatever the nature of the the test (paired, independent, etc.), the denominator can be re-expressed by following the rules of error propagation (thus rendering the necessity to remember equations obsolete!).

Essentially, the t-statistic quantifies how many standard errors separate two means, much like how a z-score quantifies how many standard deviations a value falls from the true mean of a population.

So my question is: is the following a valid way of expressing the t-statistic?

$$\frac{ \bar{X} - \bar{Y} }{ \delta (\bar{X} - \bar{Y})}$$

  • $\begingroup$ (+1) for the formula. Do you also allow $\bar Y$ to be a sample average plus $\mu_o$? (there are two-sample tests with shifted null). $\endgroup$
    – Michael M
    Jul 27, 2017 at 12:46
  • $\begingroup$ That sounds too advanced for me at this stage - I'm afraid I don't have an answer for you. Right now, I am just looking for validation of my equation - I want to know if I can go ahead and use it for the 4 cases I gave (i.e., not inc. t-tests with a 'shifted null') $\endgroup$
    – Ben
    Jul 27, 2017 at 12:55
  • $\begingroup$ I've done some further research, and come across this general formula for a test statistic: (statistic - parameter) / standard error on the statistic $\endgroup$
    – Ben
    Aug 2, 2017 at 9:36
  • $\begingroup$ The denominator is always the square root of the sampling variance of the numerator: that's the very definition of any t-statistic. The duplicate explains that and provides common examples. $\endgroup$
    – whuber
    Feb 23, 2023 at 17:37