data <- c(366,327,274,292,274,230,301,315,285,299,320,249)
summary(data)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   230.0   274.0   295.5   294.3   316.2   366.0
(316.2-274)
## [1] 42.2
boxplot(data, horizontal = 1, main = "choleserol", xlab = "serum cholesterol(mg/dl")

hist(data, xlab = "serum cholesterol (mg/dl)")

toothSe <- c(140.2, 133.3, 135.3, 127.8, 108.7, 146.2, 131.2, 145.5, 163.2, 136.6, 112.6, 140.5)
liverSe <- c(6.2, 6.8, 7.9, 8.0, 9.3, 10, 10.6, 11.0, 12.4, 14.5, 15.3, 22.1)
plot(toothSe, liverSe, main = "Toothe Selenium vs Liver Selenium", xlab = "Tooth Seenium", ylab = "Liver Selenium (ug/g)") #order for the scatterplot x, y

fit <-lm(liverSe~toothSe) #order for the lm is (y-x)
fit
## 
## Call:
## lm(formula = liverSe ~ toothSe)
## 
## Coefficients:
## (Intercept)      toothSe  
##     8.44850      0.02018