Methodology

This is a study about the effects of vitamin C over the number of odontoblasts (cells responsible for tooth growth) of 60 guinea-pigs. If the number of odontoblasts grows, so does the teeth of the pigs.

Each pig received one of three different dosages of vitamin C: 0.5, 1 or 2 mg/day.

Each pig was treated by one of two different delivery methods: via orange juice or via ascorbic acid (VC)

We are going to test some hypothesis about the vitamin C influence over tooth growth.

There is not a control group.

Summary of the data

Here is a brief summary of data:

## '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: num  0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 ...
##       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
Tooth Growth data

Tooth Growth data

OJ means Orange Juice while VC means ascorbic acid.

Hypothesis testing

Vitamin C Dosis

Since the pigs were treated with different doses of Vitamin C, the first question we need to address is whether the amount of vitamin C administered to each pig does any difference in their tooth growth.

The different doses were:

## [1] 0.5 1.0 2.0

So, since there is not a control group, lets test the hypothesis that the doses matter: is the growth associated with the 2.0 mg doses greater than the growth associated with 0.5 doses?

\[H_0: \mu_{0.5 mg} = \mu_{2.0 mg} \leftrightarrow H_\alpha: \mu_{2.0 mg} > \mu_{0.5 mg} \]

Lets split the 2 groups and test the hypothesis through a one-sided T-test

g05 <- subset(dados$len, dados$dose == 0.5)
g2 <- subset(dados$len, dados$dose == 2)

t.test(g2, g05, alternative = "greater", paired = FALSE, var.equal = FALSE)
## 
##  Welch Two Sample t-test
## 
## data:  g2 and g05
## t = 11.799, df = 36.883, p-value = 0.00000000000002199
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
##  13.27926      Inf
## sample estimates:
## mean of x mean of y 
##    26.100    10.605

Notice the very small p-value.

Just for comparison, lets do this test by hand through its confidence interval:

n2 <- length(g2)
n05 <- length(g05)
sd2 <- sd(g2)
sd05 <- sd(g05)
se1 <- sqrt(((n2-1)*sd2^2 + (n05-1)*sd05^2) / (n2 + n05 -2))
se2 <- sqrt(1/n2 + 1/n05)
se <- se1*se2
ci <- mean(g2) - mean(g05) + c(-1,1)*qt(.95,df = (n2+n05 -2))*se
ci <- round(ci,2)
ci
## [1] 13.28 17.71

Notice that 0 isn’t in the confidence interval, so \(\mu_{0.5 mg} - \mu_{2.0 mg} \neq 0\), ever! The true difference of means will always be between 13.28, 17.71 mm.

We can infer by this 95% test that \(H_0\) must be rejected and therefore, a larger dosis results in larger tooth growth!

Vitamin C Delivery Method

What is the best delivery method?

The delivery methods are:

## [1] VC OJ
## Levels: OJ VC

OJ means Orange Juice while VC means ascorbic acid.

Tooth Growth by delivery method

Tooth Growth by delivery method

Lets test the null hypothesis that the deliver methods yields the same results:

\[H_0: \mu_{juice} = \mu_{acid} \leftrightarrow H_\alpha: \mu_{juice} \neq \mu_{acid}\]

The first thing to do is to separate the data between the two delivery methods and then run a two-sided T-test on the groups.

juicers <- subset(dados$len, dados$supp=="OJ")
trippin <- subset(dados$len, dados$supp=="VC")

t.test(juicers, trippin, paired = FALSE, var.equal = FALSE, alternative = "two.sided")
## 
##  Welch Two Sample t-test
## 
## data:  juicers and trippin
## 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

Interesting enough, the T-test yields a confidence interval and a p-value that led us to fail to reject \(H_0\).

Therefore, the two delivery methods produces the same results

Results

As we can see through the T-tests performed, we can infer that:

  1. a larger doses results in larger tooth growth
  2. the two delivery methods produces the same results