From Paired Measurements to One Summary
In “Defining the Difference Variable,” you learned to define each paired difference as after minus before. Now we will use raw paired measurements to build the full list of differences and calculate two summaries: the mean difference and the sample standard deviation of the differences. These calculations reduce a paired data set to one quantitative list, with one value for each pair.
The order matters throughout. For each pair, subtract the before measurement from the after measurement, keeping the pairing intact. Once the differences are calculated, summarize that list just as you would summarize a single sample of quantitative data. The mean describes the average observed change; the sample standard deviation describes how much the individual changes vary around that average.
Both summaries are in the same units as the original measurement. If each measurement is in hours, then each difference, \(\bar d\), and \(s_d\) are in hours. The standard deviation is not in squared units; the square root in its formula returns it to the original units.
A Reliable Calculation Routine
Start by arranging the data so each row contains the two measurements belonging to one pair. Add a difference column and calculate after minus before in every row. Then use the resulting difference column—not the two original measurement columns—to calculate \(\bar d\) and \(s_d\).
Match each after measurement with its own before measurement according to the study design.
Use \(d_i=\text{after}_i-\text{before}_i\), with the same order and units for every pair.
Add all \(n\) differences and divide by \(n\): \(\bar d=\frac{\sum d_i}{n}\).
Measure each difference’s deviation from \(\bar d\), square the deviations, divide their sum by \(n-1\), and take the square root.
The denominator for the sample standard deviation is \(n-1\), where \(n\) is the number of pairs—and therefore the number of differences. Do not use the number of original measurements, \(2n\), as the sample size for this calculation. After pairing, the data being summarized are the \(n\) differences.
A second form of the standard deviation formula can be useful for checking arithmetic:
This computational formula gives the same result as summing squared deviations from \(\bar d\). It is a shortcut for the arithmetic, not a different definition. When using it, make sure \(\sum d_i^2\) means “square each difference, then add,” while \((\sum d_i)^2\) means “add the differences, then square the total.”
Worked Examples
Worked Example: Sleep Duration for Five Workers
In a fictional schedule exercise, five workers record sleep duration before and after a schedule change. The measurements are in hours. Use after minus before, then calculate the differences, their mean, and their sample standard deviation.
| Worker | Before (hours) | After (hours) | \(d_i\) (hours) |
|---|---|---|---|
| A | 6 | 8 | ? |
| B | 7 | 6 | ? |
| C | 5 | 5 | ? |
| D | 6 | 9 | ? |
| E | 8 | 9 | ? |
Solution. Subtract the before value from the after value in each row. The differences are \(8-6=2\), \(6-7=-1\), \(5-5=0\), \(9-6=3\), and \(9-8=1\) hours. Thus the difference list is \(2,-1,0,3,1\) hours.
Add the differences and divide by the five pairs:
For the sample standard deviation, first find each difference’s deviation from the mean of 1 hour. The deviations are \(1,-2,-1,2,0\) hours. Their squares are \(1,4,1,4,0\) square hours, with sum \(10\). There are five differences, so the denominator is \(5-1=4\):
In this sample, the average after-minus-before change in sleep duration was 1 hour. The individual differences typically varied around their mean by about 1.581 hours, as measured by the sample standard deviation. These are descriptive summaries of the observed pairs; by themselves, they do not establish that the schedule change caused a change in sleep.
Worked Example: Checking a Standard Deviation With the Shortcut
A fictional device exercise records response time before and after a setting is changed. For four devices, the paired response times, in seconds, produce after-minus-before differences of \(1.2,-0.4,0.6,-0.4\). Find \(\bar d\) and \(s_d\), and check the standard deviation with the computational formula.
Solution. The list already contains one difference per device. Its sum is \(1.2+(-0.4)+0.6+(-0.4)=1.0\) second, so
Using deviations from the mean, subtract \(0.25\) from each difference. The deviations are \(0.95,-0.65,0.35,-0.65\) seconds. Their squares are \(0.9025,0.4225,0.1225,0.4225\) square seconds. The sum is \(1.87\), so the sample standard deviation is
Now check with the shortcut. The sum of the squared differences is \(1.2^2+(-0.4)^2+0.6^2+(-0.4)^2=1.44+0.16+0.36+0.16=2.12\). The squared sum, divided by \(n\), is \((1.0)^2/4=0.25\). Therefore:
Both methods agree. The average observed after-minus-before difference is \(0.25\) second, and the differences have a sample standard deviation of about \(0.790\) second. Keep the units attached even when the differences include negative values.
Worked Example: Seedling Heights With No Change in One Pair
In a fictional gardening exercise, six seedlings are measured before and after a change in growing conditions. Heights are in centimeters. Use after minus before and calculate the difference list, \(\bar d\), and \(s_d\).
| Seedling | Before (cm) | After (cm) | Difference (cm) |
|---|---|---|---|
| A | 4 | 4 | ? |
| B | 5 | 6 | ? |
| C | 7 | 5 | ? |
| D | 6 | 8 | ? |
| E | 5 | 6 | ? |
| F | 8 | 12 | ? |
Solution. Subtract within each seedling’s pair: \(4-4=0\), \(6-5=1\), \(5-7=-2\), \(8-6=2\), \(6-5=1\), and \(12-8=4\) centimeters. The difference list is \(0,1,-2,2,1,4\) centimeters. Its sum is \(6\), so
The deviations from 1 cm are \(-1,0,-3,1,0,3\) cm. Squaring and adding gives \(1+0+9+1+0+9=20\) square centimeters. With \(n-1=5\),
The zero in the list is a valid difference: it records one seedling with equal measured heights at the two times. It remains one of the six observations when calculating both summaries. The sample mean difference is 1 cm, and the sample standard deviation of the differences is 2 cm.
Why Summarize the Differences?
For paired data, the question concerns within-pair changes or contrasts. The mean difference \(\bar d\) is the average of those observed changes. It is not enough to calculate the mean before measurement and mean after measurement separately and then report their two standard deviations. The variation relevant to the paired analysis is the variation among the pairwise differences.
The connection between measurements within a pair can matter. For instance, people who start with higher measurements may also tend to have higher measurements afterward. Calculating each person’s change retains that link. The spread of those changes, \(s_d\), can be quite different from the spread in either original column.
This calculation is the descriptive preparation for paired inference. As discussed in “Conditions for One-Sample Versus Paired Data,” a paired t procedure works with the differences and checks the relevant conditions using that list. When you later use a paired t procedure, its sample size is the number of differences, its sample mean is \(\bar d\), and its sample standard deviation is \(s_d\). The parameter for that inference will be introduced in “The Parameter mu d in Paired Inference.”
Common Mistakes and AP Exam Tips
- Mixing subtraction orders. If the definition is after minus before, use that order for every row. Reversing the order changes the signs and the meaning of \(\bar d\).
- Breaking the pairs. Subtract measurements within their designed pairs, not values from different rows or units. The row arrangement should preserve the actual matching.
- Using the original columns for the paired standard deviation. Calculate \(s_d\) from the list of differences. It is not the standard deviation of the before values or the after values.
- Dividing by \(n\) for a sample standard deviation. The formula for \(s_d\) divides the sum of squared deviations by \(n-1\), then takes the square root.
- Forgetting to square negative deviations correctly. A negative deviation has a positive square; for example, \((-2)^2=4\). Keep the parentheses when calculating.
- Using inconsistent rounding. Keep enough digits in intermediate calculations and round the final \(s_d\) only after taking the square root. State that a decimal result is rounded when appropriate.
- Leaving out units or context. A value such as \(\bar d=1\) is incomplete. Say, for example, that the average after-minus-before sleep-duration difference was 1 hour.
- Overinterpreting descriptive summaries. \(\bar d\) and \(s_d\) describe the observed differences. Inference and claims about a population or cause require appropriate design information and further analysis.
A clear calculation shows the difference list, identifies \(n\) as the number of pairs, displays the mean and sample-standard-deviation calculations, and interprets both summaries with units. When checking your work, confirm that each difference came from the correct pair, the subtraction order is consistent, and the standard deviation is based on deviations from \(\bar d\).
Check Your Understanding
Use after minus before for each paired difference. Show enough work to make your summaries checkable.
- Two measurements for one pair are 12 units before and 15 units after. What is the difference, and what does its sign indicate?
- For the difference list \(-1,2,3\), calculate \(\bar d\).
- For the difference list \(1,1,3\), calculate \(s_d\) using deviations from the mean.
- Why is the sample standard deviation of paired differences calculated from the difference list rather than from the before column alone?
- A data set has eight matched pairs. How many differences are used to calculate \(s_d\), and what denominator appears in its variance calculation?