How to use the AVEDEV function
What is the AVEDEV function?
The AVEDEV function calculates the average of the absolute deviations of data points from their mean. AVEDEV is a measure of the variability in a data set. Variability is the extent to which a distribution is stretched or squeezed. The absolute deviation from the mean helps us understand how "spread out" the values in a data set are, it describes the variation in a data set.
Table of Contents
1. Introduction
What is an average?
An average is a statistical measure of the central or typical value in a data set that provides an estimation of expected results by calculating the sum of values divided by total occurrences. Common averages include the arithmetic mean, median, and mode, each of which summarize data in different ways.
What is an absolute deviation?
Absolute deviation is a statistical measure of spread or variability in a data set that sums the total distance each data point is from a measure of central tendency such as the mean or median without regard to direction plus or minus. It provides an easy way to quantify dispersion from a central value unlike variance.
What is mean?
The arithmetic mean, more simply referred to as the "average" or mean, is a fundamental concept in statistics that is computed by summing all values in a sample or population and dividing this total by the number of values, giving the balance point if the data were evenly distributed.
What is variability?
Variability refers to a characteristic of a data set describing the amount of dispersion or spread between data points that measures how far individual numbers tend to deviate from the mean, reflecting the breadth of the distribution; common ways to quantify variability include the variance, standard deviation, and interquartile range.
What is a distribution?
A distribution in statistics is the description of the relative number of times each different outcome will occur in a sample or population, modeled by a histogram or probability distribution that reflects central tendency, variability, skew, normality, and other aspects of the data spread.
What does it mean if a distribution is stretched or squeezed?
If a distribution appears stretched, it indicates higher variability with values more dispersed widely around the mean, while a squeezed distribution has lower variability with values clustered closer together near the mean due to a smaller standard deviation.
What is variation?
Variation, or variability, is the amount of diversity present in a sample or population revealed by the tendency of individual data points to differ from the measure of central tendency, with more variation meaning a wider dispersal and larger differences among values.
2. AVEDEV Function Syntax
AVEDEV(number1, [number2], ...)
3. AVEDEV Function Arguments
number1 | Required. A cell reference to number(s) or an array of numbers. |
[number2] | Optional. Up to 254 additional number arguments. |
4. AVEDEV Function Example 1
This example demonstrates how to use the AVEDEV function, the image above shows the following values in cell range B3:B10 : 8, 4, 5, 2, 5, 14, 9, and 6
The formula in cell D3 calculates the average (mean) deviation based on the numbers described above. The AVEDEV returns always an absolute number meaning the result is always a positive number.
The average deviation is a measure that describes how spread out the numbers are from the average.
Formula in cell D3:
Here is how the average deviation is calculated.
- Calculate the average.
- Distance from the average.
- Add deviations
- Divide the total by the number of observations
Calculate the average
The average is calculated like this: 8+4+5+2+5+14+9+6 = 53
53 / 8 = 6.625
Absolute distance from the average
| 8-6.625 | = 1.375
| 4-6.625 | = 2.625
| 5-6.625 | = 1.625
| 2-6.625 | = 4.625
| 5-6.625 | = 1.625
| 14-6.625 | = 7.375
| 9-6.625 | = 2.375
| 6-6.625 | = 0.625
Add the deviations
1.375 + 2.625 + 1.625 + 4.625 + 1.625 + 7.375 + 2.375 + 0.625 = 22.25
Divide the total by the number of observations
The total number is 8.
22.25 / 8 = 2.78125
2.78125 matches the calculated value in cell D3.
The chart above shows a thicker black line which represents the average 6.625, the dashed lines displays the average deviation meaning the distance from the average. The first dashed line shows the upper average deviation:
6.625+2.78125 = 9.40625
The second dashed line shows the lower average deviation.
6.625-2.78125 = 3.84375
5. AVEDEV Function Example 2
This second example shows how to calculate the average deviation based on a frequency table. The AVEDEV function can't calculate the average deviation based on a frequency table, we need to create a new formula that handles frequency tables.
The image above shows the following frequency table in cell range B3:C10:
Frequency | Number |
2 | 8 |
4 | 4 |
1 | 5 |
3 | 2 |
6 | 5 |
2 | 14 |
3 | 9 |
5 | 6 |
The following formula calculates the average deviation by:
- Calculate the average based on the numbers and frequency in the frequency table.
- Calculate the distance from the average.
- Multiply the distance by the frequency.
- Add deviations.
- Divide the total by the number of observations.
Formula in cell E3:
Excel 365 subscribers may use this smaller formula:
The major advantage is that you only need to adjust two cell references compared to the larger formula above.
Here are the values based on the frequency table:
8 | 5 | 5 | 9 | 6 |
8 | 2 | 5 | 9 | 6 |
4 | 2 | 5 | 9 | |
4 | 2 | 5 | 6 | |
4 | 5 | 14 | 6 | |
4 | 5 | 14 | 6 |
The AVEDEV function returns the same value as our formula above, the calculations are correct.
Explaining the formula in cell E3
Step 1 - Calculate the average based on the frequency table
The SUM function allows you to add numerical values, the function returns the sum in the cell it is entered in. The SUM function is cleverly designed to ignore text and boolean values, adding only numbers.
Function syntax: SUM(number1, [number2], ...)
SUM(C3:C10*B3:B10)/SUM(B3:B10)
becomes
SUM({8;4;5;2;5;14;9;6}*{2;4;1;3;6;2;3;5})/SUM({2;4;1;3;6;2;3;5})
becomes 158/26 and returns 6.07692307692308
Step 2 - Calculate the distance
The ABS function converts negative numbers to positive numbers.
Function syntax: ABS(number)
ABS((C3:C10-SUM(C3:C10*B3:B10)/SUM(B3:B10)))
becomes
ABS(({8;4;5;2;5;14;9;6}-6.07692307692308)
and returns {1.92307692307692; ... ;0.0769230769230802}
Step 3 - Multiply the distance by the frequency
ABS((C3:C10-SUM(C3:C10*B3:B10)/SUM(B3:B10)))*B3:B10
returns {3.84615384615385; ... ;0.384615384615383}
Step 4 - Add values and return total
SUM(ABS((C3:C10-SUM(C3:C10*B3:B10)/SUM(B3:B10)))*B3:B10)
returns 56.9230769230769
Step 5 - Divide total by the number of observations
SUM(ABS((C3:C10-SUM(C3:C10*B3:B10)/SUM(B3:B10)))*B3:B10)/SUM(B3:B10)
becomes
56.9230769230769 / 26 equals 2.18934911242604 This value matches the value in cell E3.
6. Function not working
The AVEDEV function propagates error values if an error value is in the source data points. It also returns #NAME? error if you misspell the function name.
7.1 Troubleshooting the error value
When you encounter an error value in a cell a warning symbol appears, displayed in the image above. Press with mouse on it to see a pop-up menu that lets you get more information about the error.
- The first line describes the error if you press with left mouse button on it.
- The second line opens a pane that explains the error in greater detail.
- The third line takes you to the "Evaluate Formula" tool, a dialog box appears allowing you to examine the formula in greater detail.
- This line lets you ignore the error value meaning the warning icon disappears, however, the error is still in the cell.
- The fifth line lets you edit the formula in the Formula bar.
- The sixth line opens the Excel settings so you can adjust the Error Checking Options.
Here are a few of the most common Excel errors you may encounter.
#NULL error - This error occurs most often if you by mistake use a space character in a formula where it shouldn't be. Excel interprets a space character as an intersection operator. If the ranges don't intersect an #NULL error is returned. The #NULL! error occurs when a formula attempts to calculate the intersection of two ranges that do not actually intersect. This can happen when the wrong range operator is used in the formula, or when the intersection operator (represented by a space character) is used between two ranges that do not overlap. To fix this error double check that the ranges referenced in the formula that use the intersection operator actually have cells in common.
#SPILL error - The #SPILL! error occurs only in version Excel 365 and is caused by a dynamic array being to large, meaning there are cells below and/or to the right that are not empty. This prevents the dynamic array formula expanding into new empty cells.
#DIV/0 error - This error happens if you try to divide a number by 0 (zero) or a value that equates to zero which is not possible mathematically.
#VALUE error - The #VALUE error occurs when a formula has a value that is of the wrong data type. Such as text where a number is expected or when dates are evaluated as text.
#REF error - The #REF error happens when a cell reference is invalid. This can happen if a cell is deleted that is referenced by a formula.
#NAME error - The #NAME error happens if you misspelled a function or a named range.
#NUM error - The #NUM error shows up when you try to use invalid numeric values in formulas, like square root of a negative number.
#N/A error - The #N/A error happens when a value is not available for a formula or found in a given cell range, for example in the VLOOKUP or MATCH functions.
#GETTING_DATA error - The #GETTING_DATA error shows while external sources are loading, this can indicate a delay in fetching the data or that the external source is unavailable right now.
7.2 The formula returns an unexpected value
To understand why a formula returns an unexpected value we need to examine the calculations steps in detail. Luckily, Excel has a tool that is really handy in these situations. Here is how to troubleshoot a formula:
- Select the cell containing the formula you want to examine in detail.
- Go to tab “Formulas” on the ribbon.
- Press with left mouse button on "Evaluate Formula" button. A dialog box appears.
The formula appears in a white field inside the dialog box. Underlined expressions are calculations being processed in the next step. The italicized expression is the most recent result. The buttons at the bottom of the dialog box allows you to evaluate the formula in smaller calculations which you control. - Press with left mouse button on the "Evaluate" button located at the bottom of the dialog box to process the underlined expression.
- Repeat pressing the "Evaluate" button until you have seen all calculations step by step. This allows you to examine the formula in greater detail and hopefully find the culprit.
- Press "Close" button to dismiss the dialog box.
There is also another way to debug formulas using the function key F9. F9 is especially useful if you have a feeling that a specific part of the formula is the issue, this makes it faster than the "Evaluate Formula" tool since you don't need to go through all calculations to find the issue..
- Enter Edit mode: Double-press with left mouse button on the cell or press F2 to enter Edit mode for the formula.
- Select part of the formula: Highlight the specific part of the formula you want to evaluate. You can select and evaluate any part of the formula that could work as a standalone formula.
- Press F9: This will calculate and display the result of just that selected portion.
- Evaluate step-by-step: You can select and evaluate different parts of the formula to see intermediate results.
- Check for errors: This allows you to pinpoint which part of a complex formula may be causing an error.
The image above shows cell reference B3:B10 converted to hard-coded value using the F9 key. The AVEDEV function requires nonerror values in the source data range which is not the case in this example. We have found what is wrong with the formula.
Tips!
- View actual values: Selecting a cell reference and pressing F9 will show the actual values in those cells.
- Exit safely: Press Esc to exit Edit mode without changing the formula. Don't press Enter, as that would replace the formula part with the calculated value.
- Full recalculation: Pressing F9 outside of Edit mode will recalculate all formulas in the workbook.
Remember to be careful not to accidentally overwrite parts of your formula when using F9. Always exit with Esc rather than Enter to preserve the original formula. However, if you make a mistake overwriting the formula it is not the end of the world. You can “undo” the action by pressing keyboard shortcut keys CTRL + z or pressing the “Undo” button
7.3 Other errors
Floating-point arithmetic may give inaccurate results in Excel - Article
Floating-point errors are usually very small, often beyond the 15th decimal place, and in most cases don't affect calculations significantly.
Functions in 'Statistical' category
The AVEDEV function function is one of 73 functions in the 'Statistical' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form