0% found this document useful (0 votes)
24 views9 pages

6-Avg Median

Uploaded by

Abdelhamid Hamdy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views9 pages

6-Avg Median

Uploaded by

Abdelhamid Hamdy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Difference Between Average, Median, and

Mode
Microsoft Excel provides many built-in functions to increase the productivity of its
users. Three of these functions are AVERAGE, MEDIAN, and MODE. However,
many folks confuse the definitions of these three terms.

Example #1
In our first example we will find the average (or mathematical mean), median, and
mode of the following set of values:.

2, 2, 3, 4, 5

AVERAGE
To find the average (also called the mean) of a dataset, the numbers are added and
then their total is divided by how many numbers are in the set. So, the sum of these 5
numbers is 16, and 16 divided by 5 is 3.2.

MEDIAN
The median is the middle number in a set of numbers listed in numerical order. Our
median is 3.

MODE
The mode is the number that appears most frequently in a set of numbers. The mode
in this example is 2 because there are two 2s.

Example #2
In our second example, we determine the average, median, and mode of a dataset
comprised of the following six numbers:

2, 6, 1, 3, 8, 4

Well, it's always a good idea to put the values in numerical order to ensure no errors
are made. So here we go:

1, 2, 3, 4, 6, 8

AVERAGE
The six values are added together (24) and then divided by 6 to arrive at an average of
4.

MEDIAN
With an even number of values in the set, there is no middle number. So we
must average the two middle numbers. The median is 3.5 (3+4=7, and 7÷2=3.5).

MODE
Since no number in the list occurs more than once, this set of numbers has no mode

The AVERAGE Function


We often use the word "average" in our daily lives. But in
mathematics, the average (or mean), of a group of numbers
has a strict definition. (To differentiate between mean
(average), mode, and median, check out our tutorial, Average
vs. Median vs. Mode.) OK - let's begin!

What is the AVERAGE Function?


When you find the average of a group of numbers, you
calculate their sum and then divide the sum by the number of
numbers in the group. Microsoft Excel calculates averages
with the AVERAGE function. The syntax of the AVERAGE
function is:

AVERAGE(number1, number2, number3, ... )

Where:

► number1, number2, etc. are from 1 to 255 arguments for


which Excel should find the average. The arguments can be
numbers; or cell references, cell ranges, formulas, or other
functions that resolve to a number.

Cells that contain the AVERAGE function should be formatted


to a desired number of decimal points as the decimal portion
may be infinite when averaging numbers. Look at our first
example below.

Example of the AVERAGE Function


=AVERAGE(4,5,2) . . . This Excel function adds three numbers
and divides by 3: (4 + 5 + 2 = 11; 11 ÷ 3 = 3.66666..... If the cell
is formatted to display 2 decimal points, Excel returns a value
of 3.67

Worksheet Examples of the AVERAGE Function


Column A contains the actual AVERAGE function, so what you
see in the cells in Column A is the result of the function. We've
written the text of the function in Column B. The data that the
function uses resides in cells C1 through C4.
Example #1: =AVERAGE(C1,C4) . . . This example shows that
individual cell references can be arguments. The average of C1
and C4 is 4: 3 + 5 = 8; 8 ÷ 2 = 4

Example #2: =AVERAGE(C1:C3) . . . This example shows the


function containing a cell range. The average of the first 3
cells in Column C is 3: 3 + 4 + 2 = 9; 9 ÷ 3 = 3

Example #3: =AVERAGE(C1:C2,5) . . . This example shows that


arguments can be numbers: 3 + 4 + 5 = 12; 12 ÷ 3 = 4

Example #4: =AVERAGE(C1:C2,C4) . . . This example mixes a


cell range with a cell reference. Since C4 contains the number
5, the answer is the same as Example #3 above

Example #5: =AVERAGE(PRODUCT(C1,C2),C4) . . . In this


example we embedded the PRODUCT function inside the
AVERAGE function. This formula takes the average of 12
(product of 3 x 4) and 5 to arrive at a value of 8.5

Example #6: =SUM(AVERAGE(C1:C3),C4) . . . This example


shows the AVERAGE function embedded in a SUM function.
This formula adds the average of C1 through C3, which is 3, to
the contents of cell C4, which is 5, for a value of 8

Considerations
All Excel functions start with an equal = sign UNLESS the
function is inside another function. For example, there is no
equal sign in front of the AND function in:
=IF(AND(B2>0,C2<1),"Yes","No").

Don't forget to format the cells containing the function so the


values will display with the desired number of decimal places.
This should be done ahead of time for best results

The AVERAGEIF Function


The AVERAGEIF function of Microsoft Excel is a worksheet function that returns the
average of a range of cells that meet the criteria specified by the user. This tutorial
teaches how to use the AVERAGEIF function.

The AVERAGEIF function can be used with Excel 2016, Excel 2013, Excel 2011 for
Mac, Excel 2010, and Excel 2007

The AVERAGEIF Function


The syntax of the AVERAGEIF function is:

AVERAGEIF(range, criteria, [range-to-average])

Where:

► range is the cell range upon which to apply the criteria. Range can include
numbers, cell references and arrays that contain numbers, or cell names. (required)

► criteria is the criteria you are testing for (required)

► range-to-average (optional) is the range of cells you want to average IF the


specified criteria is met. If omitted, the range specified in the range parameter is used.

Usage Notes for the AVERAGEIF Function


 If "range" is empty or no cells meet the "criteria," Excel will display a #DIV/0! error.
 Cells in "range" containing TRUE or FALSE are ignored.
 An empty cell in "criteria" is treated as a 0 value.
 The default "criteria" operator is equals. Other operators include >, <, >=, <=, <> (not
equal).
 If "criteria" contains an operator and text, together they must be wrapped in double
quotes (Example #1)
 If "criteria" contains an operator and cell reference, the operator is wrapped in double
quotes and an ampersand & is placed in front of the cell address (Example #2).
 "Range" and "range-to-average" don't have to be the same size and shape

How to Use the AVERAGEIF Function


Our sample worksheet contains 4 columns of data: Sales Reps, Region, Product A
sales, and Product B sales. Our six examples show how to use the AVERAGEIF
function with numbers, text, operators, cell references, and wildcards.

♦ Text Criteria and Cell Address Criteria


First we'll find the average of Product B sales for reps in the South region. We show
the function where our text criteria is hard-coded, and the function contains a cell
reference.

Example #1 - text criteria hard-coded: =AVERAGEIF(B2:B7,"south",D2:D7)


- This function says: For rows 2 through 7, if the value in column B is south, then
average the values in column D.
- The text, south doesn't require an = sign, and uppercase / lowercase is not relevant,
but the text must be enclosed in double quotes.
- Since there are three reps in region South, and the sum of their Prod. B sales is $600,
their average is $200.

Example #2 - cell reference criteria: =AVERAGEIF(B2:B7,B2,D2:D7).


In this example our criteria is simply B2 as it contains our text and the operator is
equals - the default. Operators other than equals require double quotes; see the next
two examples.
♦ Using Different Operators (<>)
Let's find the average of Product A sales for reps whose Product B sales are NOT
zero. Remember, the criteria is applied to the first cell range of the function.

Example #3: =AVERAGEIF(D2:D7,"<>0",C2:C7)


The operator and number must be wrapped in double quotes. Four reps qualify and
their Prod. A sales total $4,000. Divide by 4, and Excel returns an average of $1,000.

♦ Criteria with Number or Cell Reference


Here we show two ways to calculate the average sales for reps who have sold > $100
of Product B. In the first function, we hardcode 100 in the criteria; in the second
example, we reference a cell address containing 100 in the criteria. (There is no
"range-to-average," so "range" is used.)

Example #4 - number criteria hard-coded: =AVERAGEIF(D2:D7,">100")


The criteria must be enclosed in double quotes. Only Sam and Jon qualify. The sum of
their Prod. B sales is $600, and the average is $300.
Example #5 - cell reference criteria: =AVERAGEIF(D2:D7,">"&D2)
We specify the number portion of the criteria by referencing cell D2. Just the >
operator is wrapped in double quotes, and we must place an ampersand (&) - Excel's
concatenation operator - before the cell address so Excel won't think it's text.

♦ AVERAGEIF Function: Wildcards in Criteria


Calculate the average of Product A sales for reps whose names start with A.

Example #6: =AVERAGEIF(A2:A7,"a*",C2:C7)


Wildcards are only applied to text, not numbers. Our criteria for "names that begin
with the letter A is written "a*" and no equal sign is needed, of course. Two reps
qualify and their Prod. A sales total $5,000. Excel returns an average of $2,500.

BONUS: We want the average of Prod. B sales for just those reps in East and West,
and we want to use wildcards. So =AVERAGEIF(B2:B7,"*st",D2:D7) would work.
BUT on a spreadsheet that contains other regions, like Northeast, we'd want to use
this function, =AVERAGEIF(B2:B7,"??st",D2:D7), as each ? wildcard specifies one
digit.

Size of "Range" and "average-to-range"


"Range" and "range-to-average" don't have to be the same size, but as Microsoft
explains, "range-to-average" that Excel will use will always begins in its upper left
cell, and the size of "range-to-average" will always equal that of "range," so be aware.

For example, let's suppose you enter this formula:


=AVERAGEIF(C5:C6,">=1",D2:D7). Since your range contains only two cells, if the
condition is met, Excel will average the values in D2 and D3 - the first two cells in the
range-to-average.

You might also like