print("Datos")
print("Tamano de muestra")
print("Corredoras")
Yn1<-30
Yn1
print("Sedentarias")
Yn2<-30
Yn2
print("Medias")
Ymedia1<-34.0
Ymedia1
Ymedia2<-0
Ymedia2
print("Desviacion")
Ysd1<-10.5
Ysd1
Ysd2<-10.2
Ysd2
print("Prueba T")
sp2<- (((Yn1-1)*Ysd1^2)+((Yn2-1)*Ysd2^2)/(Yn1+Yn2-2))
sp2
sp<- sqrt(sp2)
sp
t<- (Ymedia1-Ymedia2)/(sp*sqrt(1/Yn1+1/Yn2))
t
gl<- Yn1+Yn2-2
gl
print("Valor P")
p_value<- 2*pt(abs(t),df=gl,lower.tail=FALSE)
p_value
print("Resultados")
cat("t =", round(t, 3), "\n")
cat("gl =", gl, "\n")
cat("Valor p (unilateral) =", round(p_value, 4), "\n")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: