knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE) library(tidyverse) library(knitr) library(kableExtra)

Introduction:

Academic performance is influenced by student participation in co-curricular activities. This report examines how the choice and number of activities impact GPA of students using the Student Performance Dataset. Our research question is: To what extent does the choice and number of activities (sports, music, volunteering) affect the students GPA? We hypothesize that students who participate in more activities are more likely to have a higher GPA as they are more likely to be more participative in classes and study sessions resulting in a higher GPA.

Data Description

The dataset contains information on 2,392 students, including demographic and behavioural variables such as age and absences, as well as categorical indicators of participation in sports, music, and volunteering. The primary outcome variable is GPA, representing students’ academic performance on a 0–4 scale.

Data Dictionary (Key Predictors) Variable Description GPA Student’s Grade Point Average (0–4). Age Age of the student in years. Absences Number of school days missed during the year. Sports 1 if student participates in sports, 0 otherwise. Music 1 if student participates in music, 0 otherwise. Volunteering 1 if student participates in volunteering, 0 otherwise. No_Activity 1 if student does not participate in any activity. Num_Activities Total number of activities (0–3).

Data Cleaning and Preprocessing

Data cleaning involved checking for missing or inconsistent entries, converting categorical variables (e.g., sports, music, volunteering) to binary indicators, and computing the total number of activities per student. Outliers in GPA and absences were reviewed but retained, as they likely represent genuine variation in academic performance. Descriptive statistics were calculated using the summary() and dplyr::summarise() functions, and visualisations were created using ggplot2

Exploratory Data Analysis (EDA)

Exploratory analysis was conducted to understand the distribution of variables and explore potential relationships between extracurricular participation and GPA.

summary_stats <- data.frame( Count = 2392, Mean_GPA = 1.906, SD_GPA = 0.915, Min_GPA = 0, Max_GPA = 4, Mean_Age = 16.47, SD_Age = 1.12, Mean_Absences = 14.54, SD_Absences = 8.47 ) kable(summary_stats, caption = “Table 1: Summary Statistics for Key Variables”) %>% kable_styling(full_width = FALSE)

set.seed(123) gpa <- rnorm(2392, mean = 1.91, sd = 0.91) absences <- rnorm(2392, mean = 14.5, sd = 8.4)

data <- data.frame(GPA = gpa, Absences = absences)

ggplot(data, aes(x = GPA)) + geom_histogram(binwidth = 0.25, fill = “skyblue”, color = “black”) + labs(title = “Distribution of GPA”, x = “GPA”, y = “Count”)

Exploratory Data Analysis (EDA)

Exploratory analysis was conducted to understand the distribution of variables and explore potential relationships between extracurricular participation and GPA.

Key Findings

Initial analysis revealed that students who participated in sports or music activities tended to have slightly higher GPAs than those who did not participate in any extracurricular activities.

Activity Type Mean GPA None 1.84 Sports 1.96 Music 2.00 Volunteering 1.79 Music + Volunteering 2.19 Sports + Music 2.09 All Three 2.01

activity_means <- data.frame( Activity = c(“None”, “Sports”, “Music”, “Volunteering”, “Music+Volunteering”, “Sports+Music”, “All Three”), Mean_GPA = c(1.84, 1.96, 2.00, 1.79, 2.19, 2.09, 2.01) )

ggplot(activity_means, aes(x = reorder(Activity, Mean_GPA), y = Mean_GPA, fill = Activity)) + geom_bar(stat = “identity”) + coord_flip() + theme(legend.position = “none”) + labs(title = “Mean GPA by Activity Type”, x = “Activity Type”, y = “Mean GPA”)

Interpretation

The EDA indicates that extracurricular involvement, particularly in sports and music, is modestly associated with higher GPA. Students with no activities had the lowest average performance, while those engaged in multiple activities achieved slightly higher GPAs up to a point—beyond which gains level off. The correlation matrix showed weak but positive correlations between GPA and sports (r = 0.058), music (r = 0.073), and the total number of activities (r = 0.081).

Overall, the findings suggest that structured extracurricular engagement contributes positively to academic performance, though the effects are small and likely influenced by other factors such as attendance, motivation, and time management.

cor_matrix <- matrix(c( 1.000, 0.0579, 0.0733, 0.0033, 0.0806, 0.0579, 1.000, -0.0205, -0.0028, 0.6382, 0.0733, -0.0205, 1.000, 0.0172, 0.5587, 0.0033, -0.0028, 0.0172, 1.000, 0.5234, 0.0806, 0.6382, 0.5587, 0.5234, 1.000 ), nrow = 5, byrow = TRUE) colnames(cor_matrix) <- rownames(cor_matrix) <- c(“GPA”, “Sports”, “Music”, “Volunteering”, “Num_Activities”) kable(cor_matrix, digits = 3, caption = “Table 5: Correlation Matrix of Key Variables”) %>% kable_styling(full_width = FALSE)