The response is the length of odontoblasts (cells responsible for tooth growth) in 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, (orange juice or ascorbic acid (a form of vitamin C and coded as VC).
Variables
Len: Tooth lenght
Supp: Supplement Type [VC or OJ]
Dose: Dose in milligrams/day
Assumptions
-The poplulations are independent, the variances between populations are different and a random population was used.
-For the populations to be independent, 60 guinea pigs would have to be used so each combination of dose level and delivery method were not affected by the other methods.
-To ensure double blind research methods are followed, the researchers taking the measurements must have been unaware of which guinea pigs were given which dose level or delivery method.
Graphical Analisys
library(ggplot2)
#ToothGrowth
summary(ToothGrowth)
## len supp dose
## Min. : 4.20 OJ:30 Min. :0.500
## 1st Qu.:13.07 VC:30 1st Qu.:0.500
## Median :19.25 Median :1.000
## Mean :18.81 Mean :1.167
## 3rd Qu.:25.27 3rd Qu.:2.000
## Max. :33.90 Max. :2.000
ggplot(aes(x = supp, y = len), data = ToothGrowth) +
geom_boxplot(aes(fill = supp)) +ggtitle("Length of odontoblast by Supplement")
ggplot(aes(x = factor(dose), y = len), data = ToothGrowth) +
geom_boxplot(aes(fill = factor(dose))) +ggtitle("Length of odontoblast by dose")
ggplot(aes(x = supp, y = len), data = ToothGrowth) +
geom_boxplot(aes(fill = supp)) + facet_wrap(~ dose) +ggtitle("Length of odontoblast by factor and dose")
Numerical Analisis
Generate a numerical analisys of the lenght for each combination of Supplementary and dose.
by(ToothGrowth$len, INDICES = list(ToothGrowth$supp, ToothGrowth$dose), summary)
## : OJ
## : 0.5
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 8.20 9.70 12.25 13.23 16.18 21.50
## --------------------------------------------------------
## : VC
## : 0.5
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.20 5.95 7.15 7.98 10.90 11.50
## --------------------------------------------------------
## : OJ
## : 1
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 14.50 20.30 23.45 22.70 25.65 27.30
## --------------------------------------------------------
## : VC
## : 1
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 13.60 15.27 16.50 16.77 17.30 22.50
## --------------------------------------------------------
## : OJ
## : 2
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 22.40 24.58 25.95 26.06 27.08 30.90
## --------------------------------------------------------
## : VC
## : 2
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 18.50 23.38 25.95 26.14 28.80 33.90
Statistical Analisys
The next section are for analyzing the data correlation between the delivery method (Dosage and Supplement) and the change in tooth grooth.
**Change in Dose* We devide the data into 3 subsets. Each subsets groups two different dose delivery methods.
dose1<-subset(ToothGrowth, dose <= 1.0)
dose2<-subset(ToothGrowth, dose %in% c(0.5,2.0))
dose3<-subset(ToothGrowth, dose >= 1.0)
t.test(len~dose, paired=F, car.equal=F,data=dose1)
##
## Welch Two Sample t-test
##
## data: len by dose
## t = -6.4766, df = 37.986, p-value = 1.268e-07
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -11.983781 -6.276219
## sample estimates:
## mean in group 0.5 mean in group 1
## 10.605 19.735
t.test(len~dose, paired=F, car.equal=F,data=dose2)
##
## Welch Two Sample t-test
##
## data: len by dose
## t = -11.799, df = 36.883, p-value = 4.398e-14
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -18.15617 -12.83383
## sample estimates:
## mean in group 0.5 mean in group 2
## 10.605 26.100
t.test(len~dose, paired=F, car.equal=F,data=dose3)
##
## Welch Two Sample t-test
##
## data: len by dose
## t = -4.9005, df = 37.101, p-value = 1.906e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -8.996481 -3.733519
## sample estimates:
## mean in group 1 mean in group 2
## 19.735 26.100
The confidence intervals ([-11.983781, -6.276219]) for doses 0.5 and 1.0, ([-18.15617, -12.83383]) for doses 0.5 and 2.0, ([-8.996481, -3.733519]) for doses 1.0 and 2.0, allow the rejection of the null hypothesis which is that there is no significant correlation between tooth lenght and the dose level.
Change in Supplement
t.test(len~supp, paired=F, car.equal=F,data=ToothGrowth)
##
## Welch Two Sample t-test
##
## data: len by supp
## t = 1.9153, df = 55.309, p-value = 0.06063
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.1710156 7.5710156
## sample estimates:
## mean in group OJ mean in group VC
## 20.66333 16.96333
The confidence level [(-0.1710156, 7.5710156)] does not allow us to reject the null hypothesis which says that there is no correlation between the tooth lenght and the supplementary delivery method.
Conclusions
1-Supplement type [VC or OJ] has no effect on tooth growth.
2-Increment in Dose in mg/days leads to and increase in the tooth lenght.