# Should the t-statistic (not data) be normally distributed for using the t-test?

Reading the introduction of English Wikipedia's article about the t-test, I was confused by this statement:

It is most commonly applied when the test statistic would follow a normal distribution

To this point I was sure that the key assumption for using t-test is that the data itself needs to be distributed normally (at least approximately). But here it's stated that the test statistic should follow a normal distribution. What am I missing?

I understand that Wikipedia is not the most reliable source of information, but nevertheless I want to somehow interpret and double-check what I've read. Any help would be appreciated!

Quoting (the complete sentence) from Wikipedia

It is most commonly applied when the test statistic would follow a normal distribution if the value of a scaling term in the test statistic were known (typically, the scaling term is unknown and therefore a nuisance parameter).

This sentence is true. Indeed, as stated in Dave's answer, the $$t$$-statistic follows Student's $$t$$ when the population variance is unknown. However, when the latter is known and you use it in place of the sample variance, the implied statistic is actually a $$z$$ statistic, i.e. it has distribution $$N(0,1)$$.

On the other hand, if the data do not come from the normal distribution and if the true distribution is not too wired, the $$t$$-test is still useful; see this answer by Stephan Kolassa.

• Thank you for your answer! So, if the variance is known, then the test statistic becomes z-statistic and is normally distributed. Else, it's t-distributed. Have I got this correctly? Also, does T-test boil down to Z-test in the first case? I think what confused me in the quote is 'most commonly applied when X'. I interpreted it as 'it's needed that X', in a mathematical way. Commented Dec 29, 2022 at 9:25
• Hi! if the variance is known, then the test statistic becomes z-statistic and is normally distributed. no not really. The $t$ statistic will always have $t$ distribution when the data are normal. The point is that if you know $\sigma^2$, you don't have nuisance parameters so there is no need to use the $t$ statistic since the z statistic $\frac{\sqrt{n}(\bar X-\mu)}{\sigma}$ has (known) distribution $N(0,1)$. So Also, does T-test boil down to Z-test in the first case the answer is no. They can both be applied but the t-test here would lead to wider CI intervals. Commented Dec 29, 2022 at 12:14

The $$t$$-statistic should be $$t$$- distributed.

This is guaranteed by math when the data are $$iid$$ normal, which is the legendary normality assumption. However, the t-stats often have close to the correct distribution, especially in large sample sizes, even when the data violate the normality assumption. That is, the usual t-test is fairly robust to violations of the normality assumption, and it is not so ridiculous to t-test data that clearly did not come from normal distributions (though there may be even better approaches).

• If I could add some flavor here about the robustness...The central limit theorem and Berry-Esseen theorem can be used to justify the normality of the sample mean. In the non-normal case, the robustness of the test likely relies on the sample mean and sample variance being approximately independent. Indeed, the defn of the t-statisitc is made in terms of independent gaussian and ch-squared random variables. Commented Dec 28, 2022 at 23:57

The full statement from Wikipedia is necessary to establish the proper context (emphasis mine):

A t-test is any statistical hypothesis test in which the test statistic follows a Student's t-distribution under the null hypothesis. It is most commonly applied when the test statistic would follow a normal distribution if the value of a scaling term in the test statistic were known (typically, the scaling term is unknown and therefore a nuisance parameter).

The first sentence tells us that the test statistic follows a particular distribution, which is not actually normal. The second sentence, which is the part you quoted, tells us that this "Student's t-distribution" the statistic follows, obeys a specific property; namely, that if the scale parameter were known (rather than estimated), the corresponding statistic would be normally distributed.

Indeed, the purpose of the second sentence is to introduce the reader to the motivation behind the development of this test, since it is a natural question to ask how to perform statistical inference for a population mean when the variability in that population is unknown. As it is intuitive to estimate that variability from the observed data, the question of how the usual $$z$$-statistic $$Z \mid H_0 = \frac{\bar x - \mu_0}{\sigma/\sqrt{n}}$$ is distributed when $$\sigma$$ is replaced by the sample standard deviation $$s$$, follows readily. So in a sense, the Student's $$t$$-test has the aforementioned property by construction: the test is what it is because it arose from considering what happens to a $$z$$-test when $$\sigma$$ is unknown.

It is important to understand that because of this relationship, the assumptions that underlie the $$t$$-test are inherited from those from the $$z$$-test. For instance, the observations are assumed independent and identically distributed realizations from a normal distribution; the mean of this distribution is fixed but unknown; and the variance is fixed and known (in the case of the $$z$$-test). When this distributional assumption is satisfied, the $$z$$-statistic is exactly normal; consequently, the $$t$$-statistic is exactly $$t$$-distributed under the same assumptions.

What many students misunderstand (and I have pointed this out previously), and what has been nicely addressed in other answers to your question, is the robustness of these statistics to deviations from the normality assumption in relation to the sample size. Such deviations do not necessarily invalidate the test because when the sample size is sufficiently large, the Central Limit Theorem implies the sample mean will be approximately normal. But robustness is not a statement about the actual distribution the statistic follows, and it is also not immediately pertinent to the above quote from Wikipedia.