HoeffdingD[v1,v2]
gives Hoeffding's dependence measure for the vectors v1 and v2.
HoeffdingD[m]
gives Hoeffding's dependence measure for the matrix m.
HoeffdingD[m1,m2]
gives Hoeffding's dependence measure for the matrices m1 and m2.
HoeffdingD[dist]
gives Hoeffding's matrix for the multivariate symbolic distribution dist.
HoeffdingD[dist,i,j]
gives the ![]()
element of for the multivariate symbolic distribution dist.
HoeffdingD
HoeffdingD[v1,v2]
gives Hoeffding's dependence measure for the vectors v1 and v2.
HoeffdingD[m]
gives Hoeffding's dependence measure for the matrix m.
HoeffdingD[m1,m2]
gives Hoeffding's dependence measure for the matrices m1 and m2.
HoeffdingD[dist]
gives Hoeffding's matrix for the multivariate symbolic distribution dist.
HoeffdingD[dist,i,j]
gives the ![]()
element of for the multivariate symbolic distribution dist.
Details
- HoeffdingD[v1,v2] gives Hoeffding's dependence measure between v1 and v2.
- Hoeffding's is a measure of dependence based on the relative order of elements in the two lists.
- Hoeffding's between v1 and v2 is given by
, where
is the number of observations in v1,
,
,
,
for
,
is the rank of v1i,
is the rank of v2i, and
is equal to Boole[a<b]. - The arguments v1 and v2 can be any real‐valued vectors of equal length greater than 5.
- For a matrix m with
columns, HoeffdingD[m] is a
×
matrix of the dependence measures between columns of m. - For an
×
matrix m1 and an
×
matrix m2, HoeffdingD[m1,m2] is a
×
matrix of the dependence measures between columns of m1 and columns of m2. - HoeffdingD[dist,i,j] is given by 30 Expectation[(F[x,y]-G[x]H[y])^2,{x,y}disti,j], where F[x,y], G[x], and H[y] are the CDFs of the

, 
, and 
marginals of dist respectively. - HoeffdingD[dist] gives a matrix where the

entry is given by HoeffdingD[dist,i,j].
Examples
open all close allBasic Examples (4)
Hoeffding's for two vectors:
v1 = {3, -4, 1, 4, 22, 17, -2, 2, 13, -11};
v2 = {-20, -24, 0, 4, 24, 36, -12, -12, 56, -14};HoeffdingD[v1, v2]m = RandomVariate[BinormalDistribution[.6], 10^3];HoeffdingD[m]//MatrixFormHoeffding's for two matrices:
m1 = RandomReal[1, {10^3, 4}];m2 = RandomReal[1, {10^3, 3}];HoeffdingD[m1, m2]//MatrixFormCompute Hoeffding's for a bivariate distribution:
𝒟 = BinormalDistribution[.5];HoeffdingD[𝒟]//MatrixFormHoeffdingD[RandomVariate[𝒟, 10^4]]//MatrixFormScope (7)
Data (4)
Exact input yields exact output:
HoeffdingD[{1, 2, 3, 1, 4, 6}, {2, 1, 8, 7, 2, 1}]Approximate input yields approximate output:
HoeffdingD[{1.1, 2, 3, 1, 4, 6}, {2, 1, 8, 7, 2, 1}]HoeffdingD[N[{1, 2, 3, 1, 4, 6}, 30], N[{2, 1, 8, 7, 2, 1}, 30]]HoeffdingD[RandomReal[1, 10 ^ 4], RandomReal[1, 10 ^ 4]]SparseArray data can be used:
HoeffdingD[SparseArray[{{2, 2} -> 1, {5, 3} -> 2, {10, 1} -> 3}]]//MatrixFormDistributions and Processes (3)
Hoeffding's matrix for a continuous multivariate distribution:
HoeffdingD[BinormalDistribution[.5]]//MatrixFormHoeffdingD[BinormalDistribution[0.3], 2, 1]Hoeffding's matrix for derived distributions:
HoeffdingD[ProductDistribution[ExponentialDistribution[1], NormalDistribution[3, 5]]]//MatrixForm𝒟 = CopulaDistribution[{"FGM", 2 / 3}, {UniformDistribution[{0, 1}], UniformDistribution[{0, 1}]}];HoeffdingD[𝒟]//MatrixForm𝒟 = HistogramDistribution[RandomVariate[BinormalDistribution[.75], 10 ^ 2]];HoeffdingD[𝒟]//MatrixFormHoeffdingD[BinormalDistribution[.75]]//MatrixFormHoeffding's matrix for a random process at times
and
:
HoeffdingD[WienerProcess[][{0.2, 0.3}]]//MatrixFormApplications (3)
Hoeffding's is typically used to detect non-monotonic dependency structures:
x = RandomVariate[UniformDistribution[{-1, 1}], 100];
y = x^2 + RandomReal[{-.05, .05}, 100];
y2 = RandomVariate[UniformDistribution[{-1, 1}], 100];ListPlot[{Transpose[{x, y}], Transpose[{x, y2}]}]Hoeffding's tends to be larger for dependent vectors:
HoeffdingD[x, y]The value tends to 0 for independent vectors:
HoeffdingD[x, y2]Hoeffding's can detect linear dependence:
data = BlockRandom[SeedRandom[1];Table[RandomVariate[BinormalDistribution[i], 1000], {i, {-.99, -.75, -.25, -.5, 0., .25, .5, .75, .99}}]];Grid[Partition[Table[ListPlot[i, PlotStyle -> Directive[PointSize[Tiny]],
FrameTicks -> None, Frame -> True, Axes -> None, PlotLabel -> Row[{"𝒟 : ", HoeffdingD[i][[1, 2]]}]], {i, data}],
3]]SpearmanRho and KendallTau are more sensitive to linear dependence:
Grid[Join[{{"𝒟", "τ", "ρ"}}, Round[Table[{HoeffdingD[i][[1, 2]], KendallTau[i][[1, 2]], SpearmanRho[i][[1, 2]]}, {i, data}], .01]], Alignment -> Right]Hoeffding's can also detect many types of nonlinear dependence:
uni = RandomReal[{-3, 3}, 1000];f[x_] := {{x, -Sqrt[Abs[x]] + RandomReal[.5]}, {x, .25x^2 + RandomReal[.5]}, {x, -Sinc[x] + RandomReal[.5]}, {Cos[x], Sin[x] + RandomReal[.5]}}data = f /@ uni;Table[ListPlot[data[[All, i]], Frame -> True, Axes -> None, PlotLabel -> Row[{"𝒟 : ", HoeffdingD[data[[All, i]]][[1, 2]]}], PlotStyle -> Directive[PointSize[Tiny]], FrameTicks -> None], {i, 4}]Use HoeffdingDTest to determine if the value is statistically significant:
Table[HoeffdingDTest[Sequence@@Transpose[data[[All, i]]], "TestDataTable"], {i, 4}]Properties & Relations (4)
Larger values of Hoeffding's indicate increasing dependence:
dep = Range[-.999, .999, .005];data = BlockRandom[SeedRandom[1];Table[RandomVariate[BinormalDistribution[i], 500], {i, dep}]];ListPlot[Transpose[{dep, HoeffdingD[#][[1, 2]]& /@ data}], AxesLabel -> {"ρ", "𝒟"}]Hoeffding's matrix is symmetric:
hfd = HoeffdingD[RandomVariate[BinormalDistribution[1 / 3], 10 ^ 3]];SymmetricMatrixQ[hfd]The diagonal elements of Hoeffding's matrix are 1:
data = RandomInteger[{-3, 3}, {100, 15}];Diagonal[HoeffdingD[data]]Hoeffding's for a continuous bivariate distribution:
𝒟 = CopulaDistribution[{"AMH", 2 / 3}, {UniformDistribution[{0, 1}], UniformDistribution[{0, 1}]}];HoeffdingD[𝒟, 1, 2]30 Expectation[(CDF[𝒟, {x, y}] - CDF[ProductDistribution[Sequence@@Table[MarginalDistribution[𝒟, i], {i, 2}]], {x, y}])^2, {x, y}𝒟]% - %%//FullSimplifyRelated Guides
History
Text
Wolfram Research (2012), HoeffdingD, Wolfram Language function, https://reference.wolfram.com/language/ref/HoeffdingD.html.
CMS
Wolfram Language. 2012. "HoeffdingD." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HoeffdingD.html.
APA
Wolfram Language. (2012). HoeffdingD. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HoeffdingD.html
BibTeX
@misc{reference.wolfram_2026_hoeffdingd, author="Wolfram Research", title="{HoeffdingD}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/HoeffdingD.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_hoeffdingd, organization={Wolfram Research}, title={HoeffdingD}, year={2012}, url={https://reference.wolfram.com/language/ref/HoeffdingD.html}, note=[Accessed: 12-June-2026]}