```{r} library(dplyr) library(effectsize) library(effsize) library(readxl) library(ggpubr) A6Q3 <- read_excel(“C:/Users/User/Downloads/A6Q3.xlsx”) A6Q3 %>% group_by(Exercise) %>% summarise( Mean = mean(Weight, na.rm = TRUE), Median = median(Weight, na.rm = TRUE), SD = sd(Weight, na.rm = TRUE), N = n() ) hist(A6Q3\(Weight[A6Q3\)Exercise == “nocardio”], breaks = 15, col = “skyblue”, border = “white”)
hist(A6Q3\(Weight[A6Q3\)Exercise == “cardio”], breaks = 15, col = “firebrick”, border = “white”) #Data for nocardio appears abnormally distributed. #Data for cardio appears abnormally distributed. ggboxplot(A6Q3, x = “Exercise”, y = “Weight”, color = “Exercise”, palette = “jco”, add = “jitter”) # The nocardio boxplot does not have outliers. # The cardio boxplot does not have outliers. shapiro.test(A6Q3\(Weight[A6Q3\)Exercise == “nocardio”]) shapiro.test(A6Q3\(Weight[A6Q3\)Exercise == “cardio”]) #The nocardio group is normally distributed, (p = .817.) #The cardio group is normally distributed, (p = .581). t.test(Weight ~ Exercise, data = A6Q3, var.equal = TRUE) cohens_d_result <- cohens_d(Weight ~ Exercise, data = A6Q3, pooled_sd = TRUE) print(cohens_d_result) # An Independent T-Test was conducted to determine if there was a difference in Weight between nocardio and cardio. # Cardio scores (M = 74.7, SD = 7.57) were significantly different from Nocardio scores (M = 70.8, SD = 7.35), (t(48) = 1.86, p = .070). # The effect size was medium, Cohen’s d = .52. ```