๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ๐ฏ
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
##(i)Datos
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 4. =========->
##
## Femenino Masculino
## 42 32
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 5.=========->
pie_1<-pie(table_sexo, col=c("lightblue","pink"),
main="Estudio de Pastel.\n Distribuciรณn por sexos-kalollero torres.", labels = table_sexo)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ #####<-========== PASO 6. =========->
barp<-barplot(table_sexo, col = rainbow(5), border = "darkred",main = "Grรกfico de Barras-kalollero torres",sub = "UTB",xlab = "SEXO", ylab = "Conteo")
text(barp, table_sexo-30, labels = table_sexo)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 7. =========->
##
## Femenino Masculino
## 57 43
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 8. =========->
barp2<-barplot(table_sexo2, col = rainbow(5), border = "darkred",main = "Grรกfico de Barras-kalollero torres",sub = "UTB",xlab = "SEXO", ylab = "Porcentaje")
text(barp2, table_sexo2-30, labels = table_sexo2)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 9. =========->
pie_1<-pie(table_sexo2, col=c("lightblue","pink"),
main="Estudio de Pastel.\n Distribuciรณn por sexos.", labels = table_sexo2)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 10. =========->
##
## ESTADISTICAI PROBABILIDAD
## Femenino 16 26
## Masculino 10 22
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 11. =========->
barp3<-barplot(table_3,
main = "Grรกfico de barras CURSO vs SEXO",
xlab = "CURSO", ylab = "Frecuencia",
col = c("pink", "blue"),
legend.text = rownames(table_3),
beside = TRUE) # Barras agrupadas
text(barp3, table_3-5, labels = table_3)
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 12. =========->
##
## ESTADISTICAI PROBABILIDAD
## Femenino 22 35
## Masculino 14 30
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 13. =========->
barp4<-barplot(table_4,
main = "Grรกfico de barras CURSO vs SEXO en porcentajes",
xlab = "CURSO", ylab = "Frecuencia",
col = c("pink", "blue"),
legend.text = rownames(table_4),
beside = TRUE) # Barras agrupadas
text(barp4, table_4-5, labels = table_4)
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 14. =========->
##
## ESTADISTICAI PROBABILIDAD
## I 5 10
## II 7 18
## III 9 9
## IV 5 5
## V 0 5
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 15. =========->
barp3<-barplot(table_5,
main = "Grรกfico de barras CURSO vs ESTRATO",
xlab = "CURSO", ylab = "Frecuencia",
col = rainbow(5),
legend.text = rownames(table_5),
beside = TRUE) # Barras agrupadas
text(barp3, table_5-1, labels = table_3)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 16. =========->
##
## Femenino Masculino
## I 8 7
## II 17 8
## III 10 8
## IV 4 6
## V 3 2
๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 17. =========->
barp3<-barplot(table_6,
main = "Grรกfico de barras CURSO vs ESTRATO",
xlab = "CURSO", ylab = "Frecuencia",
col = rainbow(5),
legend.text = rownames(table_6),
beside = TRUE) # Barras agrupadas
text(barp3, table_6-1, labels = table_6)๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
#####<-========== PASO 18. =========->
## Warning in fun(libname, pkgname): couldn't connect to display ":0"
## system might not have X11 capabilities; in case of errors when using dfSummary(), set st_options(use.x11 = FALSE)
## Frequencies
## DATOS2026$EDAD
## Type: Numeric
##
## Freq % Valid % Valid Cum. % Total % Total Cum.
## ----------- ------ --------- -------------- --------- --------------
## 17 7 9.46 9.46 9.46 9.46
## 18 32 43.24 52.70 43.24 52.70
## 19 21 28.38 81.08 28.38 81.08
## 20 7 9.46 90.54 9.46 90.54
## 21 4 5.41 95.95 5.41 95.95
## 22 3 4.05 100.00 4.05 100.00
## <NA> 0 0.00 100.00
## Total 74 100.00 100.00 100.00 100.00
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
#####<-========== PASO 19. =========->
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 17.0 18.0 18.0 18.7 19.0 22.0
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
#####<-========== PASO 20. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
#####<-========== PASO 21. =========->
## Warning in (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : some
## notches went outside hinges ('box'): maybe set notch=FALSE
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
#####<-========== PASO 22. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
#####<-========== PASO 23. =========->
library(ggplot2)
x = DATOS2026$EDAD
z = DATOS2026$ESTRATO
boxplot(x~z, horizontal = TRUE, col = rainbow(3))๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 24. =========->
library(ggplot2)
ggplot(data= DATOS2026,mapping= aes(y=EDAD,x = ESTRATO, fill=SEXO))+geom_boxplot()+
scale_y_continuous(name = "EDAD") +
scale_x_discrete(labels = abbreviate, name = "ESTRATO")
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 25. =========->
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 153.0 163.0 168.0 168.4 174.0 192.0
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 26. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 27. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 28. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 29. =========->
library(ggplot2)
x = DATOS2026$ESTATURA
z = DATOS2026$ESTRATO
boxplot(x~z, horizontal = TRUE, col = rainbow(3))๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 30. =========->
library(ggplot2)
ggplot(data= DATOS2026,mapping= aes(y=ESTATURA,x = ESTRATO, fill=SEXO))+geom_boxplot()+
scale_y_continuous(name = "ESTATURA") +
scale_x_discrete(labels = abbreviate, name = "ESTRATO")๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 31. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 32. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 33. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 34. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 35. =========->
## [1] 7 32 21 0 7 4 0 3
## [1] 74
## [1] 9.459459 43.243243 28.378378 0.000000 9.459459 5.405405 0.000000
## [8] 4.054054
## [1] 7 39 60 60 67 71 71 74
## [1] 0.09459459 0.52702703 0.81081081 0.81081081 0.90540541 0.95945946 0.95945946
## [8] 1.00000000
## [1] 9.459459 52.702703 81.081081 81.081081 90.540541 95.945946 95.945946
## [8] 100.000000
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== PASO 36. =========->
๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐
####<-========== AQUI FINALIZA EL LABORATORIO 7. =========-> ๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐๐๐งช๐๐ปโจ๐ง ๐๐ฌโ๏ธ๐๐ป๐๐งช๐๐ปโจ๐ง ๐