# An analysis of the random and convenience sampling data convenience <- c(2.2, 1.6, 0.8, 1.8, 1.4, 0.4, 0.6, 1.5, 0.5) random <- c(0.3, 0.0, 0.6, 0.0, -0.3, 0.2) treatment <- c(rep('convenience',length(convenience)),rep('random',length(random))) samplingdata <- data.frame(treatment,c(convenience,random)) names(samplingdata) <- c("Sampling.Method","Estimate") samplingdata$Sampling.Method <- as.factor(samplingdata$Sampling.Method) boxplot(Estimate ~ Sampling.Method, data=samplingdata ,main="Comparison of Sampling Methods")