Mean absolute difference
The mean absolute difference 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 and the Gini mean difference. 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 distribution henceforth called Q.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 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:
- if Q has a discrete probability function f, where yi, i = 1 to n, are the values with nonzero probabilities:
- if Q has a probability density function f:
- if Q has a cumulative distribution function F with quantile function Q, then, since f=dF/dx and Q=x, it follows that:
Relative mean absolute difference
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.
Properties
The mean absolute difference is invariant to translations and negation, and varies proportionally to positive scaling. That is to say, if X is a random variable and c is a constant:- MD = MD,
- MD = MD, and
- MD = |c| MD.
- RMD = RMD · mean/ = RMD / for c ≠ −mean,
- RMD = −RMD, and
- RMD = RMD for c > 0.
Compared to standard deviation
The mean absolute difference is twice the L-scale, while the standard deviation is the square root of the variance about the mean. The differences between L-moments and conventional moments are first seen in comparing the mean absolute difference and the standard deviation.Both the standard deviation and the mean absolute difference measure dispersion—how spread out are the values of a population or the probabilities of a distribution. The mean absolute difference is not defined in terms of a specific measure of central tendency, whereas the standard deviation is defined in terms of the deviation from the arithmetic mean. Because the standard deviation squares its differences, it tends to give more weight to larger differences and less weight to smaller differences compared to the mean absolute difference. When the arithmetic mean is finite, the mean absolute difference will also be finite, even when the standard deviation is infinite. See the [|examples] for some specific comparisons.
The recently introduced distance standard deviation plays similar role to the mean absolute difference but the distance standard deviation works with centered distances. See also E-statistics.
Sample estimators
For a random sample S from a random variable X, consisting of n values yi, the statisticis a consistent and unbiased estimator of MD. The statistic:
is a consistent estimator of RMD, but is not, in general, unbiased.
Confidence intervals for RMD can be calculated using bootstrap sampling techniques.
There does not exist, in general, an unbiased estimator for RMD, 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 for an unknown p, and has the Bernoulli distribution, so that and, then
But the expected value of any estimator R of RMD will be of the form:
where the r i are constants. So E can never equal RMD for all p between 0 and 1.
Examples
Distribution | Parameters | Mean | Standard deviation | Mean absolute difference | Relative mean absolute difference |
Continuous uniform | a = 0 ; b = 1 | 1 / 2 = 0.5 | 1 / 3 ≈ 0.3333 | 2 / 3 ≈ 0.6667 | |
Normal | μ = 1 ; σ = 1 | 1 | 1 | ||
Exponential | λ = 1 | 1 | 1 | 1 | 1 |
Pareto | |||||
Gamma | k ; θ | kθ | † | † | |
Gamma | k = 1 ; θ = 1 | 1 | 1 | 1 | 1 |
Gamma | k = 2 ; θ = 1 | 2 | 3 / 2 = 1.5 | 3 / 4 = 0.75 | |
Gamma | k = 3 ; θ = 1 | 3 | 15 / 8 = 1.875 | 5 / 8 = 0.625 | |
Gamma | k = 4 ; θ = 1 | 4 | 2 | 35 / 16 = 2.1875 | 35 / 64 = 0.546875 |
Bernoulli | 0 ≤ p ≤ 1 | p | for p > 0 | ||
Student's t, 2 d.f. | ν = 2 | 0 | ∞ | undefined |