Personal Note

My OCD took over and I learned how to code a “Show/Hide” button for all the code, sorry if that’s against the rules. I got bored one day and looked up how to do it. Haha

Introduction

Media priming theory states that different media content can influence the thoughts, ideas, or behavioral responses that can occur because of it. The study will examine which type of response are associated with the amount of time they spend doing aggressive acts.

The study compares three groups - participants exposed to a violent video game, participants exposed to a nonviolent video game, and participants who completed an art project.

Hypothesis

The participants grouped in the violent video game category will be engaged in more aggressive acts than those in the non-violent video game or art-project groups.

Method

The data is based on 135 fifth-graders divided equally among three groups, with 45 participants in each group. The independent variable are groups consisting of a violent-game group, a nonviolent-game group, and an art-project group. The dependent variable is the number of minutes participants spent engaged in aggressive acts at recess.

A one-way analysis of variance (ANOVA) was conducted to compare the mean values across the three groups. Tukey’s difference test was used for follow-ups.

Load Data and Packages

library(tidyverse)
library(gt)
library(gtExtras)
library(FSA)
library(plotly)

Priming <- read.csv("Priming.csv")

Priming <- Priming %>%
  mutate(
    DV = Value,
    IV = Group
  )

Descriptive Statistics

Descriptive Statistics by Experimental Group
IV N Mean SD
Art project 45 4.96 1.04
Nonviolent game 45 5.86 1.06
Violent game 45 10.75 1.00

Graph

Normality Tests

Shapiro-Wilk Normality Tests
IV W p_value
Art project 0.988 0.923
Nonviolent game 0.979 0.594
Violent game 0.982 0.699

The Shapiro-Wilk tests did not show much evidence of departures from normality for any of the three groups, as all p-values were greater than .05.

One-Way ANOVA

One-Way Analysis of Variance
Source df Sum of Squares Mean Square F Statistic p-value
Experimental Group 2 872.63 436.31 409.73 < .001
Residuals 132 140.56 1.06 NA NA

Tukey Post-Hoc Test

Tukey’s HSD Post-Hoc Comparisons
Comparison Mean Difference 95% CI Lower 95% CI Upper Adjusted p-value
Nonviolent Game vs. Art Project 0.90 0.38 1.42 < .001
Violent Game vs. Art Project 5.79 5.27 6.30 < .001
Violent Game vs. Nonviolent Game 4.89 4.37 5.40 < .001

Effect Size

Effect Size for the One-Way ANOVA
Effect Size Measure Value
Eta-squared (η²) 0.861

Results

The art-project group had a mean of 4.96 minutes (SD = 1.04), the nonviolent-game group had a mean of 5.86 minutes (SD = 1.06), and the violent-game group had a mean of 10.75 minutes (SD = 1.00).

The ANOVA found a substantion difference among the three groups, F(2, 132) = 409.7, p < .001. The effect size was rather large as well at .861.

Tukey’s HSD comparisons showed pretty significant differences between the nonviolent-game and art-project groups at .90, s well as the violent-game and art project groups at 5.79, and the violent to non-violent game 4.89.

The violent-game group had the highest number of minutes engaged in aggressive acts, followed by the nonviolent-game group and the art-project group. The results show a clear and consistent agreement with my hypothesis that the violent-game group would have higher values than the other groups in the study.

Conclusion

The results showed consistent findings between the experimental groups and the amount of time spent in aggressive acts at reccess. All three groups did, however, differ from each other with the violent group showing the highest mean while the art group saw the lowest mean.

Code Used

# Download and save the dataset
FetchedData <- read.csv("https://github.com/drkblake/Data/raw/refs/heads/main/Priming.csv")

write.csv(FetchedData, "Priming.csv", row.names = FALSE)

rm(FetchedData)

# Load the dataset
Priming <- read.csv("Priming.csv")

head(Priming)
table(Priming$Group)

# Load packages
library(tidyverse)
library(gt)
library(gtExtras)
library(FSA)
library(plotly)

# Prepare the variables
Priming <- Priming %>%
  mutate(
    DV = Value,
    IV = Group
  )

# Descriptive statistics
group_means <- Priming %>%
  group_by(IV) %>%
  summarise(
    N = n(),
    Mean = mean(DV),
    SD = sd(DV),
    .groups = "drop"
  )

group_means

# Graph
Graphic <- ggplot(Priming, aes(x = IV, y = DV, fill = IV)) +
  geom_boxplot() +
  stat_summary(
    fun = mean,
    geom = "point",
    shape = 23,
    size = 3,
    fill = "red"
  ) +
  labs(
    title = "Media Priming and Aggressive Behavior",
    x = "Experimental Group",
    y = "Minutes Engaged in Aggressive Acts"
  ) +
  theme_minimal() +
  theme(legend.position = "none")

Graphic

# Normality tests
normality_results <- Priming %>%
  group_by(IV) %>%
  summarise(
    W = unname(shapiro.test(DV)$statistic),
    p_value = shapiro.test(DV)$p.value,
    .groups = "drop"
  )

normality_results

# One-way ANOVA
ANOVA <- aov(DV ~ IV, data = Priming)

summary(ANOVA)

# Tukey post-hoc test
Tukey_results <- TukeyHSD(ANOVA)

Tukey_results

# Effect size
anova_table <- summary(ANOVA)[[1]]

SS_between <- anova_table["IV", "Sum Sq"]
SS_total <- sum(anova_table[, "Sum Sq"])

eta_squared <- SS_between / SS_total

eta_squared