Question 1a

Let u1=Aspirin A

let u2= Aspirin B

Null hypothesis Ho:u1=u2 that is u1=u2 (mean of aspirin A equals to mean of aspirin B)

Alternative hypothesis Ho:u1 != u2 that is u1<u2 or u2>u1 (mean of aspirin A is not equals to mean of aspirin B)

Question 1b

AspirinA<-c(15,26,13,28,17,20,7,36,12,18)
AspirinB<-c(13,20,10,21,17,22,5,30,7,11)
cor(AspirinA,AspirinB)
## [1] 0.9338095
t.test(AspirinA,AspirinB,paired = TRUE)
## 
##  Paired t-test
## 
## data:  AspirinA and AspirinB
## t = 3.6742, df = 9, p-value = 0.005121
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  1.383548 5.816452
## sample estimates:
## mean of the differences 
##                     3.6

Aspirin A and Aspirin B is highly correlated with correlation of 0.9338095

We are rejecting Ho: u1:u2 and stating that there is a difference between Aspirin A and Aspirin B

p value is 0.005121

Question 1c

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

Our p-value would be p-value = 0.3401(Not significant)

which means what we would fail to reject Ho: u1=u1

Mean of Aspirin A is equals to mean of Aspirin B

Question 2a
u1= active exercise has effect it takes to shorten the time it takes an infant to walk alone

u2 = No exercise has no effect it takes to shorten the time it takes an infant to walk alone

Null hypothesis Ho:u1=u2 that is u1=u2 (mean of active exercise equals to mean of no-execise )

Alternative hypothesis Ho:u1 != u2 that is u1<u2 or u2>u1 (mean of active exercise is not equals to mean of active exercise)

Question 2b

activeexercise<-c(9.50,10.00,9.75,9.75,9.00,13.0)
noexercise<-c(11.50,12.00,13.25,11.50,13.00,9.00)
qqnorm(activeexercise,main="activeexercise")
qqline(noexercise)

qqnorm(noexercise,main="noexercise")
qqline(noexercise)

boxplot(activeexercise,noexercise)

We want to use a non-parametric method for analyzing our data because we have a small sample size of the collected data and therefore we cannot claim normality and constant variance.

Question 1c

wilcox.test(activeexercise,noexercise,,alternative = "less")
## Warning in wilcox.test.default(activeexercise, noexercise, , alternative =
## "less"): cannot compute exact p-value with ties
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  activeexercise and noexercise
## W = 9, p-value = 0.08523
## alternative hypothesis: true location shift is less than 0

The p-value using the Mann-Whitney U-test is 0.08523 and our reference p-value is 0.05

0.08523>0.05

We are failing to reject the null hypothesis that there is no sufficient evidence to conclude that the group differs in the typical time required to first walking