title: “caso1” author: “manuel alejandro ceron montenegro” date: “2026-09-11” output: html_document

Introducción

Este informe resume la información de 69 marcas de cerveza distribuidas en la ciudad, con el fin de validar algunas hipótesis del director de investigación.

Cargar los datos

beer <- read.csv("beer 2.csv")
beer <- beer[1:69, ]
head(beer) %>%
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover"))
id precio calorias poralcoh tipo origen
1 6.24 159 5.2 1 1
2 4.79 160 5.0 1 1
3 5.96 160 4.9 1 1
4 4.70 162 4.9 1 1
5 4.11 157 5.5 1 1
6 3.85 151 4.9 1 1

Tabla de frecuencias - Tipo de cerveza

tabla_tipo <- table(beer$tipo)
kable(tabla_tipo, col.names = c("Tipo", "Frecuencia")) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Tipo Frecuencia
1 13
2 17
3 10
4 16
5 13
kable(round(prop.table(tabla_tipo) * 100, 1), col.names = c("Tipo", "Porcentaje")) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Tipo Porcentaje
1 18.8
2 24.6
3 14.5
4 23.2
5 18.8

Tabla de frecuencias - Origen

tabla_origen <- table(beer$origen)
kable(tabla_origen, col.names = c("Origen", "Frecuencia")) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Origen Frecuencia
0 15
1 54
kable(round(prop.table(tabla_origen) * 100, 1), col.names = c("Origen", "Porcentaje")) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Origen Porcentaje
0 21.7
1 78.3

Indicadores - Precio

kable(t(as.matrix(summary(beer$precio)))) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Min. 1st Qu. Median Mean 3rd Qu. Max.
2.36 3.9 4.79 4.963188 6.24 7.8

Desviación estándar: 1.45

Indicadores - Calorías

kable(t(as.matrix(summary(beer$calorias)))) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Min. 1st Qu. Median Mean 3rd Qu. Max.
58 142 148 142.3478 160 201

Desviación estándar: 29.9

Indicadores - Porcentaje de alcohol

kable(t(as.matrix(summary(beer$poralcoh)))) %>%
  kable_styling(bootstrap_options = c("striped", "hover"), full_width = FALSE)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0 4.4 4.9 4.42029 5.1 6

Desviación estándar: 1.57

Análisis de los resultados