5_Capstone_Analysis_Victoria_Baldwin

##Introduction: This purpose of exploring this data set is to determine if time spent per week on the LMS by students can be helpful when attempting to redesign a course. This is data that would be helpful to professors and learning designers so that redesign can be based around real student data and show how students are interacting with the course. The question that this analysis seeks to answer is: how can LMS time data guide course redesign?

library(ggplot2)


data <- read.csv("data/40_students_LMS_time_spent.csv")

head(data)
  Student_ID Week_1 Week_2 Week_3 Week_4 Week_5 Week_6 Week_7 Week_8 Week_9
1  Student_1      6     20     18     17     16     20     20     17      9
2  Student_2     10     11     15     18     19     16     19     20      9
3  Student_3      6     15     14      6     10     15     17     18     20
4  Student_4     14     13     18     17      6     14     20     14     18
5  Student_5     15      9     17     14     11     17      6      9     12
6  Student_6      9      9      9     14      6     11     18     14      6
  Week_10 Week_11 Week_12 Week_13 Week_14 Week_15 Week_16
1      11      18      18       7      19      15      15
2      20      11       9      11       8      18      12
3      14      11      15      14      20      19      19
4      15      17       7      13      20      11      13
5      13      18      12      16       7       6      18
6       7      12       6      11      15      16      13

This data set shows how many hours were spent on the LMS each week, by each individual student. There are 3 main variables of this data set: The student, the week, and the hours spent per week. The students in this data set are provided with a number to keep student data both private and distinct. The hours are logged by the LMS to show how many hours are spent on the platform each week. The week allows the data to be sorted and displayed in a way that allows the user to see the hours spent on the LMS for each distinct week.

##Summary Statistics

summary_data <- summary(data[,])
summary_data 
  Student_ID            Week_1          Week_2          Week_3     
 Length:40          Min.   : 6.00   Min.   : 6.00   Min.   : 6.00  
 Class :character   1st Qu.: 9.00   1st Qu.: 8.00   1st Qu.: 9.75  
 Mode  :character   Median :13.00   Median :10.50   Median :12.50  
                    Mean   :12.32   Mean   :10.75   Mean   :12.53  
                    3rd Qu.:15.00   3rd Qu.:13.00   3rd Qu.:16.00  
                    Max.   :20.00   Max.   :20.00   Max.   :19.00  
     Week_4          Week_5          Week_6          Week_7     
 Min.   : 6.00   Min.   : 6.00   Min.   : 6.00   Min.   : 6.00  
 1st Qu.:12.00   1st Qu.: 8.50   1st Qu.: 9.00   1st Qu.: 8.75  
 Median :14.50   Median :13.50   Median :15.00   Median :14.00  
 Mean   :14.28   Mean   :13.18   Mean   :13.22   Mean   :13.60  
 3rd Qu.:18.00   3rd Qu.:17.00   3rd Qu.:17.00   3rd Qu.:18.25  
 Max.   :20.00   Max.   :20.00   Max.   :20.00   Max.   :20.00  
     Week_8          Week_9         Week_10         Week_11     
 Min.   : 6.00   Min.   : 6.00   Min.   : 6.00   Min.   : 6.00  
 1st Qu.:10.75   1st Qu.:10.00   1st Qu.: 9.00   1st Qu.:10.75  
 Median :13.50   Median :14.00   Median :13.00   Median :14.00  
 Mean   :13.05   Mean   :13.05   Mean   :12.75   Mean   :13.47  
 3rd Qu.:16.00   3rd Qu.:16.00   3rd Qu.:16.00   3rd Qu.:17.00  
 Max.   :20.00   Max.   :20.00   Max.   :20.00   Max.   :20.00  
    Week_12         Week_13         Week_14         Week_15     
 Min.   : 6.00   Min.   : 6.00   Min.   : 6.00   Min.   : 6.00  
 1st Qu.: 8.00   1st Qu.: 9.75   1st Qu.:10.75   1st Qu.:10.75  
 Median :12.00   Median :14.00   Median :14.00   Median :15.00  
 Mean   :12.12   Mean   :12.90   Mean   :13.70   Mean   :13.75  
 3rd Qu.:15.00   3rd Qu.:16.00   3rd Qu.:17.25   3rd Qu.:17.00  
 Max.   :19.00   Max.   :20.00   Max.   :20.00   Max.   :20.00  
    Week_16     
 Min.   : 6.00  
 1st Qu.:10.00  
 Median :15.00  
 Mean   :13.65  
 3rd Qu.:17.00  
 Max.   :20.00  

The purpose of using summary statistics is to take a deeper look at the spread of student time data. Being able to see both the average time and the quartiles allows a better understanding of which weeks are seeing a spike or decrease in overall time spent on the LMS platform. This shows if the spike was caused by an outlier of if the numbers were higher or lower across the board.

##Calculating mean of hours spent each week

week_cols    <- grep("^Week_", names(data), value = TRUE)
average_hours <- colMeans(data[, week_cols])
average_hours
 Week_1  Week_2  Week_3  Week_4  Week_5  Week_6  Week_7  Week_8  Week_9 Week_10 
 12.325  10.750  12.525  14.275  13.175  13.225  13.600  13.050  13.050  12.750 
Week_11 Week_12 Week_13 Week_14 Week_15 Week_16 
 13.475  12.125  12.900  13.700  13.750  13.650 

Bar Plot set up and Bar Plot Code

average_hours_table <- data.frame(
  Week= factor(names(average_hours), levels = names(average_hours)),
  Average_Hours_Spent = average_hours
)
average_hours_table
           Week Average_Hours_Spent
Week_1   Week_1              12.325
Week_2   Week_2              10.750
Week_3   Week_3              12.525
Week_4   Week_4              14.275
Week_5   Week_5              13.175
Week_6   Week_6              13.225
Week_7   Week_7              13.600
Week_8   Week_8              13.050
Week_9   Week_9              13.050
Week_10 Week_10              12.750
Week_11 Week_11              13.475
Week_12 Week_12              12.125
Week_13 Week_13              12.900
Week_14 Week_14              13.700
Week_15 Week_15              13.750
Week_16 Week_16              13.650
ggplot(average_hours_table, aes(x = Week, y = Average_Hours_Spent)) +
  geom_bar(stat = "identity", fill = "Blue", color = "white") +
  labs(
    title = "Average Hours Spent per Week ",
    x = "Semester Week",
    y = "Average Hours"
  ) +
  theme_minimal() +
  theme(
    plot.title  = element_text(size = 12, face = "bold", hjust = 0.5),
    axis.text.x = element_text(angle = 45, hjust = 1)
  )

This graph shows that most weeks students spent around 13 hours on the LMS platform. The weeks that show the largest variance in time are weeks 2, 4 and 12. Weeks 2 and 12 are below that 15 hours average which suggests that content may be less engaging those weeks.This may suggest that the designer or professor may need to revise this week to include more interactive components within that week. Week 4 shows that students spent more time on the LMS by an average of 2 hours. This suggests that this week may need to be revised to ensure that directions and activities are clear and that there is an appropriate amount of material for a single week. This graph allows for the user to get a general idea of the time students are spending per week. This is not the most precise way to analyze the average time spent.

Trend Line Graph Set up

ggplot(average_hours_table, aes(x = Week, y = Average_Hours_Spent, group = 1)) +
  geom_line(color = "Black", linewidth = 1.0) +
  geom_point(color = "Blue", size = 3) +
  labs(
    title = "Trend of Average Hours Spent per Week",
    x = "Semester Week",
    y = "Average Hours"
  ) +
  theme_minimal() +
  theme(
    plot.title  = element_text(size = 16, face = "bold", hjust = 0.5),
    axis.text.x = element_text(angle = 45, hjust = 1)
  )

This trend line is in my opinion the most helpful visualization within this analysis. This graph allows the instructor or designer to see a more precise picture of exactly what the average time spent per week is. This allows a clear comparison between week two, which is almost 2 full hours less than week one and three. This also shows that students on average spent less time on week 12. Students spent just over 12 hours on this week while spending 13.5 hours on week 11 and just under 13 hours on week 13. This shows that these weeks may need to be redesigned to be more engaging and include more interactive components. This graph also shows that students spent on average around 14.25 hours on week 4 which is between 1 and 2 more hours than other weeks. This suggests that this week may need to be redesigned to be less interactive and may need some clarification in directions.

Findings summary

To answer the question of can student time spent on LMS guide redesign, this data set shows that a few key weeks may need to be redesigned based on the average time spent by students on that week. In this analysis, summary statistics were taken from each week looking at the mean, median,1st and 3rd quartiles,minimums, and maximum. Visualizations were also completed to look at each week’s average in the form of line graph and a bar graph. The analysis reveals that weeks 2 and 4 may need to be redesigned based on their deviation from the average time spent on the LMS, with week 2 needing more engagement and week 4 possibly needing less or clarification on instructions or less material.