# MeanDeviation

MeanDeviation[list]

gives the mean absolute deviation from the mean of the elements in list.

# Details • For the list {x1,x2,,xn}, the mean deviation is given by , where is the mean of the list.
• MeanDeviation handles both numerical and symbolic data.
• MeanDeviation[{{x1,y1,},{x2,y2,},}] gives {MeanDeviation[{x1,x2,}],MeanDeviation[{y1,y2,},]}.

# Examples

open allclose all

## Basic Examples(2)

MeanDeviation of a list:

MeanDeviation of columns of a matrix:

## Scope(9)

Exact input yields exact output:

Approximate input yields approximate output:

MeanDeviation for a matrix gives columnwise means:

Works with large arrays:

SparseArray data can be used just like dense arrays:

Find the mean deviation of WeightedData:

Find the mean deviation of EventData:

Find the mean deviation for TimeSeries:

The mean deviation depends only on the values:

Find the mean deviation of data involving quantities:

## Generalizations & Extensions(1)

Compute results for a SparseArray:

## Applications(3)

Identify periods of high volatility in stock data using a five-year moving mean deviation:

Compute mean deviations for slices of a collection of paths of a random process:

Choose a few slice times:

Plot mean deviations over these paths:

Find the mean deviation of the heights for the children in a class:

Plot the mean deviation respective of the mean:

## Properties & Relations(4)

MeanDeviation is the Mean of absolute deviations from the Mean:

MeanDeviation is equivalent to the 1norm of the deviations divided by the Length:

For large uniform datasets, MeanDeviation and MedianDeviation are nearly the same:

MeanDeviation as a scaled ManhattanDistance from the Mean:

## Neat Examples(1)

Ratio of MeanDeviation to MedianDeviation for increasing sample size: