t-test (paired and unpaired)

Last reviewed 01/2018

  • unpaired t-test (also known as the student's t-test) and the paired t-test both assume that analysed data is from a normal distribution
  • unpaired t-test
    • applied to two independent groups e.g. diabetic patients versus non-diabetics
    • sample size from the two groups may or may not be equal
    • in addition to the assumption that the data is from a normal distribution, there is also the assumption that the standard deviation (SD)s is approximately the same in both groups
    • t-test compares the means of the two groups of data - the test determines whether the data has come from the same population or not
      • the mean difference is calculated (this can be a positive or negative value); also a 95% confidence interval for the mean difference is calculated. A p-value is calculated where p is the probability of a false-positive event. An example relating to data regarding patients with diabetes in chronic heart failure
      variable

      diabetes

      Mean (SD)

      No diabetes

      Mean (SD)

      Mean difference

      95% CI

      p-value
      Age (years)68.8 (8.7) 73.3 (9.0)4.2 (3.1, 5.3)p <0.0001
      Heart rate (bpm)75 (15.0)76.1 (14.9)1.1 (-0.9, 3.1)p 0.85
      • in the example
        • age of patient - the mean difference in age is 4.2 years with a 95% confidence interval of 3.1 years to 5.3years. The p-value for this relationship is <0.0001 which indicates that false-positive rate is very low (i.e. this difference is unlikely to be due to chance). The data therefore suggests that patients with diabetes and chronic heart failure tend to be younger than patients without diabetes and chronic heart failure
        • heart rate - in this example the mean difference is 1.1 years with a 95% confidence interval of -0.9 years to 3.1 years. The p-value for this relationship is 0.85 that indicates that the two groups are not statistically different from each other, i.e. the observed difference is likely to be due to chance
        • a non-significant p-value may occur because either
          • there are no differences between the two study groups
          • the study did not have sufficent 'power' to show a difference between the two study groups - with sufficiently large sample sizes then any difference can be shown to be statistically different
  • paired t-test
    • data is derived from study subjects who have been measured at two time points (so each individual has two measurements). The two measurements generally are before and after a treatment intervention
    • 95% confidence interval is derived from the difference between the two sets of paired observations

Reference:

  1. Doctor (March 22nd 2005):33-35.