Вы находитесь на странице: 1из 19

TMA4255 Applied Statistics V2014 (23)

Signed-Rank test [16.2] Wilcoxon Rank-sum test [16.3]

Anna Marie Holand April 2, 2014, wiki.math.ntnu.no/tma4255/2014v/start

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

Outline of part 7
Approximation of E and Var
First order Taylor approximation [p 133-135]

Nonparametric tests:
One sample or two paired samples:
The sign test [16.1], for continuous distributions. The (Wilcoxon) signed-rank test [16.2], for continuous symmetric distributions.

Two independent samples:


The Wilcoxon rank-sum test (Mann-Whitney) [16.3], for two continuous distributions of the same shape.

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

Shoshoni and golden ratio conjugate


Data set of ratio of height/length for n = 8 rectangles found on leather items at Shoshoni indians: 0.693 0.662 0.690

0.606

0.570

0.749

0.672

0.628

The golden ratio, 1+2 5 = 1.618, is the longer segment divided by the shorter, while the reverse is called the golden ratio conjugate, 0.618. Do the ratioes from the shoshoni rectangles correspond with the golden ratio (conjugate)? H0 : median of rectangles ratios=0.618 vs. H1 : not so. Sign test gave a p-value of 0.29. But, the sign test only used the sign of each observation as compared to the hypothesized mean. Can we do better?
www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

The Sign Test [16.1]


Use with one sample or two paired samples. Test for the median, or the mean in a symmetric distribution. Binomial test based on the number of positive (or negative) differences between observations and the hypothesized median. Binomial (n, p = 0.5). Normal approximation to the binomial used for n large. General rule of thumb np 5 and n(1 p) 5, here p = 0.5, so n 10. Values equal to the hypothesized median are deleted from the data set. Only the sign of the data (wrt the hypthesized median), and not the magnitude (actual value) of the data are used.
www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

The Signed-Rank Test

Source: Statistics review 6: Nonparametric methods Elise Whitley and Jonathan Ball.

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

Shoshoni and golden ratio conjugate


yi 0.628 0.606 0.662 0.570 0.672 0.690 0.693 0.749 yi 0.618 0.010 -0.012 0.044 -0.048 0.054 0.072 0.075 0.131 |yi 0.618| 0.010 0.012 0.044 0.048 0.054 0.072 0.075 0.131 rank 1 2 3 4 5 6 7 8

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

The Signed-Rank Test: Critical values

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

Critical values: W+, W and W = min(W+, W)


We have one sample of n Yi s (or the difference between paired samples). The null hypothesis tested is H0 : = 0 . We form differences Yi 0 , and rank them. W+ is the sum of the ranks of the positive differences. W+ is the sum of the ranks of the negative differences. Which W (W+ , W or W ) to be used to compare to the critical values in Table A16 is deciede by the alternativ hypothesis: H1 : < 0 : Reject H0 when W+ critical value (one-sided) H1 : > 0 : Reject H0 when W critical value (one-sided) H1 : = 0 : Reject H0 when W critical value (two-sided)
www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

10

The Signed-Rank Test: questions


Q: What about zeros?
Remove, as for the sign test.

Q: What about ties?


If two observations have the same absolute value, and these two values should have been assigned rank 3 and 4 (say), then both observations are assigned rank 3.5.

Q: What if n is large (n 15)?


Instead of the tables use the normal approximation to calculate critical values and tail probabilites. Z = W E(W ) Var(W )

where E(W ) = n(n + 1)/4 and Var(W ) = n(n + 1)(2n + 1)/24.


www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

11

Tar example

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

12

The Rank-Sum Test

Source: Statistics review 6: Nonparametric methods Elise Whitley and Jonathan Ball.

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

13

The Rank-Sum Test:Critical values

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

14

The Rank-Sum Test: tail probabilities

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

15

Critical values and U1, U2 and U = min(U1, U2)


Sample 1: has the n1 observations, rank sum W1 and adjusted 1 +1) rank sum U1 = W1 n1 (n2 . Sample 2: has the n2 observations, rank sum W2 and adjusted 2 +1) rank sum U2 = W2 n2 (n2 . Here n1 n2 . The null hypothesis about the medians is H0 : 1 = 2 . Which U (U1 , U2 or U ) to be used to compare to the critical values in Table A17 is deciede by the alternativ hypothesis: H1 : 1 < 2 : Reject H0 when U1 critical value (one-sided) H1 : 1 > 2 : Reject H0 when U2 critical value (one-sided) H1 : 1 = 2 : Reject H0 when U critical value (two-sided)
www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

16

Efciency of the Wilcoxon Rank-Sum test


When data are normal with equal variances, the rank-sum test is 95% as efcient as the pooled t-test for large samples. 95% efcient= the t-test needs 95% of the sample size of the rank-sum test to acihive the same power. The rank-sum test will always be at least 86% as efcient as the pooled t-test, and may be more efcient if the underlying distributions are very non-normal, escpecially with heavy tails. Power calculations for the rank-sum tests is in general difcult, since we need to specify the shapes of the two distributions.
Taken from Devore.

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

17

Balance
1.5 1.5 3 Nine elderly and eight young people stood 4.5 barefoot on a "force platform" and was 4.5 asked to maintain a stable upright position 6.5 and to react as quickly as possible to an 6.5 unpredictable noise by pressing a hand 8 held button. 9.5 The noise came randomly and the subject 9.5 concentrated on reacting as quickly as 11 possible. The platform automatically 12 measured how much each subject swayed 13.5 in millimeters in both the forward/backward 13.5 and the side-to-side directions. 15 16 http://lib.stat.cmu.edu/DASL/Stories/MaintainingBalance.html 17
www.ntnu.no

Is it harder to maintain your balance while you are concentrating?

Sway 14 14 15 17 17 19 19 20 21 21 22 24 25 25 29 30 50

Group young young young young young elderly elderly elderly elderly young young elderly elderly young elderly elderly elderly

Anna.Holand@math.ntnu.no, TMA4255V2014

18

Advantages of nonparametric tests


Nonparametric methods require no or very limited assumptions to be made about the format of the data, and they may therefore be preferable when the assumptions required for parametric methods are not valid. Nonparametric methods can be useful for dealing with unexpected, outlying observations that might be problematic with a parametric approach. Nonparametric methods are intuitive and are simple to carry out by hand, for small samples at least. Nonparametric methods are often useful in the analysis of ordered categorical data in which assignation of scores to individual categories may be inappropriate.
Source: Statistics review 6: Nonparametric methods Elise Whitley and Jonathan Ball. www.ntnu.no Anna.Holand@math.ntnu.no, TMA4255V2014

19

Disadvantages of nonparametric tests


Nonparametric methods may lack power as compared with more traditional approaches. This is a particular concern if the sample size is small or if the assumptions for the corresponding parametric method (e.g. Normality of the data) hold. Nonparametric methods are geared toward hypothesis testing rather than estimation of effects. It is often possible to obtain nonparametric estimates and associated condence intervals, but this is not generally straightforward. Tied values can be problematic when these are common, and nonparametric methods adjustments to the test statistic may be necessary.
Source: Statistics review 6: Nonparametric methods Elise Whitley and Jonathan Ball.

www.ntnu.no

Anna.Holand@math.ntnu.no, TMA4255V2014

Вам также может понравиться