Introduction

Vitamin C is a vitamin we need for our teeth to grow and develop. The proposed hypothesis is that ascorbic acid has a greater impact on tooth growth than orange juice. The two liquids rich with vitamin C were administered to 60 guinea pigs. After a certain amount of time passed, the guinea pigs’ teeth were measured to find out the results.

We are using the “ToothGrowth” dataset. In this experiment guinea pigs were given two different ways to consume vitamin C, orange juice and ascorbic acid (30 guinea pigs for each supplement), and in different doses (0.5, 1,and 2 mg/day, 10 in each dose per supplement group). Overall, three variables are being measured (length of teeth, type of supplement, and amount of administered supplement).

Methods

We are conducting a two-sample t-test to determine which method orange juice or ascorbic acid produced a greater length of teeth. Our calculations (detailed below), were made using R. The null hypothesis is that the mean length of teeth is equal between the guinea pigs who were administered orange juice and ascorbic acid. The alternative hypothesis is that guinea pigs who were aministered ascorbic acid have greater teeth length than the guinea pigs who were administered orange juice. The formulas below are what we will be using to conduct the two-sample t-test, to find our test stat, and find our p-value. We selected our significance level, alpha, to be at .05.

Results

Our 2-sample T-test calculation resulted in a p-value of .97.

Conclusion

Since our p-value (.97) is larger than our selected significance test (.05), we failed to reject our null hypothesis and the alternative hypothesis is rejected. In terms of our study, the mean length of teeth from guinea pigs who were administered ascorbic acid supplement is not longer than that of the guinea pigs who were administered orange juice. There is insufficient evidence to suggest that the average teeth growth by orange juice supplement is less than the average teeth growth by ascorbic acid supplements. To give a more specific result on this test, we would need to do a more sophisticated experiment (using a larger sample size or separate tests for different dosages).

Appendix and Calculations

# Ho: μX = μy
# Ha: μX < μy
# Alpha = 0.05
# Test Stat = xbar-ybar-0/spooled sqrt(1/n+1/m)
# spooled = sqrt(((n-1)sx^2+(m-1)sy^2)/n+m-2)

x <- subset(ToothGrowth, supp=="OJ")
y <- subset(ToothGrowth, supp=="VC")

n<-nrow(x) # # of guinea pigs taking orange juice
m<-nrow(y) # # of guinea pigs taking ascorbic acid

xbar<-mean(x$len) #Mean length of teeth with orange juice supplement
ybar<-mean(y$len) #Mean length of teeth with ascorbic acid supplement

MyMean<- xbar - ybar

stdevx <- sqrt(var(x$len)) # Standard deviation of "x" Data 
stdevy <- sqrt(var(y$len)) # Standard deviation of "y" Data

VarX<- var(x$len) # Variance of X
VarY<- var(y$len) # Variance of Y

x <- subset(ToothGrowth, supp=="OJ")
y <- subset(ToothGrowth, supp=="VC")
n <- nrow(x)
m <- nrow(y)
spooled <- sqrt(((n-1)*(VarX)+(m-1)*(VarY))/(n+m-2))
nullhyp <- 0
teststat <- (MyMean-nullhyp)/(spooled*sqrt((1/n)+(1/m)))
teststat
## [1] 1.915268
pval <- (pt(teststat, df=(n+m-2), lower.tail=TRUE))
pval 
## [1] 0.9698033