• incanter

# kendalls-w

## incanter.stats

• (kendalls-w)

http://en.wikipedia.org/wiki/Kendall%27s_W
http://faculty.chass.ncsu.edu/garson/PA765/friedman.htm

Suppose that object i is given the rank ri,j by judge number j, where there are in total n objects and m judges. Then the total rank given to object i is

Ri = sum Rij

and the mean value of these total ranks is

Rbar = 1/2 m (n + 1)

The sum of squared deviations, S, is defined as

S=sum1-n (Ri - Rbar)

and then Kendall's W is defined as[1]

W= 12S / m^2(n^3-n)

If the test statistic W is 1, then all the survey respondents have been unanimous, and each respondent has assigned the same order to the list of concerns. If W is 0, then there is no overall trend of agreement among the respondents, and their responses may be regarded as essentially random. Intermediate values of W indicate a greater or lesser degree of unanimity among the various responses.

Legendre[2] discusses a variant of the W statistic which accommodates ties in the rankings and also describes methods of making significance tests based on W.

[{:observation [1 2 3]} {} ... {}] -> W

### Source incanter/stats.clj:2870 top

```(defn kendalls-w
"
http://en.wikipedia.org/wiki/Kendall%27s_W
http://faculty.chass.ncsu.edu/garson/PA765/friedman.htm

Suppose that object i is given the rank ri,j by judge number j, where there are in total n objects and m judges. Then the total rank given to object i is

Ri = sum Rij

and the mean value of these total ranks is

Rbar = 1/2 m (n + 1)

The sum of squared deviations, S, is defined as

S=sum1-n (Ri - Rbar)

and then Kendall's W is defined as[1]

W= 12S / m^2(n^3-n)

If the test statistic W is 1, then all the survey respondents have been unanimous, and each respondent has assigned the same order to the list of concerns. If W is 0, then there is no overall trend of agreement among the respondents, and their responses may be regarded as essentially random. Intermediate values of W indicate a greater or lesser degree of unanimity among the various responses.

Legendre[2] discusses a variant of the W statistic which accommodates ties in the rankings and also describes methods of making significance tests based on W.

[{:observation [1 2 3]} {} ... {}] -> W
"
[])```
Vars in incanter.stats/kendalls-w: defn
Used in 0 other vars