#example 8.1

x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
y <- c( 2.6,  3.1,  2.5,  5.0,  3.6,  4.0,  5.2,  2.8,  3.8)
n = length(x) 
ans = cor.test(x, y, method = "kendall", alternative = "greater")
total =   n*(n-1)/2 
totalNEG = n*(n-1)/2 - ans$statistic
totalPOS = ans$statistic
K = totalPOS - totalNEG
## => p=0.05972


#for large sample approx
ans = cor.test(x, y, method = "kendall", alternative = "greater", exact=F)


