In: Math
A study was performed to test a new treatment for autism in children. In order to test the new method,
parents of children with autism were asked to volunteer for the study in which 9 parents volunteered their
children for the study. The children were each asked to complete a 20 piece puzzle. The time it took to
complete the task was recorded in seconds. The children then received a treatment (20 minutes of yoga) and
were asked to complete a similar but different puzzle. The data from the study is below:
Child Before After
1 85 75
2 70 60
3 40 50
4 65 40
5 80 20
6 75 65
7 55 40
8 20 25
9 70 30
Part A
Calculate the statistic S for a signed rank test by hand showing the final table with the absolute differences,
the signs, and the ranks. Also, show your calculation of the z-statistic (standardized S statistic).
Part B
Verify your calculation in both SAS and R. Simply cut and paste your code and relevant output.
Part C
Using all the information from parts A and B, conduct the six step hypothesis test using your calculations
from above to test the claim that the yoga treatment was effective in reducing the time to finish the puzzle.
Part D
Use SAS to conduct a six step hypothesis test using a paired t-test to test the claim that the yoga treatment
was effective in reducing the time to finish the puzzle.
Part E
Verify your calculations in R. Simply cut and paste your code and relevant output.
Part F
Which test (the sign test, the signed rank test, or the paried t-test) do you think is most appropriate for this
data? Why?
Part A
Child | Before | After | Difference | Rank | Sign |
1 | 85 | 75 | -10 | 3.5 | - |
2 | 70 | 60 | -10 | 3.5 | - |
3 | 40 | 50 | 10 | 3.5 | + |
4 | 65 | 40 | -25 | 7 | - |
5 | 80 | 20 | -60 | 9 | - |
6 | 75 | 65 | -10 | 3.5 | - |
7 | 55 | 40 | -15 | 6 | - |
8 | 20 | 25 | 5 | 1 | + |
9 | 70 | 30 | -40 | 8 | - |
Calculate
W- = 40.5
W+ = 4.5
Therefore, we have n = 9*10/2= 45
W = max(W- , W+ ) = 40.5
We can use a normal approximation in this case. We have one group of 4 tied ranks, so we must reduce the variance by
We get:
This gives a two-sided p-value of 0.015
Part B.
Y1=c(85,70,40,65,80,75,55,20,70)
Y2=c(75,60,50,40,20,65,40,25,30)
wilcox.test(Y1, Y2, paired=TRUE)
Wilcoxon signed rank test with continuity correction
data: Y1 and Y2
V = 40.5, p-value = 0.03647
alternative hypothesis: true location shift is not equal to 0
Warning message:
In wilcox.test.default(Y1, Y2, paired = TRUE) :
cannot compute exact p-value with ties
Part C.
Test statistic is
where
Child | Before | After | Difference |
1 | 85 | 75 | 10 |
2 | 70 | 60 | 10 |
3 | 40 | 50 | -10 |
4 | 65 | 40 | 25 |
5 | 80 | 20 | 60 |
6 | 75 | 65 | 10 |
7 | 55 | 40 | 15 |
8 | 20 | 25 | -5 |
9 | 70 | 30 | 40 |
Looking this up in tables gives p =0.04198
Therefore, there is strong evidence that, on average, yoga treatment was effective in reducing the time to finish the puzzle.