Paired t test

 Analyze

Description

Paired T-tests compare the difference in means between two sets of observations which are uniquely coupled e.g. exam scores for an individual before and after a training program. Paired T-tests are used only when you have two categorical ‘related’ groups as your independent variable and a continuous variable for dependent variable. The null hypothesis states that the difference in means is equal to 0, implying that any difference seen is due to chance. 

This test produces 3 values, ‘t’ , ‘df’ and ‘p’ for 3 alternative hypotheses - that the true difference is greater than, lesser than, or not equal to 0 . ‘Df’ stands for degrees of freedom, which simply means the number of measurements in the data. ‘T’ is the value calculated in units of standard error which, when compared to a distribution of ‘t’ values, gives a ‘p’ value, which is the probability of obtaining that ‘t’ value or greater (or lesser, depending on the ‘tail’) if it was down to random chance. 

Hence, the smaller the p-value, the more evidence there is that the observed difference is less due to chance.

Benefits

Reduces confounding, increase statistical power

Limitations

  • Assume continuous dependent variable
  • Assume normally distributed dependent variable
  • Assume observations are independent

 

Worked Example: 

An example excel file can be downloaded below ‘ Paired T test example’

  • There are four columns, ‘before’, ‘after’, ‘RandA’ and ‘Rand B’. 
  • There are 29 values in each column (these values are randomly generated, but could represent data before and after an intervention)
  • A significant difference (i.e. a P-value less than 0.05) should be seen when comparing ‘before’ and ‘after’ columns, and no difference should be seen between ‘RandA’ and ‘RandB’

 Analyze

  1. Click on Analyze, upload your .csv or .xlsx file
  2. Specify the ‘before’ variable column
  3. Specify the ‘after’ variable column
  4. Under the results tab, ‘T’, ‘df’ and P values can be found under 3 different alternative hypotheses.

Written by Kevin Michell