Overview

We will explore the toothgrowth data and look for statistically significant effects of vitamin C on guinea pig odonotblasts, the cells responsible for tooth growth. The data will be examined by dose and by method of in which vitamin C is administered.

A look at the data

data("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

From figure 1, we can see that as the dose of vitamin C gets larger, the length of the odontoblasts grows larger. This can be seen by the shift to the right of the lines in the histogram. Also, the increased count, i.e. increased height of the histogram lines indicates that vitamin C may increase the number of long odontoblasts. What is not immediately clear from this graph is what effect the method of administration of the does has on odontoblast length. VC refers to administration of ascorbic acid and OJ refers to administration by orange juice.

OJ v. Ascorbic Acid Without Regard to Dose Size

VC <- subset(ToothGrowth, supp == "VC")
OJ <- subset(ToothGrowth, supp == "OJ")
t.test(OJ$len, VC$len, var.equal = FALSE, paired = FALSE)$p.value
## [1] 0.06063451

We are assuming that the samples of the data (VC and OJ) are normally distributed random samples with a mean and a standard deviation. Despite the fact that \(n=30\) is probably large enough to perform a \(Z\) test, we will be conservative and use a Student-T test with a significance level \(\alpha = .05\). We will make the conservative assumption that the variances are not equal. Since each guinea pig received a separate treatment, we assume they are independent samples (not paired). From the p-value we CANNOT reject the null hypothesis that the mean odontoblast length from group administered vitamin C via orange juice versus the group administered ascorbic acid is different. So we cannot be certain that method of administration affect odontoblast length in the absence of dose size.

Analysis of Dose Without Regard to Method of Administration

dose1 <- subset(ToothGrowth, dose == "0.5"); dose2 <- subset(ToothGrowth, dose == "1")
dose3 <- subset(ToothGrowth, dose == "2")
DosePvals <- data.frame(t.test(dose1$len, dose2$len, var.equal = FALSE, paired = FALSE)$p.value, 
                    t.test(dose2$len, dose3$len, var.equal = FALSE, paired = FALSE)$p.value,
                    t.test(dose1$len, dose3$len, var.equal = FALSE, paired = FALSE)$p.value)
names(DosePvals) <- c("D1vD2", "D2vD3", "D1vD3")
DosePvals
##          D1vD2       D2vD3        D1vD3
## 1 1.268301e-07 1.90643e-05 4.397525e-14

These are p-values for hypothesis tests that mean odontoblast length for Dose 1 is different from Dose 2, Dose 2 is different from Dose 3 and Dose 1 is different from Dose 3. As before, we assume these are normally distributed random samples with a mean and standard deviation for each of the respective doses. We use a Student-T test with unequal variance, \(n\) is even smaller in this analysis so the Student-T is also appropriate. The p-values are very small, so in all three cases we can reject at \(\alpha = .05\). However, by taking a closer look we can see that there is certainly a difference between Dose 1 v. Dose 2 and Dose 2 v. Dose 3, the smallest p-value by far is between Dose 1 and Dose 3. This suggests that there is a strong relationship between the length of odontoblasts and the dose of vitamin C.

Analyis by Dose Size and Administration Method

dose1OJ <- subset(dose1, supp=="OJ"); dose2OJ <- subset(dose2, supp=="OJ");
dose3OJ <- subset(dose3, supp=="OJ"); dose1VC <- subset(dose1, supp=="VC"); 
dose2VC <- subset(dose2, supp=="VC"); dose3VC <- subset(dose3, supp=="VC")
pvals <- data.frame(t.test(dose1OJ$len, dose1VC$len, var.equal = FALSE, paired = FALSE)$p.value, 
                    t.test(dose2OJ$len, dose2VC$len, var.equal = FALSE, paired = FALSE)$p.value, 
                    t.test(dose3OJ$len, dose3VC$len, var.equal = FALSE, paired = FALSE)$p.value)
names(pvals) <- c("Dose1", "Dose2", "Dose3")
pvals
##         Dose1       Dose2     Dose3
## 1 0.006358607 0.001038376 0.9638516

We have now broken the data down into sets by dose size and by administration method. Again, we assume that the data is a normally distributed random sample with a mean and standard deviation. We employ a Student-T test with unequal variance. From this analysis we see that in Dose 1 and Dose 2 the p-value is significant. This test suggests there is a difference between the mean odontoblast length for ascorbic acid versus orange juice for doses 1 and 2. However, for Dose 3 we CANNOT reject the null hypothesis that there is a difference. This could suggest that at a large enough dose the administration method no longer matters.

Conclusions

Overall, vitamin C has a clear and significant effect on the odontoblast cell length of Guinea pigs. That difference correlates strongly to the dose of vitamin C administered. It also appears that at lower doses, ascorbic acid has a stronger effect than orange juice as an administration method.

Appendix

Code chunk for Figure 1

library(ggplot2) 
g <- ggplot(ToothGrowth, aes(x = len, fill = supp)) + geom_histogram(binwidth = .5)
g <- g + facet_grid(. ~ dose) + labs(title = "Figure 1: Histogram of Odontoblast Length by Dose")
g