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=test2-test1
d0=5
alpha=0.05
n=length(d);n
dbar=mean(d);dbar
s=sd(d);s
se=s/sqrt(n);se
df=n-1;df
t_compute=(dbar-d0)/se;t_compute
sig_1_tailed=1-pt(abs(t_compute),df);sig_1_tailed
sig_2_tailed=2*sig_1_tailed;sig_2_tailed
critical_t=qt(1-alpha/2,df);critical_t
