#Analysis of the Problem Time data library(tidyverse) library(dplyr) library(ggplot2) #Read in the data problem = read.csv("problem_time.csv", col.names = c("problem.number", "platform", "platform.order", "first.point", "total.steps", "solved", "time")) problem$solved solved.problems = problem[which(problem$solved == "Y"),] ############################# #Question 1: How does platform affect total time to completion? ############################# with(problem, plot(platform, time)) db.time.anova <- aov(time ~ platform, data = problem) summary(db.time.anova) with(solved.problems, plot(platform,time, xlab = "Platform", ylab = "Time to Solve", main = "Time to Solve Across Platforms")) solved.db.time.anova <- aov(time ~ platform, data = problem) summary(solved.db.time.anova) solved.problems %>% ggplot( aes(platform, y=time)) + geom_boxplot() + geom_jitter(color="black", size=1.5, alpha=0.9, width = 0.1) + ggtitle("Time to Complete by Platform") + xlab("Platform") + ylab("Time (Hrs)") #What about steps? with(problem, plot(platform, total.steps)) db.steps.anova <- aov(total.steps ~ platform, data = problem) summary(db.steps.anova) with(solved.problems, plot(platform, total.steps, xlab = "Platform", ylab = "Number of Steps", main = "Number of Steps Across Platforms")) solved.db.steps.anova <- aov(total.steps ~ platform, data = solved.problems) summary(solved.db.steps.anova) solved.problems %>% ggplot( aes(platform, y=total.steps)) + geom_boxplot() + geom_jitter(color="black", size=1.5, alpha=0.9, width = 0.1) + ggtitle("Access Points to Complete by Platform") + xlab("Platform") + ylab("Access Points") #Question 2: Does knowledge acquired in the first search affect time in subsequent platforms? problem$platform.order = as.factor(problem$platform.order) solved.problems$platform.order = as.factor(solved.problems$platform.order) solved.problems %>% ggplot( aes(platform.order, y=time)) + geom_boxplot() + geom_jitter(color="black", size=1.5, alpha=0.9, width = 0.1) + ggtitle("Time to Complete by Platform Order of Attempt") + xlab("Platform Order of Attempt") + ylab("Time (Hrs)") solved.dborder.time.anova <- aov(time ~ platform.order, data = solved.problems) summary(solved.dborder.time.anova) #Question 3: Does initial access point type affect anything? summary(solved.problems$first.point) firstpoint.time.anova <- aov(time ~ first.point, data = solved.problems) summary(firstpoint.time.anova) with(solved.problems, plot(first.point, time, xlab = "First access point type", ylab = "Time to Complete", main = "Time to complete based on platform type")) firstpoint.steps.anova <- aov(total.steps ~ first.point, data = solved.problems) summary(firstpoint.steps.anova) with(solved.problems, plot(first.point, total.steps, xlab = "First access point type", ylab = "Total Steps", main = "Time to complete based on platform type")) solved.problems %>% ggplot( aes(x = first.point, y=time)) + geom_boxplot() + geom_jitter(color="black", size=1.5, alpha=0.9, width = 0.1) + ggtitle("Time to Complete by First Access Point Type") + xlab("First Access Point Type") + ylab("Time (Hrs)") solved.problems %>% ggplot( aes(x = first.point, y=total.steps)) + geom_boxplot() + geom_jitter(color="black", size=1.5, alpha=0.9, width = 0.1) + ggtitle("Access Points to Complete by First Access Point Type") + xlab("First access point Type") + ylab("Total Steps") #Are Problem numbers different?