The explanatory variable in this analysis is the
learning method, found in the group column.
Students were in either the CAI (computer-assisted instruction) group or
the IBL (inquiry-based learning) group.
The response variable is working memory,
found in the WM_Z column. This score shows each student’s
working memory level at the start of the study.
By comparing working memory across the two groups, we can see if the learning methods had different types of students at baseline.
I used two columns from the dataset:
group — shows whether the student was
in CAI or IBLWM_Z — shows the student’s
standardized working memory scoreThese match the explanatory and response variables in Q1a.
The data needed only small changes. I changed group into
a categorical variable (factor) since it describes groups,
not numbers. I also made sure WM_Z was numeric so I could
compare the scores.
No other cleaning or changes were needed.
library(ggplot2)
# Load data
stage2 <- read.csv("dataset.csv")
# Make learning method a factor
stage2$group <- as.factor(stage2$group)
# Make working memory numeric
stage2$WM_Z <- as.numeric(stage2$WM_Z)
group is categorical (CAI or
IBL).WM_Z is quantitative (a
continuous working memory score).This is why a boxplot is a good choice for the graph.
ggplot(stage2, aes(x = group, y = WM_Z)) +
geom_boxplot() +
labs(
x = "Learning Method",
y = "Working Memory Score (Z-Score)"
)
Figure 1. This boxplot shows working memory scores
(WM_Z) for the CAI and IBL groups. Each box shows the
spread of scores within each learning method. This helps us see if the
groups were different in working memory before the teaching began.
I used some ChatGPT to help me better some of my wording and make sure the organization of this assignment was good for the rubric in case I missed anything while reading over. I fromed and confirmed the ideas, code, and results myself.