Prueba de Hipótesis t - Student

EJEMPLO:

Entre la animacion con acción y aventura o la animacion con comedia, ¿cuál de esos 2 géneros tiene la puntiación mas alta ?

#Prueba de normalidad:{.unnumbered}

# H0 : La media de la puntuacion tiene una distribucion normal
# H1 : La media de la puntuacion no tiene una distribucion normal

#Filtración de animación con acción y aventura {.unnumbered}

aventura  <- animacion[animacion$Género == "Animation, Action, Adventure",]
aventura
##    Puesto                                  Nombre         Año Duracion
## 3       3                            Chainsaw Man    (2022– )         
## 8       8                     One Piece Film: Red       -2022  115 min
## 12     12                       The Dragon Prince    (2018– )   26 min
## 13     13                         Attack on Titan (2013–2023)   24 min
## 15     15                               One Piece    (1999– )   24 min
## 16     16         Bleach: Thousand-Year Blood War    (2022– )   24 min
## 18     18 Miraculous: Tales of Ladybug & Cat Noir    (2015– )   20 min
## 21     21                  Cyberpunk: Edgerunners    (2022– )   24 min
## 22     22                        My Hero Academia    (2016– )   24 min
## 23     23                              Super Pets       -2022  105 min
## 25     25                                  Arcane    (2021– )   41 min
## 31     31               Star Wars: The Clone Wars (2008–2020)   23 min
## 32     32          Demon Slayer: Kimetsu no Yaiba    (2019– )   24 min
## 36     36              Avatar: The Last Airbender (2005–2008)   23 min
## 38     38             Batman: The Animated Series (1992–1995)   23 min
## 42     42                                  Bleach (2004–2012)   24 min
## 49     49                              Invincible    (2021– )   50 min
##                          Género Puntaje  Votos
## 3  Animation, Action, Adventure     8.8  10613
## 8  Animation, Action, Adventure     6.9   6269
## 12 Animation, Action, Adventure     8.3  23460
## 13 Animation, Action, Adventure     9.0 369274
## 15 Animation, Action, Adventure     8.9 124898
## 16 Animation, Action, Adventure     9.4   8182
## 18 Animation, Action, Adventure     7.6  11645
## 21 Animation, Action, Adventure     8.4  41881
## 22 Animation, Action, Adventure     8.4  61931
## 23 Animation, Action, Adventure     7.3  60494
## 25 Animation, Action, Adventure     9.0 203013
## 31 Animation, Action, Adventure     8.4  96880
## 32 Animation, Action, Adventure     8.7 101339
## 36 Animation, Action, Adventure     9.3 313079
## 38 Animation, Action, Adventure     9.0 103990
## 42 Animation, Action, Adventure     8.2  55915
## 49 Animation, Action, Adventure     8.7 135460
library(dplyr)
shapiro.test(aventura$Puntaje)
## 
##  Shapiro-Wilk normality test
## 
## data:  aventura$Puntaje
## W = 0.91073, p-value = 0.1029

La media de la puntuación tiene una distribución normal

#Filtracion de animacion con comedia

comedia  <- animacion[animacion$Género == "Animation, Comedy",]
comedia
##    Puesto        Nombre      Año Duracion            Género Puntaje  Votos
## 9       9    Family Guy (1999– )   22 min Animation, Comedy     8.2 338447
## 11     11  The Simpsons (1989– )   22 min Animation, Comedy     8.7 406290
## 26     26 Bob's Burgers (2011– )   22 min Animation, Comedy     8.2  81343
## 29     29    South Park (1997– )   22 min Animation, Comedy     8.7 368653
## 45     45 American Dad! (2005– )   22 min Animation, Comedy     7.4 128206
library(dplyr)
shapiro.test(comedia$Puntaje)
## 
##  Shapiro-Wilk normality test
## 
## data:  comedia$Puntaje
## W = 0.85659, p-value = 0.2162

La media de la puntuacion tiene una distribucion normal