a<-c(65,81,57,66,82,82,67,59,75,70,64,71,83,59,65,56,69,74,82,79)
type<-c("1","1","1","1","1","1","1","1","1","1","2","2","2","2","2","2","2","2","2","2")
f<-as.factor(type)
dat<-data.frame(a,f)
library(lawstat)
levene.test(dat$a,dat$f,location = c("mean"))
##
## Classical Levene's test based on the absolute deviations from the mean
## ( none not applied because the location is not set to median )
##
## data: dat$a
## Test Statistic = 0.0014598, p-value = 0.9699
The p value for the levene’s test is 0.9699
type1<-c(65,81,57,66,82,82,67,59,75,70)
type2<-c(64,71,83,59,65,56,69,74,82,79)
boxplot(type1)

boxplot(type2)

boxplot(type1,type2,main="Boxplot for type1 and type2")

From the boxplots we can say that the variences are equal.
Perfroming t test
type1<-c(65,81,57,66,82,82,67,59,75,70)
type2<-c(64,71,83,59,65,56,69,74,82,79)
summary(type1)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 57.00 65.25 68.50 70.40 79.50 82.00
summary(type2)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 56.00 64.25 70.00 70.20 77.75 83.00
t.test(type1,type2,var.equal = TRUE)
##
## Two Sample t-test
##
## data: type1 and type2
## t = 0.048008, df = 18, p-value = 0.9622
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -8.552441 8.952441
## sample estimates:
## mean of x mean of y
## 70.4 70.2
From the test we can say that the means of type1 and type2 are almost equal.
From the t test, p value is 0.9699 which is greater than 0.05. So we fail to reject null hypotheis