# create a vector of the data set
meanTimes <- c(15.22, 14.34, 18.12, 12.61, 15.61, 14.22, 19.41, 12.22,
17.12, 14.22, 12.91, 18.12)
# calculate Xbar
Xbar <- mean(meanTimes)
# create a vector for the mean positions
means <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
# create a dataframe for Xbar
XbarDF <- data.frame(t(meanTimes), means)
# create a ggplot of the data frame
ggplot(XbarDF, aes(x = means, y = meanTimes, fill="red")) + geom_bar(
stat="identity", fill="red") + ggtitle("Barplot of Mean Times") +
labs(caption = "This bar plot shows the 12 means given in the problem
statement and their times. The Xbar of this data set is 15.34.")
