According to priming theory, exposure to violent media can temporarily activate aggressive thoughts, emotions, and behavioral patterns, which increases the likelihood of observable aggression immediately afterward. This effect is short-lived and tends to fade as the activation decreases. In the context of video games, violent content may prime aggressive responses more strongly than non-violent or neutral content. Therefore, children who play violent games before recess are expected to display more aggressive behaviors, both verbal and physical, than children who play non-violent games, even when the games are equally engaging or challenging.
Average levels of aggression during recess will differ significantly among the three groups of children. Children exposed to the violent game Minecraft are expected to engage in more aggressive behavior than those who play non-violent games such as Sims or Cooking Game.
The study examined the relationship between the type of video game played before recess and the amount of aggressive behavior observed during recess. The independent variable was Video Game Type, which was categorical with three levels: Sims, Cooking Game, and Minecraft. Each level represented a different type of video game experience ranging from non-violent to mildly violent content.
The dependent variable was Aggressive Behavior, which was continuous and measured as the number of minutes each child spent engaged in physical or verbal aggression during a 30-minute recess period. In the dataset, the DV (Value) recorded the number of minutes of aggression for each child, and the IV (Group) recorded which video game group the child was in.
Because the independent variable had three groups and the dependent variable was continuous, a one-way analysis of variance (ANOVA) was used to test for differences in average aggression across the three groups when the data met normality assumptions. When any group did not meet the assumption of normality, a Kruskal–Wallis test was used instead to compare group medians. Post-hoc tests were conducted to identify which specific group differences were significant.
All analyses were done in R. Descriptive statistics and graphs were created to summarize group patterns and check assumptions before running the main tests.
The analysis showed that the type of video game played had a significant effect on how aggressive the children were during recess. On average, children who played Minecraft were the most aggressive (M = 19.62), followed by those who played Cooking Game (M = 7.98), and those who played Sims (M = 5.03*). Results from Table 1.
The test for normality showed that all three groups had data that were close enough to normal, so an ANOVA was used to compare the group means. The ANOVA found a significant difference among the three groups, F(2, 86.70) = 516.05, p < .001. Results from Table 3
Follow-up tests showed that every pair of groups was significantly different from each other (p < .001). Aggression was highest in the Minecraft group, moderate in the Cooking Game group, and lowest in the Sims group. A second test, called the Kruskal–Wallis, showed the same pattern of results, confirming that the findings were consistent and reliable.
These results support the hypothesis that exposure to violent video games increases short-term aggressive behavior. Both the mean and median aggression levels were highest for children who played Minecraft, which contains violent content, and lowest for those who played Sims, a non-violent game. The Cooking Game group showed intermediate levels of aggression, suggesting that time pressure and competition may also play a smaller role.
The consistent significance across both ANOVA and Kruskal–Wallis tests strengthens confidence in the finding. Together, the results show that children who played a violent video game displayed more aggression during recess than those who played non-violent games, supporting predictions from priming theory.
Descriptive Statistics by Group | |||||
IV | count | mean | sd | min | max |
---|---|---|---|---|---|
Cooking game | 45 | 7.98 | 1.86 | 5.0 | 11.9 |
Minecraft | 45 | 19.62 | 2.48 | 15.4 | 24.8 |
Sims | 45 | 5.03 | 1.85 | 2.1 | 9.3 |
Table 1
Shapiro-Wilk Normality Test by Group | ||
IV | W_statistic | p_value |
---|---|---|
Cooking game | 0.95 | 0.062 |
Minecraft | 0.96 | 0.136 |
Sims | 0.97 | 0.294 |
Note. If any p-value figures are 0.05 or less, if one or more group distributions appear non-normal, and any group sizes are less than 40, consider using the Kruskal-Wallis and Post-hoc Dunn’s Test results instead of the ANOVA and Tukey HSD Post-hoc results. |
Table 2
ANOVA Test Results | |||
Statistic | df | df_resid | p_value |
---|---|---|---|
516.05 | 2 | 86.69692 | < .001 |
Table 3
Tukey HSD Post-hoc Results | ||||
Comparison | diff | lwr | upr | p adj |
---|---|---|---|---|
Minecraft-Cooking game | 11.64 | 10.60 | 12.68 | < .001 |
Sims-Cooking game | -2.95 | -3.99 | -1.91 | < .001 |
Sims-Minecraft | -14.59 | -15.63 | -13.55 | < .001 |
Table 4
Kruskal-Wallis Test Results | ||
Statistic | df | p_value |
---|---|---|
104.92 | 2 | < .001 |
Table 5
Post-hoc Dunn’s Test Results | |||
Comparison | Z | P.unadj | P.adj |
---|---|---|---|
Cooking game - Minecraft | -6.21 | < .001 | < .001 |
Cooking game - Sims | 3.95 | < .001 | < .001 |
Minecraft - Sims | 10.16 | < .001 | < .001 |
Table 6
# ============================================================
# Setup: Install and Load Required Packages
# ============================================================
if (!require("tidyverse")) install.packages("tidyverse")
if (!require("gt")) install.packages("gt")
if (!require("gtExtras")) install.packages("gtExtras")
if (!require("FSA")) install.packages("FSA")
if (!require("plotly")) install.packages("plotly")
library(tidyverse)
library(gt)
library(gtExtras)
library(FSA)
library(plotly)
options(scipen = 999) # suppress scientific notation
# ============================================================
# Step 1: Load Data
# ============================================================
mydata <- read.csv("Priming.csv") # <-- Edit YOURFILENAME.csv
# Specify DV and IV (edit column names here)
mydata$DV <- mydata$Value
mydata$IV <- mydata$Group
# ============================================================
# Step 2: Visualize Group Distributions (Interactive)
# ============================================================
# Compute group means
group_means <- mydata %>%
group_by(IV) %>%
summarise(mean_value = mean(DV), .groups = "drop")
# Interactive plot (boxplot + group means)
box_plot <- plot_ly() %>%
# Boxplot trace
add_trace(
data = mydata,
x = ~IV, y = ~DV,
type = "box",
boxpoints = "outliers", # only applies here
marker = list(color = "red", size = 4), # outlier style
line = list(color = "black"),
fillcolor = "royalblue",
name = ""
) %>%
# Group means (diamonds)
add_trace(
data = group_means,
x = ~IV, y = ~mean_value,
type = "scatter", mode = "markers",
marker = list(
symbol = "diamond", size = 9,
color = "black", line = list(color = "white", width = 1)
),
text = ~paste0("Mean = ", round(mean_value, 2)),
hoverinfo = "text",
name = "Group Mean"
) %>%
layout(
title = "Interactive Group Distributions with Means",
xaxis = list(title = "Independent Variable (IV)"),
yaxis = list(title = "Dependent Variable (DV)"),
showlegend = FALSE
)
# ============================================================
# Step 3: Descriptive Statistics by Group
# ============================================================
desc_stats <- mydata %>%
group_by(IV) %>%
summarise(
count = n(),
mean = mean(DV, na.rm = TRUE),
sd = sd(DV, na.rm = TRUE),
min = min(DV, na.rm = TRUE),
max = max(DV, na.rm = TRUE)
)
desc_table <- desc_stats %>%
mutate(across(where(is.numeric), ~round(.x, 2))) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "Descriptive Statistics by Group")
# ============================================================
# Step 4: Test Normality (Shapiro-Wilk)
# ============================================================
shapiro_results <- mydata %>%
group_by(IV) %>%
summarise(
W_statistic = shapiro.test(DV)$statistic,
p_value = shapiro.test(DV)$p.value
)
shapiro_table <- shapiro_results %>%
mutate(
W_statistic = round(W_statistic, 2),
p_value = ifelse(p_value < .001, "< .001", sprintf("%.3f", p_value))
) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "Shapiro-Wilk Normality Test by Group") %>%
tab_source_note(
source_note = "Note. If any p-value figures are 0.05 or less, if one or more group distributions appear non-normal, and any group sizes are less than 40, consider using the Kruskal-Wallis and Post-hoc Dunn’s Test results instead of the ANOVA and Tukey HSD Post-hoc results."
)
# ============================================================
# Step 5a: Non-Parametric Test (Kruskal-Wallis + Dunn)
# ============================================================
kruskal_res <- kruskal.test(DV ~ IV, data = mydata)
kruskal_table <- data.frame(
Statistic = round(kruskal_res$statistic, 2),
df = kruskal_res$parameter,
p_value = ifelse(kruskal_res$p.value < .001, "< .001",
sprintf("%.3f", kruskal_res$p.value))
) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "Kruskal-Wallis Test Results")
dunn_res <- dunnTest(DV ~ IV, data = mydata, method = "bonferroni")$res
dunn_table <- dunn_res %>%
mutate(
Z = round(Z, 2),
P.unadj = ifelse(P.unadj < .001, "< .001", sprintf("%.3f", P.unadj)),
P.adj = ifelse(P.adj < .001, "< .001", sprintf("%.3f", P.adj))
) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "Post-hoc Dunn’s Test Results")
# ============================================================
# Step 5b: Parametric Test (ANOVA + Tukey)
# ============================================================
anova_res <- oneway.test(DV ~ IV, data = mydata, var.equal = FALSE)
anova_table <- data.frame(
Statistic = round(anova_res$statistic, 2),
df = anova_res$parameter[1],
df_resid = anova_res$parameter[2],
p_value = ifelse(anova_res$p.value < .001, "< .001",
sprintf("%.3f", anova_res$p.value))
) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "ANOVA Test Results")
anova_model <- aov(DV ~ IV, data = mydata)
tukey_res <- TukeyHSD(anova_model)$IV %>% as.data.frame()
tukey_table <- tukey_res %>%
rownames_to_column("Comparison") %>%
mutate(
diff = round(diff, 2),
lwr = round(lwr, 2),
upr = round(upr, 2),
`p adj` = ifelse(`p adj` < .001, "< .001", sprintf("%.3f", `p adj`))
) %>%
gt() %>%
gt_theme_538() %>%
tab_header(title = "Tukey HSD Post-hoc Results")
# ============================================================
# Step 6: Display Key Results
# ============================================================
# Interactive box plot
box_plot
# Tables
desc_table
shapiro_table
anova_table
tukey_table
kruskal_table
dunn_table