Compute Averages and Conditional Averages in Excel

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

MODULE 1

CONCEPTS, TRENDS, AND


INSTITUTIONAL SETTING

HOW TO COMPUTE AVERAGES AND CONDITIONAL AVERAGES IN EXCEL

Excel provides quick and easy methods for computing averages. The command “AVERAGE” allows
us to compute the average of a set of numbers. In the screenshot below, we take the average
revenue-to-GDP ratio in 2016 for the following countries: France, Germany, and the United Kingdom.
The colon in this formula represents the average over the range covered in cells C2 through C4.
Using this formula, we find that the average total revenue-to-GDP ratio for these three countries in
2016 is 44.8 percent.

Excel also allows for the calculation of conditional averages. This is done through the “AVERAGEIF”
command. The syntax for this formula is: =AVERAGEIF(range,criteria,average range)

Let us illustrate how this can be used in practice by looking at the “World” tab in the “WoRLD_data”
Excel file that you will use for this exercise. Assume that we seek to compute the average tax
revenue in 2015 across all countries. To achieve this, we would use the following formula:

=AVERAGEIF(B2:B4915,2015,D2:D4915)
MODULE 1
CONCEPTS, TRENDS, AND
INSTITUTIONAL SETTING

The formula directs a search for the values in column B (the “years” column) which are equal to 2015
and then computes the average tax ratio using values in the column D for that year. Using this formula,
we find that the average tax-to-GDP ratio worldwide in 2015 is 18.35%.

To complete the assessments included in this module, you will have to calculate the average tax ratio
for different regions of the world. Those regions are included in column Q of the dataset.
MODULE 1
CONCEPTS, TRENDS, AND
INSTITUTIONAL SETTING

The AVERAGEIFS formula allows you to extend the AVERAGEIF formula to cover multiple criteria.
The syntax for this formula is given below.

=AVERAGEIFS(average range,range1,criteria1,range2,criteria2… )

Suppose we seek to compute the average tax ratio for countries in the Middle Eastern and Central
Asian region in 2015. One could use either formula:

=AVERAGEIFS(D2:D4915,Q2:Q4915,Q2,B2:B4915,2015)
or
=AVERAGEIFS(D2:D4915,Q2:Q4915,"IMF Middle East and Central Asia
Department",B2:B4915,2015)
MODULE 1
CONCEPTS, TRENDS, AND
INSTITUTIONAL SETTING

The first argument specifies the range of the values we seek to average, i.e. the tax ratio which is
located in the column D, from cells D2 to D4915. The second argument specifies the range of the first
criteria, i.e. the region, which is located in the column Q. The third argument specifies the criteria for
the region, i.e. “IMF Middle East and Central Asia Department” (often referred to as the MECA
region); in this example, one can use the full name of the region as in the first formula. The second
option is to specify a cell in the column Q which refers to the MECA region; in the second formula
above, we pick the cell Q2 (i.e. Afghanistan). The fourth argument is the range for the second criteria,
i.e. the year, which is located in the column B. The last argument specifies the criteria for the year, i.e.
“2013”. Using this formula, we find that the average tax-to-GDP ratio for the Middle Eastern and
Central Asian region in 2015 is 12.79%.

You might also like