## R Markdown

A6Q1 <- read_excel(“Documents/a6/A6Q1/A6Q1.xlsx”) > View(A6Q1)

BEFORE <- A6Q1\(Before AFTER <- A6Q1\)After

DIFFERENCES <- AFTER - BEFORE

mean(BEFORE, na.rm = TRUE) sd(BEFORE, na.rm = TRUE) median(BEFORE, na.rm = TRUE)

mean(AFTER, na.rm = TRUE) sd(AFTER, na.rm = TRUE) median(AFTER, na.rm = TRUE)

hist(DIFFERENCES, main = “Histogram of Different Scores”, xlab = “Value”, ylab = “Frequency”, col = “light green”, border = “dark green”, breaks = 20) plot(differences) #Histogram of Different Scores #The scores look abnormally distributed. #The data is negatively skewed. # The data does not have proper bell curve.

boxplot(DIFFERENCES, main = “Distribution of Score Differences (after - before)”, ylab = “Difference in Scores”, col = “light green”, border = “dark green” boxplot(DIFFERENCES, main = “Distribution of Score Differences (after - before)”, ylab = “Difference in Scores”, col = “light green”, border = “dark green”)

#Boxplot # There are dots outside the boxplot. #The dot is not close to the whiskers. #The dot is very far away from the whiskers. #Based on these finsings, the boxplot is not normal.

shapiro.test(DIFFERENCES) #Shapiro-Wilk #Difference Scores #The data is normally distributed, (p= .332).

#A dependent T test was conducted to determine if there was a difference in body weight before a low calorie diet versus after the low calorie diet. #Before scores ( M=76.13 , SD =7.78 ,) were significantly different from after scores (m= 71.58 , SD = 6.63), p = 0.33

A Wilcox Signed Rank Test was conducted to determine if there was a difference in Weight before a low calorie diet versus after a low calorie diet

Before scores (Mdn = 75.95988) were different from after scores ( Mdn = 70.88) , V= 148, p = [< .001 / = .114 / > .05] = .175

```