data <- read.csv("storyboard.csv")
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.4.2
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.4.2
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
data <- data %>%
  mutate(
    `NASA.TLX` = as.numeric(as.character(`NASA.TLX`)),
    `Mental.Demand` = as.numeric(as.character(`Mental.Demand`)),
    `Physical.Demand` = as.numeric(as.character(`Mental.Demand`)),
    `Temporal.Demand` = as.numeric(as.character(`Mental.Demand`)),
    `Performance` = as.numeric(as.character(`Performance`)),
    `Effort` = as.numeric(as.character(`Effort`)),
    `Frustration` = as.numeric(as.character(`Frustration`)))

We chose to run Spearman’s Rank Corelation given the limited sample size and the possibility that some TLX subscales might not be perfectly continuous or normally distributed. Spearman appeared to be a robust nonparametric alternative to Pearson’s in order for us to compare Success Score with aggregate NASA TLX and with each subscale.

# Spearman correlation between SS and aggregate NASA TLX score
cor.test(data$SS, data$`NASA.TLX`, method = "spearman")
## Warning in cor.test.default(data$SS, data$NASA.TLX, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$NASA.TLX
## S = 61.564, p-value = 0.08014
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.7589709
# Spearman correlation between SS and each TLX subscale
cor.test(data$SS, data$`Mental.Demand`, method="spearman")
## Warning in cor.test.default(data$SS, data$Mental.Demand, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Mental.Demand
## S = 54.697, p-value = 0.245
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.5627749
cor.test(data$SS, data$`Physical.Demand`, method="spearman")
## Warning in cor.test.default(data$SS, data$Physical.Demand, method =
## "spearman"): Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Physical.Demand
## S = 54.697, p-value = 0.245
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.5627749
cor.test(data$SS, data$`Temporal.Demand`, method="spearman")
## Warning in cor.test.default(data$SS, data$Temporal.Demand, method =
## "spearman"): Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Temporal.Demand
## S = 54.697, p-value = 0.245
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.5627749
cor.test(data$SS, data$`Performance`, method="spearman")
## Warning in cor.test.default(data$SS, data$Performance, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Performance
## S = 48.131, p-value = 0.4636
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.3751832
cor.test(data$SS, data$`Effort`, method="spearman")
## Warning in cor.test.default(data$SS, data$Effort, method = "spearman"): Cannot
## compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Effort
## S = 57.64, p-value = 0.1651
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.6468432
cor.test(data$SS, data$`Frustration`, method="spearman")
## Warning in cor.test.default(data$SS, data$Frustration, method = "spearman"):
## Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Frustration
## S = 40.313, p-value = 0.7741
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.1517942
# Create a correlation matrix for all related variables
tlx_vars <- data[, c("SS", "NASA.TLX", "Mental.Demand", "Physical.Demand", 
                       "Temporal.Demand", "Performance", "Effort", "Frustration")]

# Full Spearman correlation matrix for the TLX variables and SS
corr_matrix <- cor(tlx_vars, use="complete.obs", method="spearman")
print(corr_matrix)
##                         SS   NASA.TLX Mental.Demand Physical.Demand
## SS               1.0000000 -0.7589709    -0.5627749      -0.5627749
## NASA.TLX        -0.7589709  1.0000000     0.6179144       0.6179144
## Mental.Demand   -0.5627749  0.6179144     1.0000000       1.0000000
## Physical.Demand -0.5627749  0.6179144     1.0000000       1.0000000
## Temporal.Demand -0.5627749  0.6179144     1.0000000       1.0000000
## Performance     -0.3751832  0.4413674    -0.3181818      -0.3181818
## Effort          -0.6468432  0.7247138     0.9404033       0.9404033
## Frustration     -0.1517942  0.4857143     0.0000000       0.0000000
##                 Temporal.Demand Performance      Effort Frustration
## SS                   -0.5627749 -0.37518324 -0.64684316  -0.1517942
## NASA.TLX              0.6179144  0.44136741  0.72471379   0.4857143
## Mental.Demand         1.0000000 -0.31818182  0.94040326   0.0000000
## Physical.Demand       1.0000000 -0.31818182  0.94040326   0.0000000
## Temporal.Demand       1.0000000 -0.31818182  0.94040326   0.0000000
## Performance          -0.3181818  1.00000000 -0.08956222   0.5296409
## Effort                0.9404033 -0.08956222  1.00000000  -0.0579771
## Frustration           0.0000000  0.52964090 -0.05797710   1.0000000

The correlation between the Success Score (SS) and aggregate NASA TLX score (NASA.TLX) is –0.759, which indicates a strong negative association—meaning as NASA TLX (overall workload) increases, the Success Score (SS) tends to decrease.

cor_test <- cor.test(data$`NASA.TLX`, data$SS, method="spearman")
## Warning in cor.test.default(data$NASA.TLX, data$SS, method = "spearman"):
## Cannot compute exact p-value with ties
cor_val <- round(cor_test$estimate, 2)
p_val <- round(cor_test$p.value, 3)

ggplot(data, aes(x=`NASA.TLX`, y=SS)) +
  geom_point() +
  geom_smooth(method="lm", se=FALSE, color="red", linetype="dashed") +
  labs(title="NASA TLX vs. Success Score", x="Aggregated NASA TLX Score", y="Success Score (SS)")+
    annotate("text", 
           x=Inf, y=Inf, 
           label=paste("Spearman's rho =", cor_val, "\np =", p_val),
           hjust=1.1, vjust=1.1,
           size=4,
           color="red")
## `geom_smooth()` using formula = 'y ~ x'

#Checking for normality
#Distribution for NASA.TLX
hist(data$NASA.TLX, main = "Histogram of NASA.TLX Scores", xlab = "NASA.TLX")

#For Comp_Time
hist(data$Time_Comp, main = "Histogram of Completion Time", xlab = "Time to Completion")

As we thought, it’s far too small a sample to have even a visual check for normality, thus continue using Spearman’s.

# Run Spearman's rank correlation between NASA TLX score and time to completion
cor_test_result <- cor.test(data$NASA.TLX, data$Time_Comp, method = "spearman")
## Warning in cor.test.default(data$NASA.TLX, data$Time_Comp, method =
## "spearman"): Cannot compute exact p-value with ties
# Print the result
print(cor_test_result)
## 
##  Spearman's rank correlation rho
## 
## data:  data$NASA.TLX and data$Time_Comp
## S = 23.119, p-value = 0.5104
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.3394674
cor_test_result2 <- cor.test(data$SS, data$Time_Comp, method = "spearman")
## Warning in cor.test.default(data$SS, data$Time_Comp, method = "spearman"):
## Cannot compute exact p-value with ties
print(cor_test_result2)
## 
##  Spearman's rank correlation rho
## 
## data:  data$SS and data$Time_Comp
## S = 57.954, p-value = 0.1573
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.6558258