WOLFRAM

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

Details

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

MeanDeviation of a list of numbers:

Out[1]=1

MeanDeviation of symbolic data:

Out[1]=1

MeanDeviation of the columns of a matrix:

Out[1]=1

MeanDeviation of a list of dates:

Out[1]=1

Scope  (18)Survey of the scope of standard use cases

Basic Uses  (6)

Exact input yields exact output:

Out[1]=1
Out[2]=2

Approximate input yields approximate output:

Out[1]=1
Out[2]=2

Find the mean deviation of WeightedData:

Out[1]=1
Out[3]=3

Find the mean deviation of EventData:

Out[2]=2

Find the mean deviation for TimeSeries:

Out[1]=1

The mean deviation depends only on the values:

Out[2]=2

Find the mean deviation of data involving quantities:

Out[1]=1
Out[2]=2

Array Data  (5)

MeanDeviation for a matrix works columnwise:

Out[1]=1

MeanDeviation for a tensor works across the first index: »

Out[1]=1

Works with large arrays:

Out[1]=1
Out[2]=2

When the input is an Association, MeanDeviation works on its values:

Out[1]=1
Out[2]=2

SparseArray data can be used just like dense arrays:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Find mean deviation of a QuantityArray:

Out[1]=1
Out[2]=2

Image and Audio Data  (2)

Channelwise mean deviation value of an RGB image:

Out[1]=1
Out[2]=2

Mean deviation value of a grayscale image:

Out[3]=3

On audio objects, MeanDeviation works channelwise:

Out[1]=1
Out[2]=2
Out[3]=3

Date and Time  (5)

Compute mean deviation of dates:

Out[2]=2
Out[3]=3
Out[5]=5

Compute the weighted mean deviation of dates:

Out[1]=1
Out[3]=3

Compute the mean deviation of dates given in different calendars:

Out[1]=1
Out[2]=2
Out[3]=3

Compute the mean deviation of times:

Out[1]=1
Out[2]=2

Compute the mean deviation of times with different time zone specifications:

Out[1]=1
Out[2]=2

Applications  (3)Sample problems that can be solved with this function

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

Out[5]=5

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:

Out[4]=4

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

Out[2]=2
Out[3]=3

Plot the mean deviation respective of the mean:

Out[4]=4

Properties & Relations  (4)Properties of the function, and connections to other functions

MeanDeviation is the Mean of absolute deviations from the Mean:

Out[2]=2
Out[3]=3

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

Out[2]=2
Out[3]=3

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

Out[2]=2
Out[3]=3

MeanDeviation as a scaled ManhattanDistance from the Mean:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4

Neat Examples  (1)Surprising or curious use cases

Ratio of MeanDeviation to MedianDeviation for increasing sample size:

Out[2]=2
Wolfram Research (2007), MeanDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanDeviation.html (updated 2024).
Wolfram Research (2007), MeanDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanDeviation.html (updated 2024).

Text

Wolfram Research (2007), MeanDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanDeviation.html (updated 2024).

Wolfram Research (2007), MeanDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/MeanDeviation.html (updated 2024).

CMS

Wolfram Language. 2007. "MeanDeviation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MeanDeviation.html.

Wolfram Language. 2007. "MeanDeviation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MeanDeviation.html.

APA

Wolfram Language. (2007). MeanDeviation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeanDeviation.html

Wolfram Language. (2007). MeanDeviation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeanDeviation.html

BibTeX

@misc{reference.wolfram_2025_meandeviation, author="Wolfram Research", title="{MeanDeviation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/MeanDeviation.html}", note=[Accessed: 27-February-2025 ]}

@misc{reference.wolfram_2025_meandeviation, author="Wolfram Research", title="{MeanDeviation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/MeanDeviation.html}", note=[Accessed: 27-February-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_meandeviation, organization={Wolfram Research}, title={MeanDeviation}, year={2024}, url={https://reference.wolfram.com/language/ref/MeanDeviation.html}, note=[Accessed: 27-February-2025 ]}

@online{reference.wolfram_2025_meandeviation, organization={Wolfram Research}, title={MeanDeviation}, year={2024}, url={https://reference.wolfram.com/language/ref/MeanDeviation.html}, note=[Accessed: 27-February-2025 ]}