Q1
1. One method for assessing the bioavailability of a drug is to note its concentration in blood and/or urine samples at certain periods of time after the drug is given. Suppose we want to compare the concentrations of two types of aspirin (types A and B) in urine specimens taken from the same person 1 hour after he or she has taken the drug. Hence, a specific dosage of either type A or type B aspirin is given at one time and the 1-hour urine concentration is measured.
(a): Null hypothesis \(H_0: \mu_1 = \mu_2\)
Alternative hypothesis \(H_1: \mu_1 \ne \mu_2\)
————————————————————————————————
Assume normality for both.
t.test(AA,AB, alternative = "two.sided", paired = TRUE)
##
## Paired t-test
##
## data: AA and AB
## 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
(b): p-value = 0.005121<0.05, reject null hypothesis. So, means are NOT equal.
————————————————————————————————
(c):
Assume normality. Dr.Matis said for this assignment, we assume variance defaulted.
t.test(AA,AB, alternative = "two.sided")
##
## Welch Two Sample t-test
##
## data: AA and AB
## 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
Ans: p-value = 0.3401>0.05, fail to reject null hypothesis. So, means are equal.
Q2
2. Can active exercise shorten the time that it takes an infant to learn how to walk alone? Researchers randomly allocated 12 one-week old male infants from white, middle class families to one of two treatment groups. The is the active exercise group received stimulation of the walking reflexes for four 3-minute sessions each day from the beginning of the second week through the end of the eighth week. Those in the other group received no such stimulation.
Is there sufficient evidence to conclude that the groups differ in the typical time required to first walking?
(a): Null hypothesis \(H_0: \mu_1 = \mu_2\)
Alternative hypothesis \(H_1: \mu_1 < \mu_2\)
AE <- c(9.50, 10.00, 9.75, 9.75, 9.00, 13.0)
NE <- c(11.50, 12.00, 13.25, 11.50, 13.00, 9.00)
(b): Because we cannot assume normal distribution for the data due to small sample size, so we need to use non-parameter test.
wilcox.test(AE,NE, alternative="less")
## Warning in wilcox.test.default(AE, NE, alternative = "less"): cannot compute
## exact p-value with ties
##
## Wilcoxon rank sum test with continuity correction
##
## data: AE and NE
## W = 9, p-value = 0.08523
## alternative hypothesis: true location shift is less than 0
(c): p-value = 0.08523>0.05, fail to reject null hypothesis. So, active exercise cannot shorten the learning time.