ToothGrowth Analysis

Ravi G. Ravichandran
3 January, 2017

Objective and Data

Objective: Analyze the effect of supplement and dosage on tooth growth

Dataset: ToothGrowth data in the R datasets package.

Structure of the Dataset:

str(ToothGrowth)
'data.frame':   60 obs. of  3 variables:
 $ len : num  4.2 11.5 7.3 5.8 6.4 10 11.2 11.2 5.2 7 ...
 $ supp: Factor w/ 2 levels "OJ","VC": 2 2 2 2 2 2 2 2 2 2 ...
 $ dose: Factor w/ 3 levels "0.5","1","2": 1 1 1 1 1 1 1 1 1 1 ...

Plot of Dataset

plot of chunk unnamed-chunk-3

Hypothesis Testing

Hypothesis: The mean difference between Vitamin C (VC) and Orange Juice (OJ) is not equal to 0

t.test(len ~ supp, data = ToothGrowth, conf.level = 0.90)$p.value
[1] 0.06063451
t.test(len ~ supp, data = ToothGrowth, conf.level = 0.95)$p.value
[1] 0.06063451

Conclusion

By examining the box plot and the results of the hypothesis testing, we can conclude the following:

  • For confidence interval 0.90: since p value is 0.06 (and lower than 0.10) hypothesis is TRUE.
  • For confidence interval 0.95: since p value is 0.06 (and more than 0.05) hypothesis is FALSE.
  • By looking at the box plot, we can conclude that OJ is more effective than VC for doses of 0.5 and 1.0.