This projects demonstrates the difference in the tooth growth of ginie pigs per dose of Vitamin c with each supplement, Vitamin C(VC) pill, and Orange Juice(OJ). According to the data, supplementing Vitamin C directly shows the significant contritution to tooth growth compared to Orange Juice when the dose is from 0.5 to 1. But when the dose is 2, it shows no significant difference. To prove how the difference is significant, I used the t.test with two assumptions, variance is equal, and not equal.
Here is the summary of data set
Dt <- ToothGrowth
summary(Dt)
## 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
T is for Var.equal = TRUE, and F is for Var.equal = FALSE
VCOCP5 <- filter(Dt, supp == "VC" & dose == 0.5 | supp == "OJ" & dose == 0.5)
t.test1F <- t.test(len~supp, var.equal = FALSE, data = VCOCP5)
t.test1T <- t.test(len~supp, var.equal = TRUE, data = VCOCP5)
VCOC1 <- filter(Dt, supp == "VC" & dose == 1 | supp == "OJ" & dose == 1)
t.test2F <- t.test(len~supp, var.equal = FALSE, data = VCOC1)
t.test2T <- t.test(len~supp, var.equal = TRUE, data = VCOC1)
VCOC2 <- filter(Dt, supp == "VC" & dose == 2 | supp == "OJ" & dose == 2)
t.test3F <- t.test(len~supp, var.equal = FALSE, data = VCOC2)
t.test3T <- t.test(len~supp, var.equal = TRUE, data = VCOC2)
Here is the table for t.test. As you see, the difference is significant when the dose is from 0.5 to 1, but not siginficant when the dose is 2.
## Test Var.F Var.T
## 1 VCOCP5 0.00636 0.00530
## 2 VCOC1 0.00104 0.00078
## 3 VCOC2 0.96385 0.96371
As you see in both tables, when dose goes from 1 to 2, there is no significant growth of tooth regardless any supplement.
## Test1 Var.F Var.T
## 1 VC .5 TO 1 0.00636 0.00530
## 2 VC .5 TO 2 0.00104 0.00078
## 3 VC 1 TO 2 0.96385 0.96371
## Test2 Var.F Var.T
## 1 OJ .5 TO 1 0.00636 0.00530
## 2 OJ .5 TO 2 0.00104 0.00078
## 3 OJ 1 TO 2 0.96385 0.96371
Given the tables, to maximize the tooth growth for ginie pigs, the dose one Vitamin C is a better supplement than Orange Juice.