Mean absolute difference
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
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.
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. \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 y i , i = 1 to n can be calculated as the arithmetic mean of the absolute value of all possible differences: \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 y i , i = 1 to n, are the values with nonzero probabilities: \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 has a probability density function f(x) : \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: \mathrm{MD} = \int_{0}^\infty \int_{-\infty}^\infty 2\,f(x)\,f(x+\delta)\,\delta\,dx\,d\delta . if Q has a cumulative distribution function F(x) with quantile function Q(F) , then, since f(x)=dF(x)/dx and Q(F(x))=x , it follows that: \mathrm{MD} = \int_0^1 \int_0^1 |Q(F_1)-Q(F_2)|\,dF_1\,dF_2 . \mathrm{RMD} = \frac{\mathrm{MD}}{\mathrm{AM}}. The relative mean absolute difference quantifies the mean absolute difference in comparison to the size of the mean and is a dimensionless quantity. The relative mean absolute difference is equal to twice the Gini coefficient which is defined in terms of the Lorenz curve. This relationship gives complementary perspectives to both the relative mean absolute difference and the Gini coefficient, including alternative ways of calculating their values. \mathrm{MD(X + c) = MD(X)} , \mathrm{MD(-X)=MD(X)} , and \mathrm{MD(cX)=|c|MD(X)} . The relative mean absolute difference is invariant to positive scaling, commutes with negation, and varies under translation in proportion to the ratio of the original and translated arithmetic means. That is to say, if X is a random variable and c is a constant: \mathrm{RMD}(X + c) = \mathrm{RMD}(X) \cdot \frac{\mathrm{mean}(X)}{\mathrm{mean}(X) + c} = \frac{\mathrm{RMD}(X)}{1 + \frac{c}{\mathrm{mean}(X)}} \quad \text{for } c \ne -\mathrm{mean}(X) , \mathrm{RMD}(-X) = -\mathrm{RMD}(X) , and \mathrm{RMD}(cX) = \mathrm{RMD}(X) \quad \text{for } c > 0 . If a random variable has a positive mean, then its relative mean absolute difference will always be greater than or equal to zero. If, additionally, the random variable can only take on values that are greater than or equal to zero, then its relative mean absolute difference will be less than 2. \mathrm{MD}(S) = \frac{\sum_{i=1}^n \sum_{j=1}^n | y_i - y_j |}{n(n-1)} is a consistent and unbiased estimator of MD(X). The statistic: \mathrm{RMD}(S) = \frac{\sum_{i=1}^n \sum_{j=1}^n | y_i - y_j |}{(n-1)\sum_{i=1}^n y_i} is a consistent estimator of RMD(X), but is not, in general, unbiased. Confidence intervals for RMD(X) can be calculated using bootstrap sampling techniques. There does not exist, in general, an unbiased estimator for RMD(X), in part because of the difficulty of finding an unbiased estimation for multiplying by the inverse of the mean. For example, even where the sample is known to be taken from a random variable X(p) for an unknown p, and has the Bernoulli distribution, so that and , then . But the expected value of any estimator R(S) of RMD(X(p)) will be of the form: \operatorname{E}(R(S)) = \sum_{i=0}^n p^i (1-p)^{n-i} r_i , where the r i are constants. So E(R(S)) can never equal RMD(X(p)) for all p between 0 and 1.
See also
Mean absolute error Mean deviation Estimator Coefficient of variation L-moment
References
Text derived from https://en.wikipedia.org/w/index.php?oldid=1308678384 under CC BY-SA 4.0; modifications have been made.