Assessment done by taking urine sample of 10 person 1-hour after taking each Aspirin. The data as follows:
| Person | Aspirin A 1-hour concentration (mg%) |
Aspirin B 1-hour concentration (mg%) |
|---|---|---|
| 1 | 15 | 13 |
| 2 | 26 | 20 |
| 3 | 13 | 10 |
| 4 | 28 | 21 |
| 5 | 17 | 17 |
| 6 | 20 | 22 |
| 7 | 7 | 5 |
| 8 | 36 | 30 |
| 9 | 12 | 7 |
| 10 | 18 | 11 |
Hypothesis:
\[ H_0 : \mu_1 = \mu_2 \\H_1 : \mu_1 \ne \mu_2 \]
The null hypothesis is that the mean concentrations of the two drugs are the same. Alternative hypothesis is that the mean concentrations of the two drugs are not the same.
The paired t-test done in R:
datA <- c(15,26,13,28,17,20,7,36,12,18)
datB <- c(13,20,10,21,17,22,5,30,7,11)
t.test(datA, datB, paired = TRUE)
##
## Paired t-test
##
## data: datA and datB
## 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
p-value: \(0.005121 \lt 0.05\). It means that there is enough evidence to reject \(H_0\) with 5% significance level , and the mean concentrations of the two drugs are not the same. Mean concentration of Aspirin A is 19.2, and mean concentration of Aspirin B is 15.6.
The two-sample t-test done in R:
datA <- c(15,26,13,28,17,20,7,36,12,18)
datB <- c(13,20,10,21,17,22,5,30,7,11)
t.test(datA, datB, paired = FALSE)
##
## Welch Two Sample t-test
##
## data: datA and datB
## 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
p-value: \(0.3401 \gt 0.05\). It means that there is not enough evidence to reject \(H_0\) with 5% significance level , and the mean concentrations of the two drugs are the same. Mean concentration of Aspirin A is 19.2, and mean concentration of Aspirin B is 15.6.
This demonstrated that wrong test selection lead to inaccurate outcomes.
Assessment done by assigning one-week old male infant into one of two treatment groups. Only one group do simulation of walking every day. The time of the infant starts to walk data as follows:
| Active Exercise (months) | No Exercise (months) |
|---|---|
| 9.50 | 11.50 |
| 10.00 | 12.00 |
| 9.75 | 13.25 |
| 9.75 | 11.50 |
| 9.00 | 13.00 |
| 13.00 | 9.00 |
Hypothesis:
\[ H_0 : \mu_1 = \mu_2 \\H_1 : \mu_1 \lt \mu_2 \]
The null hypothesis is that the mean time to walk of the two group of infant are the same. Alternative hypothesis is that the mean time to walk of the active group of infant are less than no exercise group of infant.
Because the number of sample data is too small and it is hard to determine the normality of small sample data, then it is best to use non-parametric test.
The Mann-Whitney- U test done in R:
datA <- c(9.5, 10, 9.75, 9.75, 9, 13)
datB <- c(11.5, 12, 13.25, 11.50, 13, 9)
wilcox.test(datA, datB, alternative = "less")
##
## Wilcoxon rank sum test with continuity correction
##
## data: datA and datB
## W = 9, p-value = 0.08523
## alternative hypothesis: true location shift is less than 0
p-value: \(0.08523 \gt 0.05\). It means that there is not enough evidence to reject \(H_0\) with 5% significance level , and the mean time to walk of the two group of infant are the same.