test1=c(76,60,85,58,91,75,82,64,79,88)
test2=c(81,52,87,70,86,77,90,63,85,83)
d=test1-test2
n=length(d);n
dbar=mean(d);dbar
s=sd(d);s
alpha=0.05
t=qt(1-alpha/2,n-1);t
confidence_level=t*s/sqrt(n);confidence_level
lower_limit=dbar-confidence_level;lower_limit
upper_limit=dbar+confidence_level;upper_limit

