# How do you calculate the standard deviation and error for a difference between two different means?

I have 40 people that I measure at baseline, getting their mean level of X at time zero. I also calculate the standard deviation and standard error of the mean of X.

Then after 100 days I measure their levels of X again, and again calculate a mean, standard deviation, and standard error. I lost five people to follow up, so the N for this group is only 35.

     Time    N    MeanX    SD    SE
0   40      6.9   5.2   0.8
100   35      5.7   5.7   1.0


I am interested in the difference in mean levels of X between 100 days and baseline. So I can calculate this easily, as

5.7 - 6.9 = -1.2


My question is... For this value, -1.2, I would also like to know its standard deviation and standard error. Could someone tell me how to do this? I've found a few possible formulas on the internet, including one from a similar question on this site, for example squaring the standard deviations, dividing them by their n's, and then taking the square root, but I am not one hundred percent sure if this is what I want.

• It seems you have paired data where the easiest approach would be to take differences for each individual and then do a one sample test on those differences. A complication with calculating the standard error of this quantity is that the two samples are not independent, but if you take differences you don't need to worry about this. – dsaxton Aug 8 '15 at 23:22
• The trouble is I don't actually have the individual participant data - only the summary data shown above – Alexander Aug 8 '15 at 23:23
• @dsaxton you appear to be assuming non-negative covariance (that is something, not nothing). So your bound could be anti-conservative. – Mark L. Stone Aug 8 '15 at 23:45
• Oops yeah. Dumb mistake. In any case you might be able to reasonably assume positive covariance. (I'll delete my comment anyways so it isn't confusing.) – dsaxton Aug 8 '15 at 23:46
• I've revised my answer to include the commentary. But be careful about being "fine with not showing a significant difference"; there can be costs to type II errors, too. – EdM Aug 9 '15 at 15:04

• @MarkL.Stone ... (ctd) The Wikipedia page on pairing puts it this way: > "Thus the variance of $\bar{D}$ is lower if there is positive correlation within each pair. Such correlation is very common in the repeated measures setting, since many factors influencing the value being compared are unaffected by the treatment" – Glen_b Aug 9 '15 at 1:17