x1=c(2.0,2.0,2.3,2.1,2.4)
x2=c(2.2,1.9,2.5,2.3,2.4)
d=x1-x2
d0=0
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
