In this report we aimto show the effect of vitamin C on tooth growth in guine pigs.The report checks on the difference in means of different dosages and supplements given to the guinea pigs. A ttest is used to show whether there is a difference between the two groups. A p-value and the confidence interval of each test is reported. We observed a significance difference in the two supplements orange juice and ascorbic acid for dosage of 0.5mg and 1.0mg. The 2.0mg dosage didnt have a significant difference.
This assignment makes use of toooth growth data from a the library datasets. The data shows the effect of Vitamin C on Tooth growth in guinea pigs. The response is the length of odontoblasts (teeth) in each of 10 guinea pigs at each of three dose levels of Vitamin C (0.5, 1, and 2 mg) with each of two delivery methods OJ and VC (orange juice or ascorbic acid). The data has 60 observations on the three variables.
The table below shows a summary of the three variables:
| len | supp | dose | |
|---|---|---|---|
| Min. : 4.20 | OJ:30 | Min. :0.500 | |
| 1st Qu.:13.07 | VC:30 | 1st Qu.:0.500 | |
| Median :19.25 | NA | Median :1.000 | |
| Mean :18.81 | NA | Mean :1.167 | |
| 3rd Qu.:25.27 | NA | 3rd Qu.:2.000 | |
| Max. :33.90 | NA | Max. :2.000 |
The figure below shows a box plot of the length of tooth by supplement and dosage. We observe that the higher the dosage the longer the tooth was. As the graph shows the median of the 2mg dosage was similar for both supplements.
Below we calculate the mean, SD and 95% CI /(confidence interval/) for each dosage per supplement. We calculate the CI for the t-distribution of the data.The table below shows the summary where mean, count , se , sd and ci is the mean , count, standard error, standard deviation and the CI of tooth length respectively.
| dose | supp | count | mean | sd | se | ci |
|---|---|---|---|---|---|---|
| 0.5 | OJ | 10 | 13.23 | 4.459708 | 1.4102837 | 3.190283 |
| 0.5 | VC | 10 | 7.98 | 2.746634 | 0.8685620 | 1.964824 |
| 1.0 | OJ | 10 | 22.70 | 3.910953 | 1.2367520 | 2.797727 |
| 1.0 | VC | 10 | 16.77 | 2.515309 | 0.7954104 | 1.799343 |
| 2.0 | OJ | 10 | 26.06 | 2.655058 | 0.8396031 | 1.899314 |
| 2.0 | VC | 10 | 26.14 | 4.797731 | 1.5171757 | 3.432090 |
The graph below shows the length with the error bars or CI included. The bar graph has the the standard error shown for range shown for each dosage per supplement. The line graph shows the CI for each supplement. We observe there is an overlap of the CI for 2mg dosage. The other shows a reduction in the mean of tooth length for VC supplement.
## ymax not defined: adjusting position using y instead
## ymax not defined: adjusting position using y instead
## NULL
Finaly we do a ttest to confirm whether there is a significance difference between the means of VC and OJ supplement per dosage.
The results of the test for showed that there was no significance difference in tooth length for orange juice(OJ) and ascorbic acid(VC) supplements without considering the dosage. The pvalue was 0.0603934 and the 95% confidence interval was -0.1670064, 7.5670064 . We decided to do a test per dosage between the groups
There was a significance differnce between the means of the 0.5mg OJ and VC. The reported pvalue was 0.0053037 and the 95% confidence interval was 1.7702617, 8.7297383. The 0.5mg VC dosage had a mean of 7.98 which was lower than the OJ dosage mean. This concludes that Orange Juice had a higher effect on the tooth length for the 0.5mg dosage compared to ascorbic acid.
There was a significance differnce between the means of the 1mg OJ and VC. The reported pvalue was 7.807261710^{-4} and the 95% confidence interval was 2.8406919, 9.0193081. The 1mg OJ dosage had a mean of 22.7 which was higher than the VC dosage mean. This concludes that Orange Juice had a higher effect on the tooth length for the 0.5mg dosage compared to ascorbic acid.
There was no significance differnce between the means of the 2mg OJ and VC. The reported pvalue was 0.9637098 and the 95% confidence interval was -3.7229985, 3.5629985. The 1mg reported mean for both supplements were 22.7, 16.77. This concludes there was no significance effect difference between the two supplements.