Suppose that you are interested in examining the effects of
Suppose that you are interested in examining the effects of the transition from fetal to postnatal circulation among premature infants. For each of 14 healthy newborns, respiratory rate is measured at two different times.
48
A) Using the sign test, evaluate the null hypothesis that the median difference in respiratory rates for the two times is equal to 0.
B) Evaluate the same hypothesis using the Wilcoxon sign-rank test.
C) Do you reach the same conclusion in each case?
| Time 1 | Time 2 | |
| 1 | 62 | 46 | 
| 2 | 35 | 42 | 
| 3 | 38 | 40 | 
| 4 | 80 | 42 | 
| 5 | 48 | 36 | 
| 6 | 48 | 46 | 
| 7 | 68 | 45 | 
| 8 | 26 | 40 | 
| 9 | 48 | 42 | 
| 10 | 27 | 40 | 
| 11 | 43 | 46 | 
| 12 | 67 | 31 | 
| 13 | 52 | 44 | 
| 14 | 88 | 48 | 
Solution
The R program is given below after importing the data set in it.
> head(tt)
 SL_N0 Time_1 Time_2 X
 1     1     62     46 NA
 2     2     35     42 NA
 3     3     38     40 NA
 4     4     80     42 NA
 5     5     48     36 NA
 6     6     48     46 NA
 > library(BSDA)
 > SIGN.test(tt$Time_1,tt$Time_2)
Dependent-samples Sign-Test
data: tt$Time_1 and tt$Time_2
 S = 9, p-value = 0.424
 alternative hypothesis: true median difference is not equal to 0
 95 percent confidence interval:
 -3.663736 25.157143
 sample estimates:
 median of x-y
             7
                   Conf.Level L.E.pt U.E.pt
 Lower Achieved CI     0.9426 -3.0000 23.0000
 Interpolated CI       0.9500 -3.6637 25.1571
 Upper Achieved CI     0.9871 -7.0000 36.0000
 > wilcox.test(tt$Time_1,tt$Time_2)
Wilcoxon rank sum test with continuity correction
data: tt$Time_1 and tt$Time_2
 W = 135.5, p-value = 0.08816
 alternative hypothesis: true location shift is not equal to 0
Warning message:
 In wilcox.test.default(tt$Time_1, tt$Time_2) :
 cannot compute exact p-value with ties
A) Since the p-value is very large we fail to reject the hypothesis and conclude that the median difference in respiratory rates for the two times are equal.
B) The Wilcoxon sign-rank test implies that the the respiratory times are different.
C) The conclusions are not same.


