Two sample Dependent / Matched Paired Mean-Differences hypothesis test (t-Test) and confidence intervals (t-Interval)

Matched pairs, e.g before/after (treatment or intervention) same subject, husband/wife, measured/self-reported, twins, parent/child,...
Samples sizes should be either >30 or from a normal population. Robust against some departure from normality for small n's.
Difference between each pair: di = X1i-X2i
μd is the mean of the differences of the pairs of the two populations.

H0: μd = 0
Choose one:
HA: μd < 0 "HA < H0" Left-tailed
HA: μd > 0 "HA > H0" Right-tailed
HA: μd ≠ 0 "HA ≠ H0" Two-tailed

Dependent paired data: must be same sizes
X1:
X2:

n:
Differences di=X1i-X2i:
sample mean of the differences: = ∑di / n   
sd standard deviation of the differences: = √(∑(di-d̄)2 / (n-1))
df:

t:      Critical value: α=0.05: α=0.01:

p-value (TCDF(t)):

     Standard error= sd/√n:

Confidence intervals for the mean of the differences between populations:

** For one-tailed tests use 90% CL for α=.05 and 98% CL for α=.01
There is a CL% chance that [d̄-E, d̄+E] contains the true mean of the differences of the values of the two populations.
* If CI does not contain 0 (ie. all negatives or all positives), reject H0.
* If CI contains 0, fail to reject H0.
NB. n, d̄, sd can go into One Sample t-Interval for the Mean for same CIs.


Weights 
Measured: 152.6 149.3 174.8 119.5 194.9 180.3 215.4 239.6
Self-reported: 150 148 170 119 185 180 224 239

hynotism
6.6 6.5 9.0 10.3 11.3 8.1 6.3 11.6
6.8 2.4 7.4  8.5  8.1 6.1 3.4  2.0

Gosset
0.7 -1.6 -0.2 -1.2 -1.0 3.4 3.7 0.8 0.0 2.0
1.9  0.8  1.1  0.1 -0.1 4.4 5.5 1.6 4.6 3.4

Temperatures
Actual:     1 -5 -5 23 9
Predicted: 16 16 20 22 15

Data for Head Measurements
Cardboard    Metal
146 151 163 152 151 151 149 166 149 155 155 156 162 150 156 158 149 163 
145 153 161 151 145 150 150 163 147 154 150 156 161 152 154 154 147 160

Cholesterol before and after heart attack
270 236 210 142 280 272 160 220 226 242 186 266 206 318 294 282 234 224 276 282 360 310 280 278 288 288 244 236
218 234 214 116 200 276 146 182 238 288 190 236 244 258 240 294 220 200 220 186 352 202 218 248 278 248 270 242