Summary
Highlights
The one-sample t-test is used to compare the mean of a sample with a known reference mean. An example is checking if chocolate bars weigh a claimed 50 grams against a sample mean of 48 grams.
This t-test compares the means of two independent groups or samples to determine if there's a significant difference. An example is comparing the effectiveness of two painkillers on separate groups of people.
A t-test is a statistical procedure used to analyze whether there is a significant difference between the means of two groups. For example, it can compare the blood pressure of patients receiving different drugs.
There are three main types of t-tests: the one-sample t-test, the independent samples t-test, and the paired samples t-test. Each is used for different comparison scenarios.
The paired samples t-test is used to compare the means of two dependent groups, typically where measurements are taken from the same subjects at different times. An example is weighing people before and after a diet. This test is similar to a one-sample t-test on the differences between paired values.
Key assumptions for a t-test include having a suitable sample, a metric variable that is normally distributed, and for independent t-tests, approximately equal variances between the groups. Normality can be checked using specific tests, and variance equality can be checked with Levene's test.
For a one-sample t-test, the null hypothesis states the sample mean equals the reference value. For an independent samples t-test, the null hypothesis states the means of both groups are the same. For a paired samples t-test, the null hypothesis states the mean of the difference between pairs is zero.
The t-test helps determine if a observed difference in a sample, such as study length between men and women, is statistically significant enough to reject the assumption that no difference exists in the larger population, even if minor sample differences are expected due to chance.
The T-value is calculated by dividing the difference between the means by the standard error. Formulas for calculating the T-value and standard error vary slightly depending on the type of t-test (one-sample, independent, or paired).
A larger T-value indicates a greater difference between means and less dispersion of the mean. To test the null hypothesis, one can compare the calculated T-value to a critical T-value from a table, or calculate the p-value. The p-value indicates the probability of observing a sample difference as extreme as, or more extreme than, the one observed, assuming the null hypothesis is true. If the p-value is below the significance level (e.g., 0.05), the null hypothesis is rejected.
By consulting a table of critical T-values for a chosen significance level (e.g., 0.05) and degrees of freedom, one can determine if a calculated T-value is greater than the critical value. If it is, the null hypothesis is rejected. Degrees of freedom calculations vary by t-test type.
An undirected hypothesis simply states there is a difference (e.g., in salary between men and women), without specifying the direction. A directed hypothesis specifies the direction of the difference (e.g., men earn more than women). This affects how the critical regions are considered in the t-distribution (two-tailed vs. one-tailed).