```{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 normally distributed. #Data for cardio appears normally distributed. ##Here, I determined the data for both nocardio and cardio appears abnormally distribured, but the correct answer is that both are normally distributed. I misinterpreted the histogram and should have paid closed attention to what normality is and is not. 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 (kg) between participants who do not do cardio and those that do cardio. ##Here, I simply differentiated between the two by calling them “nocardio” and “cardio.” I should have written out the differences between the groups rather than calling them by their label. I also did not include a unit on weight. # The weight of those who do cardio (M = 74.7, SD = 7.57) were significantly different from the weight of those who do not do cardio (M = 70.8, SD = 7.35), (t(48) = 1.86, p > .05). ##Here, I again only differentiated between the two by calling them “nocardio” and “cardio.” I should have written out the differences between the groups rather than calling them by their label. I also wrote p=.070 rather than p>.05. Writing p>.05 allows the result to be more easily interpreted as p>.05 has greater meaning than writing out the p-value. # The effect size was medium, Cohen’s d = .52. ```