How we change what others think, feel, believe and do

# Matched-pair t-test

Explanations > Social ResearchAnalysis > Matched-pair t-test

## Description

The t-test gives an indication of how separate two sets of measurements are, allowing you to determine whether something has changed and there are two distributions, or whether there is effectively only one distribution.

The matched-pair t-test (or paired t-test or paired samples t-test or dependent t-test) is used when the data from the two groups can be presented in pairs, for example where the same people are being measured in before-and-after comparison or when the group is given two different tests at different times (eg. pleasantness of two different types of chocolate).

In design notation, this  could be is:

 R O X O

or

 R X O X O

### Goodness of fit

This can also be used when you have one measure and are matching against a particular frequency distribution, for which you can determine 'should' measures. The two most common distributions to test for are normal (bell-shaped) and flat.

In a flat distribution, all items are equally likely. The t-test can be used here to discover whether any one or more of a set of measures is significantly different from the others.

This use of the chi-square test is often known as the 'Goodness of Fit' test.

## Calculation

The value of t may be calculated using packages such as SPSS. The actual calculation is:

t  = AVERAGE(X1-X2) / ( Sd / SQRT( n) )

Where Sd is the standard deviation of the differences and n is the number of pairs.

Sd = SQRT( (SUM((X1-X2)2) - (SUM(X1-X2))2/n) / (n-1) )

## Interpretation

The resultant t-value is then looked up in a t-table as below to determine the probability that a significant difference between the two sets of measures exists and hence what can be claimed about the efficacy of the experimental treatment.

The t-value can also be interpreted as an r-value, which can be calculated as:

r = SQRT( t2 / (t2 + DF))

where DF is the degrees of freedom.

## Example

The results of two sets of measures are as follows:

 X1 X2 X1-X2 (X1-X2)^2 5.24 7.53 -2.29 5.24 6.13 7.81 -1.68 2.82 6.15 8.79 -2.64 6.99 6.28 9.06 -2.79 7.76 6.62 10.48 -3.86 14.88 6.67 11.63 -4.95 24.53 7.09 12.61 -5.52 30.44 7.58 13.47 -5.89 34.65 7.78 14.49 -6.71 45.04 8.21 14.76 -6.55 42.85 9.09 15.87 -6.78 46.00 10.09 16.70 -6.61 43.69 11.27 17.66 -6.40 40.91 11.90 19.07 -7.17 51.46 13.16 19.59 -6.43 41.37 n: 15 Sum: -76.26 438.64 df = n-1: 14 Mean: -5.08 Sd : 1.90 t : 0.97

Looking up the t-value in the t-test table, with degrees of freedom = 15-1 = 14, the whole row is greater than t (0.97) so no significance can be claimed.

## Discussion

When measures from the two samples being compared do not come in matched pairs, the independent-measures t-test should be used. When there are multiple samples, then ANOVA should be used.

Goodness-of-fit curve-fitting is also available in more sophisticated forms where you have parametric data. In this case the Kolmogorov-Smirnov test or Shapiro-Wilk test may be used.

### You can buy books here

And the big
paperback book 