linkScores <- read.csv("linkScores.csv")
library(dplyr)
##
## 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
mean_time <- linkScores %>%
group_by(Link) %>%
summarise(mean_time = mean(Time))
print("Mean time for internal and external links")
## [1] "Mean time for internal and external links"
print(mean_time)
## # A tibble: 2 × 2
## Link mean_time
## <chr> <dbl>
## 1 external 65.8
## 2 internal 44.2
mean_difficulty <- linkScores %>%
group_by(Link) %>%
summarise(mean_difficulty = mean(Difficulty))
print("Mean difficulty for internal and external links")
## [1] "Mean difficulty for internal and external links"
print(mean_difficulty)
## # A tibble: 2 × 2
## Link mean_difficulty
## <chr> <dbl>
## 1 external 3
## 2 internal 2.4
# Perform a two-sample t-test for Time
time_t_test <- t.test(Time ~ Link, data = linkScores, var.equal = TRUE)
print("Two-Sample t-Test for Time:")
## [1] "Two-Sample t-Test for Time:"
print(time_t_test)
##
## Two Sample t-test
##
## data: Time by Link
## t = 2.5302, df = 8, p-value = 0.03525
## alternative hypothesis: true difference in means between group external and group internal is not equal to 0
## 95 percent confidence interval:
## 1.914019 41.293981
## sample estimates:
## mean in group external mean in group internal
## 65.776 44.172
# Perform a two-sample t-test for Difficulty
difficulty_t_test <- t.test(Difficulty ~ Link, data = linkScores, var.equal = TRUE)
print("Two-Sample t-Test for Difficulty:")
## [1] "Two-Sample t-Test for Difficulty:"
print(difficulty_t_test)
##
## Two Sample t-test
##
## data: Difficulty by Link
## t = 0.88465, df = 8, p-value = 0.4021
## alternative hypothesis: true difference in means between group external and group internal is not equal to 0
## 95 percent confidence interval:
## -0.9640081 2.1640081
## sample estimates:
## mean in group external mean in group internal
## 3.0 2.4