library(readxl)
b <- read_excel("C:/Users/una/Desktop/r.xlsx")
attach(b)
str(b)
## Classes 'tbl_df', 'tbl' and 'data.frame':    50 obs. of  2 variables:
##  $ Genero         : chr  "M" "M" "M" "M" ...
##  $ Promedio_global: num  6.88 7 5.66 8.9 7.56 8.14 6.57 7.64 6.47 7.5 ...
tapply(Promedio_global,Genero, length)
##  F  M 
## 24 26
tapply(Promedio_global, Genero, mean)
##        F        M 
## 7.312917 7.551154
tapply(Promedio_global,Genero, sd)
##         F         M 
## 0.7122804 0.9608385
anova<- aov(Promedio_global~Genero , data = b)
anova 
## Call:
##    aov(formula = Promedio_global ~ Genero, data = b)
## 
## Terms:
##                   Genero Residuals
## Sum of Squares   0.70833  34.74916
## Deg. of Freedom        1        48
## 
## Residual standard error: 0.8508471
## Estimated effects may be unbalanced
summary(anova)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Genero       1   0.71  0.7083   0.978  0.328
## Residuals   48  34.75  0.7239
shapiro.test ( residuals( anova))
## 
##  Shapiro-Wilk normality test
## 
## data:  residuals(anova)
## W = 0.97666, p-value = 0.4214
library (car)
levene.test ( anova)
## Warning: 'levene.test' is deprecated.
## Use 'leveneTest' instead.
## See help("Deprecated") and help("car-deprecated").
## Warning in leveneTest.default(y = y, group = group, ...): group coerced to
## factor.
## Levene's Test for Homogeneity of Variance (center = median)
##       Df F value Pr(>F)
## group  1  2.5135 0.1194
##       48
pairwise.wilcox.test(Promedio_global,Genero,p.adj= "none" , exact = F )
## 
##  Pairwise comparisons using Wilcoxon rank sum test 
## 
## data:  Promedio_global and Genero 
## 
##   F   
## M 0.34
## 
## P value adjustment method: none
boxplot(Promedio_global~Genero )

El promedio medio de los estudiantes, fue mayor en Hombres con (7.55±0.961,n=26) y en mujeres fue (7.31± 0.712,n=24) de manera no significativa segun el anova parametrico (F= 0.33, gl= 1.48, p.value>0,05). Asi mismo se realizo un levene. test y no se encontraron diferencias significativas.