William Sealy Gosset, an English statistician who was also a beer brewer, developed the t-test. He used this test to ensure the consistency and quality of the beer he produced. Gosset published his work under the pseudonym “Student”, which is why the t-test is also known as the Student’s t-test. There are three types of t-tests: the one-sample t-test, the two-sample t-test, and the paired samples t-test. The one-sample t-test is used to test whether a sample mean is statistically different from a known population mean. The two-sample t-test is used to test whether there is a significant difference between the means of two independent groups. The paired samples t-test is used to compare the means of two related groups.
![](https://izen.ai/wp-content/uploads/2024/03/William-Sealy-Gosset.png)
![](https://izen.ai/wp-content/uploads/2024/03/t-test-sample.jpg)
A) One-sample t-test
The one-sample t-test is used to test whether a sample mean is statistically different from a known population mean.
![](https://izen.ai/wp-content/uploads/2024/03/t-test-one-sample.jpg)
B) Two-sample t-test
The two-sample t-test is used to test whether there is a significant difference between the means of two independent groups
![](https://izen.ai/wp-content/uploads/2024/03/t-test-two-sample.jpg)
If there are more than two groups, a pair-wise two-sample t-test can be performed, but a better approach is to use ANOVA (Analysis of Variance). If the variances of the two samples being compared are different, the unequal variances t-test (Welch’s t-test) should be used.
C) Paired samples t-test
The paired samples t-test is used to compare the means of two related groups.
![](https://izen.ai/wp-content/uploads/2024/03/t-test-paired-sample.jpg)
Assumptions of t-test
Assumptions of the t-test include normally distributed data, random sampling, and homogeneity of variance. If these assumptions are not met, non-parametric tests should be used instead.