The one-sample t-test is most often used for comparing product quality. That is, in a situation where we know the value that (for example, a product) is supposed to be close to. Typically we have a reference value for the product's weight and we determine whether the batch of product we manufactured is still consistent with the reference value or not.
Two-sample independent t-test: Used in a situation where we compare two different groups, for which we determine whether the mean value of the two groups is the same. Here, as an example, the consistency in production of two mutually independent production lines can be used.
The last test is the paired t-test; this test is used, for example, in healthcare, laboratories, but also in industry. It is used to determine the difference between samples where we compare the results of two measurements on one and the same group. Typically we determine the condition of patients before they start taking a drug and the condition of patients who have been taking the drug for a certain time.
A certain limitation of the t-test is that we can always (and only) compare two samples. If we had, for example, three products and wanted to determine the difference in weight, we would have to use a different test. In this case we must use analysis of variance (known as ANOVA).
Courses dealing with comparing and generalizing at our data academy:
(After clicking the following links you will be redirected to the details of the individual courses on a separate website, datova-akademie.cz)