Monday, August 9, 2010

R::The Wilcoxon Signed Rank Test::paired Samples

A study of early childhood education asked kindergarten students to retell two fairy
tales that had been read to them earlier in the week. Each child told two stories. The
first had been read to them, and the second had been read but also illustrated with
pictures. An expert listened to a recording of the children and assigned a score for
certain uses of language. Here are the data for five “low-progress” readers in a pilot
study:9

Child 1 2 3 4 5
Story 2 0.77 0.49 0.66 0.28 0.38
Story 1 0.40 0.72 0.00 0.36 0.55
Difference 0.37 -0.23 0.66 -0.08 -0.17

We wonder if illustrations improve how the children retell a story. We would like to
test the hypotheses
H 0 : scores have the same distribution for both stories
H a : scores are systematically higher for Story 2

> f<-c(0.77,0.49,0.66,0.28,0.38) > ff<-c(0.40,0.72,0,0.36,0.55) > wilcox.test(f,ff,paired=T,alternative=c("g"))

Wilcoxon signed rank test

data: f and ff
V = 9, p-value = 0.4062
alternative hypothesis: true location shift is greater than 0



This p-Value tell us that this very small sample gives no evidence that seeing
illustrations improves the storytelling of low-progress readers.

EXAMPLE ::2

Here are the golf scores of 12 members of a college women’s golf team in two rounds of tournament play. (A golf score is the number of strokes required to complete the course, so that low scores are better.)

Player 1 2 3 4 5 6 7 8 9 10 11 12
Round 2 94 85 89 89 81 76 107 89 87 91 88 80
Round 1 89 90 87 95 86 81 102 105 83 88 91 79
Difference 5 -5 2 -6 -5 -5 5 -16 4 3 -3 1

Negative differences indicate better (lower) scores on the second round. We see that
6 of the 12 golfers improved their scores. We would like to test the hypotheses that
in a large population of collegiate woman golfers

H 0 : scores have the same distribution in rounds 1 and 2
H a : scores are systematically lower or higher in round 2


> r<-c(94,85,89,89,81,76,107,89,87,91,88,80) > rr<-c(89,90,87,95,86,81,102,105,83,88,91,79) > wilcox.test(r,rr,paired=T,alternative=c("t"))

Wilcoxon signed rank test with continuity correction

data: r and rr
V = 27.5, p-value = 0.3843
alternative hypothesis: true location shift is not equal to 0

Warning message:
In wilcox.test.default(r, rr, paired = T, alternative = c("t")) :
cannot compute exact p-value with ties
> t.test(r,rr,paired=T)

Paired t-test

data: r and rr
t = -0.9314, df = 11, p-value = 0.3716
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-5.605151 2.271818
sample estimates:
mean of the differences
-1.666667

‬Once again, t and W ‫ ם‬lead to the same conclusion.

No comments:

Post a Comment