# ==============================================================================
# PROYECTO DE PROBABILIDAD Y ESTADÍSTICA - EPN (VERSIÓN ONLINE)
# ==============================================================================
# 1. GENERACIÓN DE LA BASE DE DATOS COMPLETA
set.seed(2026)
base_completa_epn <- data.frame(
Estudiante_ID = 1:150,
Provincia_Origen = sample(c("Pichincha", "Guayas", "Manabí", "Pastaza", "Napo", "Tungurahua", "Loja", "Azuay"),
150, replace = TRUE, prob = c(0.65, 0.08, 0.05, 0.03, 0.02, 0.07, 0.05, 0.05)),
Region = sample(c("Sierra", "Costa", "Amazonía"), 150, replace = TRUE, prob = c(0.82, 0.13, 0.05)),
Etnia = sample(c("Mestizo", "Indígena", "Blanco", "Afroecuatoriano", "Montubio"),
150, replace = TRUE, prob = c(0.84, 0.08, 0.05, 0.02, 0.01)),
Tipo_Colegio = sample(c("Público", "Privado", "Fiscomisional"),
150, replace = TRUE, prob = c(0.60, 0.30, 0.10)),
Genero = sample(c("Masculino", "Femenino"), 150, replace = TRUE, prob = c(0.63, 0.37)),
Periodo_Postulacion = sample(c("2022-A", "2022-B", "2023-A", "2023-B", "2024-A", "2024-B"),
150, replace = TRUE)
)
# ==============================================================================
# COMPONENTE 2 DE LA ENTREGA: Visualización de las 10 primeras observaciones
# ==============================================================================
print("--- PRIMERAS 10 OBSERVACIONES DE LA BASE DE DATOS ---")
head(base_completa_epn, 10)
# ==============================================================================
# COMPONENTE 1 DE LA ENTREGA: Gráficos base para el póster (Sin librerías externas)
# ==============================================================================
# GRÁFICO A: Distribución por Provincias
# Responde a la pregunta de investigación sobre qué provincias tienen más acogida
tabla_provincias <- table(base_completa_epn$Provincia_Origen)
barplot(tabla_provincias[order(tabla_provincias, decreasing = TRUE)],
main = "Distribución de Estudiantes por Provincia de Origen",
col = "steelblue",
las = 2,
ylab = "Cantidad de Estudiantes")
# GRÁFICO B: Distribución por Regiones
tabla_regiones <- table(base_completa_epn$Region)
barplot(tabla_regiones,
main = "Representatividad de la EPN por Región",
col = c("#E69F00", "#56B4E9", "#009E73"),
ylab = "Cantidad de Estudiantes")
# GRÁFICO C: Evolución de la Demanda Efectiva de Aspirantes
tabla_periodo <- table(base_completa_epn$Periodo_Postulacion)
plot(tabla_periodo,
type = "b",
col = "darkred",
lwd = 2,
main = "Evolución de la Demanda de Aspirantes a la EPN",
xlab = "Periodo de Postulación",
ylab = "Total de Registros")
# GRÁFICO D: Tipo de Colegio según Género
tabla_cruzar <- table(base_completa_epn$Tipo_Colegio, base_completa_epn$Genero)
barplot(tabla_cruzar,
main = "Tipo de Colegio de Origen por Género",
col = c("lightblue", "lightgreen", "coral"),
legend = rownames(tabla_cruzar),
beside = TRUE,
ylab = "Cantidad de Estudiantes")
To embed this project on your website, copy the following code and paste it into your website's HTML: