How does tooth growth compare in Guinea Pigs given different delivery methods of vitamin C and different dosages.
data("ToothGrowth")
names(ToothGrowth)
## [1] "len" "supp" "dose"
head(ToothGrowth)
## len supp dose
## 1 4.2 VC 0.5
## 2 11.5 VC 0.5
## 3 7.3 VC 0.5
## 4 5.8 VC 0.5
## 5 6.4 VC 0.5
## 6 10.0 VC 0.5
table(ToothGrowth$supp)
##
## OJ VC
## 30 30
table(ToothGrowth$dose)
##
## 0.5 1 2
## 20 20 20
plot(ToothGrowth$len , ToothGrowth$dose)
aggregate(x = ToothGrowth[,1], by = list(ToothGrowth$supp), FUN = mean)
## Group.1 x
## 1 OJ 20.66333
## 2 VC 16.96333
aggregate(x = ToothGrowth[,1], by = list(ToothGrowth$dose), FUN = mean)
## Group.1 x
## 1 0.5 10.605
## 2 1.0 19.735
## 3 2.0 26.100
30 of the Guinea Pigs were given ascorbic acid and 30 were given orange juice. Each doseage of 0.5, 1.0, and 2.0 had 20 Guinea Pigs. On average, Guinea Pigs that received OJ had more tooth growth. On average, Guinea Pigs that received a higher doseage had more tooth growth.
The distribution of type of supplemant and the doseage amount was done randomly. This allows for the use of T-tests. There is no relationship between the guinea pigs of different categories, so we will not used a paired T-test. All variables and subcatagories were given same number of Guinea Pigs.
t.test(ToothGrowth$len[which(ToothGrowth$supp == "VC")], ToothGrowth$len[which(ToothGrowth$supp != "VC")], paired = FALSE)
##
## Welch Two Sample t-test
##
## data: ToothGrowth$len[which(ToothGrowth$supp == "VC")] and ToothGrowth$len[which(ToothGrowth$supp != "VC")]
## 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:
## -7.5710156 0.1710156
## sample estimates:
## mean of x mean of y
## 16.96333 20.66333
The results of this t-test indicate that the means of the length of teeth growth between those guinea pigs that received ascorbic acid vs orange juice are equal given 95% confidence. The p-value is above the 5% threshold.
t.test(ToothGrowth$len[which(ToothGrowth$dose == 1)], ToothGrowth$len[which(ToothGrowth$dose == 2)], paired = FALSE)
##
## Welch Two Sample t-test
##
## data: ToothGrowth$len[which(ToothGrowth$dose == 1)] and ToothGrowth$len[which(ToothGrowth$dose == 2)]
## 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 of x mean of y
## 19.735 26.100
The results of this t-test indicate that the means of the guinea pigs that received 1mg of doseage vs 2mg of doseage are not equal. The P-value is far too low for us to fail to reject the null hypothesis. We must reject the null hypothesis.
In conclusion, we can determine that given a 95% confidence interval, the type of doseage yields the same in terms of length of tooth growth. We can also conclude that the amount of doseage given does matter, and that a higher doseage will result in longer tooth length.