options(scipen=999)
options(digits=9)

n1=15
mue1=460
s1=40
n2=16
mue2=440
s2=42
sp_square=((n1-1)*s1^2+(n2-1)*s2^2)/(n1+n2-2)
sp_square
sp=sqrt(sp_square)
sp
standard_error=sp*sqrt(1/n1+1/n2)
standard_error
df=n1+n2-2
df
t=(45.0656405-(mue1-mue2))/standard_error
t
1-pt(t,df)

