The mean absolute difference (univariate) is a measure of statistical dispersion equal to the average absolute difference of two independent values drawn from a probability distribution. A related statistic is the relative mean absolute difference, which is the mean absolute difference divided by the arithmetic mean, and equal to twice the Gini coefficient. The mean absolute difference is also known as the absolute mean difference (not to be confused with the absolute value of the mean signed difference) and the Gini mean difference (GMD). The mean absolute difference is sometimes denoted by Δ or as MD.
Definition The mean absolute difference is defined as the "average" or "mean", formally the expected value, of the absolute difference of two random variables X and Y independently and identically distributed with the same (unknown) distribution henceforth called Q.
M D := E [ | X − Y | ] . {\displaystyle \mathrm {MD} :=E[|X-Y|].}
Calculation Specifically, in the discrete case,
For a random sample of size n of a population distributed uniformly according to Q, by the law of total expectation the (empirical) mean absolute difference of the sequence of sample values yi, i = 1 to n can be calculated as the arithmetic mean of the absolute value of all possible differences:
M D = E [ | X − Y | ] = E X [ E Y | X [ | X − Y | ] ] = 1 n 2 ∑ i = 1 n ∑ j = 1 n | x i − y j | . {\displaystyle \mathrm {MD} =E[|X-Y|]=E_{X}[E_{Y|X}[|X-Y|]]={\frac {1}{n^{2}}}\sum _{i=1}^{n}\sum _{j=1}^{n}|x_{i}-y_{j}|.}
if Q has a discrete probability function f(y), where yi, i = 1 to n, are the values with nonzero probabilities:
M D = ∑ i = 1 n ∑ j = 1 n f ( y i ) f ( y j ) | y i − y j | . {\displaystyle \mathrm {MD} =\sum _{i=1}^{n}\sum _{j=1}^{n}f(y_{i})f(y_{j})|y_{i}-y_{j}|.}
In the continuous case,
if Q {\displaystyle Q} has a probability density function f ( x ) {\displaystyle f(x)} :
M D = ∫ − ∞ ∞ ∫ − ∞ ∞ f ( x ) f ( y ) | x − y | d x d y . {\displaystyle \mathrm {MD} =\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }f(x)\,f(y)\,|x-y|\,dx\,dy.}
An alternative form of the equation is given by:
M D = ∫ 0 ∞ ∫ − ∞ ∞ 2 f ( x ) f ( x + δ ) δ d x d δ . {\displaystyle \mathrm {MD} =\int _{0}^{\infty }\int _{-\infty }^{\infty }2\,f(x)\,f(x+\delta )\,\delta \,dx\,d\delta .}
if Q {\displaystyle Q} has a cumulative distribution function F ( x ) {\displaystyle F(x)} with quantile function Q ( F ) {\displaystyle Q(F)} , then, since f ( x ) = d F ( x ) / d x {\textstyle f(x)=dF(x)/dx} and Q ( F ( x ) ) = x {\displaystyle Q(F(x))=x} , it follows that:
… excerpt ends here. Continue reading the full article.
