Average Absolute Deviation?

13 次查看(过去 30 天)
Delany MacDonald
Delany MacDonald 2016-3-16
编辑: Meg Noah 2025-8-8
What is the coding in matlab to find the AAD?

回答(4 个)

John D'Errico
John D'Errico 2016-3-16
1. Compute the deviation. (You have not said what the deviation is from, so I cannot answer that.)
2. Compute the absolute value of the deviations. abs will suffice.
help abs
3. Use mean to compute the average.
help mean
  1 个评论
Delany MacDonald
Delany MacDonald 2016-3-16
If its standard deviation would it be y= std(x) then absy = abs(y) then meany = mean(absy)?

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2016-3-16
mean( abs(x - mean(x)) )

Image Analyst
Image Analyst 2016-3-16
编辑:Image Analyst 2016-3-16
We usually find the median absolute deviation is a better measure https://en.wikipedia.org/wiki/Median_absolute_deviation because the measure itself is less affected by outliers.
On a global basis you can do
mad = median(abs(array(:) - median(array(:))))
We often use it to find outliers in the data.

Meg Noah
Meg Noah 2025-8-8
编辑:Meg Noah 2025-8-8
The Average Absolute Deviation (AAD) is the mean of deviations from a central point (central tendency).
If the central point is the mean of the data set, then the AAD is also referred to as the Mean Absolute Deviation (MAD).
If the central point is the median of the data set, then the AAD is also referred to as the Median Absolute Deviation, which can also be abbreviated as MAD.
If the central point is the mode of the data set, then the AAD is the Mode Absolute Deviation.
The central point can be determined other ways as well.
To add to the confusion of this, the Median Absolute Deviation can also be mathematically defined as:
Example:
rng default
X = randi([1 10],1,20)
X = 1×20
9 10 2 10 7 1 3 6 10 10 2 10 10 5 9 2 5 10 8 10
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
meanAbsoluteDeviation = mean(abs(X-mean(X)))
meanAbsoluteDeviation = 2.9600
medianAbsoluteDeviation = mean(abs(X-median(X)))
medianAbsoluteDeviation = 2.8500
medianAbsoluteDeviation2 = median(abs(X-median(X)))
medianAbsoluteDeviation2 = 1.5000
modeAbsoluteDeviation = mean(abs(X-mode(X)))
modeAbsoluteDeviation = 3.0500

类别

Help CenterFile Exchange 中查找有关 Sources and Sinks 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by