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


mue=50
alpha=0.05
x=c(41,42,47,41,54,26,26,65,34,49,29,50)
n=length(x);n
xbar=mean(x);xbar
s=sd(x);s
v=n-1;v
t_compute=(xbar-mue)/(s/sqrt(n));t_compute
t_critical=qt(1-alpha,v);t_critical
one_tailed_sig=1-pt(abs(t_compute),v);one_tailed_sig
two_tailed_sig=2*one_tailed_sig;two_tailed_sig




library(TeachingDemos)
x=c(41,42,47,41,54,26,26,65,34,49,29,50)
t.test(x,mu=50)


