#It's not necessary to read in the full data set attend=c(rep("Attended",63),rep("NotAttend",47)) rating=c(4.8,6.4,6.3,6.0,5.4,5.8,6.1,6.3,5.0,6.2,5.6,5.0,6.4,5.8,5.5, 6.1,6.0,6.0,5.4,5.8,6.5,6.0,6.1,4.7,5.6,6.1,5.8,4.8,5.9,5.4, 5.3,6.0,5.6,6.3,5.2,6.0,6.4,5.8,4.9,4.1,6.0,6.4,5.9,6.6,6.0, 4.4,5.9,6.5,4.9,5.4,5.8,5.6,6.2,6.3,5.8,5.9,6.5,5.4,5.9,6.1, 6.6,4.7,5.5,5.0,5.5,5.7,4.3,4.9,3.4,5.1,4.8,5.0,5.5,5.7,5.0, 5.2,4.2,5.7,5.9,5.8,4.2,5.7,4.8,4.6,5.0,4.9,6.3,5.6,5.7,5.1, 5.8,3.8,5.0,6.1,4.4,3.9,6.3,6.3,4.8,6.1,5.3,5.1,5.5,5.9,5.5, 6.0,5.4,5.9,5.5,6.0) #Logical subset for the attended cases rating=rating[attend=="Attended"] #EDA par(mfrow=c(1,2)) hist(rating,col = "pink",probability=TRUE,xlab="Rating",main="") lines(density(rating),col="red",lwd=2) boxplot(rating, horizontal=FALSE, outline=TRUE,col = "green1") #CI by way of a t-test command t.test(rating,alternative="two-sided",conf.level=0.90)