Skip to article frontmatterSkip to article content

Assumptions of t-tests

To ensure the validity of the results, the t-test relies on certain assumptions:

The distributions of two groups of students.

The distributions of two groups of students.

Two Types of ‘Groups’: Between vs. Within

‘Between’-Group Analysis

‘Within’-Group Analysis

Types of t-tests

There are three main types of t-tests:

  1. One sample t-test

  2. Independent samples t-test

  3. Paired samples t-test

Source: Datatab

Source: Datatab

One sample t-test

Source: Datatab

Source: Datatab

An example

A factory claims that their light bulbs have an average lifespan of 1,0001,000 hours. A consumer group selects a random sample of 25 bulbs and finds that the sample has an average lifespan of 985 hours with a standard deviation of 50 hours. The consumer group wants to determine whether the factory’s claim is accurate.

[ 935,  969,  917,  922,  906, 1022,  984, 1023, 1042,  944,
  982, 1054,  923, 1012,  963, 1011,  924, 1026, 1081,  932,
 1027,  947,  994, 1016, 1069 ]
The one sample t-test example.

The one sample t-test example.

.bold[Finding]: The consumer group cannot conclude that the factory’s claim is inaccurate based on this sample. There is not enough evidence to reject the null hypothesis that the average lifespan of the light bulbs is 1,000 hours.

Steps involved in the one-sample t-test:

Independent samples t-test

Source: Datatab

Source: Datatab

In each subplot, the mean of two Iris species were compared.

The differences in petal length between the three species, with t-test results.

The differences in petal length between the three species, with t-test results.

Paired samples t-test

Source: Datatab

Source: Datatab

The changes of psychological indexes before and after a VR treatment. T-test and significant levels are shown at top right. 10.1016/j.jenvp.2023.102012

The changes of psychological indexes before and after a VR treatment. T-test and significant levels are shown at top right. Hsieh et al. (2023)

T-Test Statistic and Interpretation

t-value (aka T-statistic)

The t-test calculates a t-value by dividing the difference between the group means by the standard error of the difference. A higher t-value (positive or negative) suggests a larger inter-group difference relative to the intra-group variability.

p-value

The t-test also provides a p-value, which represents the probability of observing a t-value at least as extreme as the one calculated, assuming the null hypothesis is true. A lower p-value indicates stronger evidence against the null hypothesis, suggesting a significant difference between the groups.

Degrees of Freedom

Degrees of freedom (df) are used to determine the appropriate t-distribution for calculating p-values. For independent samples t-test, df=n1+n22df = n_1 + n_2 - 2, where n1n_1 and n2n_2 are the sample sizes of the two groups.

Effect Size

To assess the practical significance of the difference between group means, effect size measures like Cohen’s d, Eta-squared, and Hedge’s g can be calculated. Cohen’s d indicates the magnitude of the difference between the groups in standard deviation units.

Summary

The t-test is widely used in various fields to compare group means and evaluate the effectiveness of treatments, interventions, or different conditions. It serves as an essential tool for hypothesis testing and data analysis.

References
  1. Hsieh, C.-H., Yang, J.-Y., Huang, C.-W., & Chin, W. C. B. (2023). The effect of water sound level in virtual reality: A study of restorative benefits in young adults through immersive natural environments. Journal of Environmental Psychology, 88, 102012. 10.1016/j.jenvp.2023.102012