library(readxl)
library(ggpubr)
## Loading required package: ggplot2
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(effectsize)
library(effsize)
library(rstatix)
##
## Attaching package: 'rstatix'
## The following objects are masked from 'package:effectsize':
##
## cohens_d, eta_squared
## The following object is masked from 'package:stats':
##
## filter
Dataset6.1 <- read_excel("C:/Users/spvar/Downloads/Dataset6.1.xlsx")
Dataset6.1 %>%
group_by(Group) %>%
summarise(
Mean = mean(Exam_Score, na.rm = TRUE),
Median = median(Exam_Score, na.rm = TRUE),
SD = sd(Exam_Score, na.rm = TRUE),
N = n()
)
## # A tibble: 2 × 5
## Group Mean Median SD N
## <chr> <dbl> <dbl> <dbl> <int>
## 1 No Tutoring 71.9 71.5 7.68 40
## 2 Tutoring 78.4 78.7 7.18 40
hist(Dataset6.1$Exam_Score[Dataset6.1$Group == "Tutoring"],
main = "Histogram of Tutoring Scores",
xlab = "Value",
ylab = "Frequency",
col = "lightblue",
border = "black",
breaks = 10)
hist(Dataset6.1$Exam_Score[Dataset6.1$Group == "No Tutoring"],
main = "Histogram of No Tutoring Scores",
xlab = "Value",
ylab = "Frequency",
col = "lightgreen",
border = "black",
breaks = 10)
Histogram Interpretation
For the Tutoring histogram, the data appears symmetrical. It is difficult to state the exact kurtosis, but it appears bell-shaped (normal).
For the No Tutoring histogram, the data appears symmetrical. The kurtosis also appears bell-shaped (normal).
We may use an Independent T-Test.
ggboxplot(Dataset6.1, x = "Group", y = "Exam_Score",
color = "Group",
palette = "jco",
add = "jitter")
Boxplot Interpretation
The Tutoring boxplot appears normal. There are no dots past the whiskers.
The No Tutoring boxplot appears normal. There are no dots far past the whiskers.
We may use an Independent T-Test.
shapiro.test(Dataset6.1$Exam_Score[Dataset6.1$Group == "Tutoring"])
##
## Shapiro-Wilk normality test
##
## data: Dataset6.1$Exam_Score[Dataset6.1$Group == "Tutoring"]
## W = 0.98859, p-value = 0.953
p-value = 0.953 > .05, data is normal
shapiro.test(Dataset6.1$Exam_Score[Dataset6.1$Group == "No Tutoring"])
##
## Shapiro-Wilk normality test
##
## data: Dataset6.1$Exam_Score[Dataset6.1$Group == "No Tutoring"]
## W = 0.98791, p-value = 0.9398
p-value = 0.9398 > .05, data is normal
Both groups normal, use Independent T-Test
t.test(Exam_Score ~ Group, data = Dataset6.1, var.equal = TRUE)
##
## Two Sample t-test
##
## data: Exam_Score by Group
## t = -3.8593, df = 78, p-value = 0.000233
## alternative hypothesis: true difference in means between group No Tutoring and group Tutoring is not equal to 0
## 95 percent confidence interval:
## -9.724543 -3.105845
## sample estimates:
## mean in group No Tutoring mean in group Tutoring
## 71.94627 78.36147
cohens_d(Exam_Score ~ Group, data = Dataset6.1)
## # A tibble: 1 × 7
## .y. group1 group2 effsize n1 n2 magnitude
## * <chr> <chr> <chr> <dbl> <int> <int> <ord>
## 1 Exam_Score No Tutoring Tutoring -0.863 40 40 large
Shapiro-Wilk test showed Tutoring group was normal, p = .953 (> .05) Shapiro-Wilk test showed No Tutoring group was normal, p = .940 (> .05) Since both groups were normally distributed, Independent T-Test was used
No Tutoring group (M = 71.95) was significantly different from Tutoring group (M = 78.36), t(78) = -3.86, p < .001
Since p < .05, there is a significant difference in exam scores between the groups
Students who participated in tutoring had significantly higher exam scores than students who did not participate
The effect size was large (Cohen’s d = 0.86)