« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Enhanced Probability & Statistics
Use Hoeffding's D to Quantify and Test Non-monotonic Dependence
Unlike
SpearmanRho
,
KendallTau
, and Pearsons's
Correlation
,
HoeffdingD
can be used to detect a wide variety of dependence structures beyond monotonic association.
In[1]:=
X
v1 = {3, -4, 1, 4, 22, 17, -2, 2, 13, -11}; v2 = {-20, -24, 0, 4, 24, 36, -12, -12, 56, -14};
In[2]:=
X
HoeffdingD[v1, v2]
Out[2]=
Test whether Hoeffding's D is significantly different from zero.
In[3]:=
X
HoeffdingDTest[v1, v2, "TestDataTable"]
Out[3]=
Here is a collection of datasets with different dependency structures.
Out[30]=
The Hoeffding D statistics and test conclusions for the data grid follow.
In[4]:=
X
Partition[ Table[Column@ HoeffdingDTest[ Sequence @@ Transpose@data[[All, i]], {"TestStatistic", "ShortTestConclusion"}], {i, 9}], 3] // TableForm
Out[4]//TableForm=