KendallTau

KendallTau[v1,v2]
gives Kendall's rank correlation coefficient for the vectors v1 and v2.

KendallTau[m]
gives Kendall's rank correlation coefficients for the matrix m.

KendallTau[m1,m2]
gives Kendall's rank correlation coefficients for the matrices m1 and m2.

KendallTau[dist]
gives Kendall's rank correlation matrix for the multivariate symbolic distribution dist.

KendallTau[dist,i,j]
gives the ^(th) Kendall rank correlation for the multivariate symbolic distribution dist.

DetailsDetails

  • KendallTau[v1,v2] gives Kendall's rank correlation coefficient between v1 and v2.
  • Kendall's is a measure of monotonic association based on the relative order of consecutive elements in the two lists.
  • Kendall's between and is given by , where is the number of concordant pairs of observations, is the number of discordant pairs, is the number of ties involving only the variable, and is the number of ties involving only the variable.
  • A concordant pair of observations and is one such that both and or both and . A discordant pair of observations is one such that and or and .
  • The tie-corrected version of Kendall's returned is sometimes referred to as Kendall's , or tau-b.
  • The arguments v1 and v2 can be any realvalued vectors of equal length.
  • For a matrix m with columns, KendallTau[m] is a × matrix of the rankcorrelations between columns of m.
  • For an × matrix m1 and an × matrix m2, KendallTau[m1,m2] is a × matrix of the rankcorrelations between columns of m1 and columns of m2.
  • KendallTau[dist,i,j] is the probability of concordance minus the probability of discordance Probability[(x1-x2)(y1-y2)>0,{{x1,y1}disti,j,{x2,y2}disti,j}]-Probability[(x1-x2)(y1-y2)<0,{{x1,y1}disti,j,{x2,y2}disti,j}] where disti,j is the ^(th) marginal of dist.
  • KendallTau[dist] gives a matrix where the ^(th) entry is given by KendallTau[dist,i,j].

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Kendall's for two vectors:

In[1]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Kendall's for a matrix:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]//MatrixForm=

Kendall's for two matrices:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]//MatrixForm=

Compute Kendall's for a bivariate distribution:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]//MatrixForm=

Compare to a simulated value:

In[3]:=
Click for copyable input
Out[3]//MatrixForm=
Introduced in 2012
(9.0)