#Example 1 # Testing hypothesis about two population variances #Set working directory setwd("~/Dropbox/ISI SCB/Data sets") # read in csv file sh <-read.csv("sheets.csv", TRUE) #1:Machine 1 #2:Machine 2 #assign the list of thickness measures to the variable x #for Machine 1 x <- sh$Thickness[sh$Machine==1] #assign the list of thickness measures to the variable y #for Machine 2 y <- sh$Thickness[sh$Machine==2] #sample variances cbind(var(x), var(y)) # test for equality of variances var.test(x,y) #check for outliers boxplot(x,y) #assess normality assumptions of x and y qqnorm(x, ylab = "x Sample Quantiles") shapiro.test(x) qqnorm(y, ylab = "y Sample Quantiles") shapiro.test(y) # test for equality of variances with 99% C.I. var.test(x,y,conf.level = 0.99)