exam_scores <- c(57, 66,69, 71, 72, 73, 74, 77, 78, 78, 79, 79, 81, 81, 82, 83, 83, 88, 89, 94)
# Summary
summary(exam_scores)## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 72.75 78.50 77.70 82.25 94.00
#Mean
mean(exam_scores)## [1] 77.7
#IQR
IQR(exam_scores)## [1] 9.5
#Standard Distribution
sd(exam_scores)## [1] 8.442374
boxplot(exam_scores)library(ggplot2)
scoredf <- data.frame(exam_scores)
ggplot(scoredf, aes("", scoredf$exam_scores))+
geom_boxplot()+
theme_bw()treatment_total <- 69
treatment_survived <- 69-45
control_total <- 34
control_survived <- 4
treatment_survived_prop <- (69-45)/69
treatment_survived_prop## [1] 0.3478261
control_survived_prop <- 4/34
control_survived_prop## [1] 0.1176471
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.