This project investigates the tooth growth data for Guinea pigs. using a 95% confidence interval it is shown that Orange Juice gives a mean growth gain of -0.17 to 7.6.
A summary for the data for teeth for OJ is:
oj = ToothGrowth[ToothGrowth$supp=='OJ',]
summary(oj)
## len supp dose
## Min. : 8.20 OJ:30 Min. :0.500
## 1st Qu.:15.53 VC: 0 1st Qu.:0.500
## Median :22.70 Median :1.000
## Mean :20.66 Mean :1.167
## 3rd Qu.:25.73 3rd Qu.:2.000
## Max. :30.90 Max. :2.000
varOj = var(oj$len)
A summary for the data for teeth for VC is:
vc = ToothGrowth[ToothGrowth$supp=='VC',]
summary(vc)
## len supp dose
## Min. : 4.20 OJ: 0 Min. :0.500
## 1st Qu.:11.20 VC:30 1st Qu.:0.500
## Median :16.50 Median :1.000
## Mean :16.96 Mean :1.167
## 3rd Qu.:23.10 3rd Qu.:2.000
## Max. :33.90 Max. :2.000
varVc = var(vc$len)
The variances are oj: 43.6334368 and vc: 68.3272299.
A 95% T confidence interval is applied:
t.test(oj$len,vc$len,var.equal=F, paired=F)
##
## Welch Two Sample t-test
##
## data: oj$len and vc$len
## 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 of x mean of y
## 20.66333 16.96333
From this we can say with 95% confidence the average gain in tooth growth is between -0.17 and 7.6 when using Orange Juice vs Ascorbic Acid. This indicates that Orange Juice is likely a more effective delivery mechanism but does not rule out the difference being negligible.
I have assumed the variance between both sets is not equal since the sample variances were ~50% different.