Question No: 1

Aspirin_A <- c(15,26,13,28,17,20,07,36,12,18)
Aspirin_B <- c(13,20,10,21,17,22,05,30,07,11)

Answer to the question 1.a)

here, for Null Hypothesis, Ho: u1=u2: u1-u2=0

So The mean of Aspirin A is equal to mean of Aspirin B

alternative Hypothesis: H1: u1=!u2: u1-u2=!0

So the mean of AspirinA is not equal to mean of AspirinB.

t.test(Aspirin_A,Aspirin_B,paired=TRUE)
## 
##  Paired t-test
## 
## data:  Aspirin_A and Aspirin_B
## 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

Answer to Question 1.b)

Here from the summary We see P value =0.005121 which is less than 0.05, So We reject null hypothesis

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

Answer to the question 1.c)

The P value of tested hypothesis using two sample t-test is 0.3401

Question :2

Active_exercise <- c(9.50,10.00,9.75,9.75,9.00,13.0)
No_Exercise <- c(11.50,12.00,13.25,11.50,13.00,9.00)

Answer to the question 2.a)

here, for Null Hypothesis, Ho: u1=u2: u1-u2=0

So The mean of active exercise is equal to mean of no exercise

alternative Hypothesis: H1: u1=!u2: u1-u2=!0

So the mean of active exercise is not equal to mean of no exercise.

qqnorm(Active_exercise,main = "Active Exercise")
qqline(Active_exercise)

qqnorm(No_Exercise,main="No Exercise")
qqline(No_Exercise)

boxplot(Active_exercise,No_Exercise,names=c("Active Exercise","No Exercise"))

Answer to the question 2.b)

there is not enough data points to claim the normality and constant variarnce.

So we have to analysis data using non- parametric method.

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

Answer to the question 2.c)

From the wilcox test summary we see the P-value is 0.08523 which is greater than alpha(0.05)

So we accept null hypothesis thats means, mean of Active Exercise is equal to mean of No Exercise.

Conclusion: There is not enough evidence to conclude that two groups differ in the typical time required to first walking.