1. Concentration of aspirin in urine samples

A<-c(15,26,13,28,17,20,7,36,12,18)
B<-c(13,20,10,21,17,22,5,30,7,11)

Stating the hypothesis

Null Hypothesis: The mean concentration of the two drugs is the same, that means the difference of the means (D) is zero. Hypothesis is D=0.

Alternate Hypothesis: The mean concentration of the two drugs are different, that means the difference of the means (D) is not zero. Hypothesis is D not equal to 0.

Testing the hypothesis using a paired t-test

t.test(A,B, paired=TRUE, sig.level=0.05)
## 
##  Paired t-test
## 
## data:  A and B
## t = 3.6742, df = 9, p-value = 0.005121
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
##  1.383548 5.816452
## sample estimates:
## mean difference 
##             3.6

The P-value determined from computing a paired t-test with an alpha of 0.05 is equal to 0.0051. The calculated mean difference is 3.6.

Two-Sample T-Test

t.test(A,B, sig.level=0.05, type="two.sample")
## 
##  Welch Two Sample t-test
## 
## data:  A and B
## t = 0.9802, df = 17.811, p-value = 0.3401
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -4.12199 11.32199
## sample estimates:
## mean of x mean of y 
##      19.2      15.6

Using a two-sample t-test, the computed p-value is 0.34, which is much greater than the p-value computed using the paired t-test.