1. Aspirin Study

a. Hypotheses

H0: The mean difference in concentration between Aspirin A and Aspirin B is equal to 0.

Ha: The mean difference in concentration between Aspirin A and Aspirin B is not equal to 0.

b. Paired t-test

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

t.test(A,B,paired=TRUE)
## 
##  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

Since p-value = 0.005121, we reject H0 at alpha = 0.05 level of significance. There is sufficient evidence to conclude that the mean urine concentrations of Aspirin A and Aspirin B are different.

c. Two-sample t-test

t.test(A,B)
## 
##  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

The p-value using a two-sample t-test instead is 0.3401.

2. Infant Walking Study

a. Hypotheses

H0: The mean walking time is the same for children receiving Active Exercise versus No Exercise.

Ha: The mean walking time is less for children receiving Active Exercise versus No Exercise.

b. Non-parametric Method

A non-parametric method may be used if the sample sizes are very small, so it may not be reasonable to assume normality.

c. Mann-Whitney U Test

active<-c(9.50,10.00,9.75,9.75,9.00,13.00)
noexercise<-c(11.50,12.00,13.25,11.50,13.00,9.00)

wilcox.test(active,noexercise,alternative="less")
## 
##  Wilcoxon rank sum exact test
## 
## data:  active and noexercise
## W = 9, p-value = 0.09524
## alternative hypothesis: true location shift is less than 0

Since the p-value = 0.09524, we fail to reject H0 at the alpha = 0.05 level of significance. There is insufficient evidence to conclude that infants receiving active exercise take less time to learn how to walk than infants receiving no exercise.

R Script

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

t.test(A,B,paired=TRUE)
t.test(A,B)
active<-c(9.50,10.00,9.75,9.75,9.00,13.00)
noexercise<-c(11.50,12.00,13.25,11.50,13.00,9.00)

wilcox.test(active,noexercise,alternative="less")