Returns the mean absolute difference of the input data series.

## Syntax

**MD**(**X**)

- X
- is the input data sample (one/two-dimensional array of cells (e.g., rows or columns)).

## Remarks

- The input time series data may include missing values (e.g., #N/A, #VALUE! #NUM! empty cell), but those will not be included in the calculations.
- The sample mean difference (MD) is computed as follows: $$\Delta = {\rm{MD}} = \frac{{\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n ||{{x_i} - {x_j}}|| } }}{{n \times \left( {n - 1} \right)}}$$ Where:
- $x_i$ is the value of the i-th non-missing observation.
- $n$ is the number of non-missing observations in the sample.

- The mean absolute difference is the product of the sample mean, and the relative mean difference (RMD) and so can also be expressed in terms of the Gini coefficient: \[{\rm{MD}} = 2 \times G \times \bar x\] Where:
- $\bar x$ is the arithmetic sample mean.
- $G$ is the Gini Coefficient.

- Because it is related to the Gini coefficient, the mean difference is called the "Gini mean difference." It is also known as the "Absolute mean difference."
- The sample mean difference is not dependent on a specific measure of central tendency like the standard deviation.
- The mean difference of a sample is an unbiased and consistent estimator of the population mean difference.

## Related Links

- Wikipedia - Mean difference.

## References

- Hamilton, J.D.; Time Series Analysis, Princeton University Press (1994), ISBN 0-691-04289-6.
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-69074.

## Comments

Article is closed for comments.