Module 2: Mathematical Operations and Index Numbers Flashcards
What does aggregation mean?
- It is when you combine multiple numbers to form a single number
When do we use aggregation?
- We usually use this with some time series to reduce the frequency: Monthly, quarterly, annual
How do we inform our software that our datasets are time series
Usually our datasets have a date column but we need to make sure they understand its for DATES
Before formatting our dataset what do we need to understand first about the dataset?
The date conventions (or dates in datasets)
What are the two different date conventions that can exists for time series?
- Flow + stock variables
What are ‘flow variables’
- Flow variables are considdered to be the average flow over the period
- This means when we set the exact time of the average flow to the center of the period
What are stock variables?
- We consider stock variables to be the total amount at the end of the period
- The exact time for the stock variables is at the end of the hour
In Macroeconomics are there many types of stock + flow variables?
YES
What’s an example of a flow variable?
Consumption as it accumulates the stock of goods
What is the units per measurement for the flow of consumptions
Dollars per month
What if we have annual/quarterly for both stock + flow variables?
Stock:
Annual: End of the year –> Dec 31
Quarter: end of the quarter –> March 31
Flow:
Annual: July 1
Quarterly: Feb 15 (first quarter)
What’s an exampl of a stock/flow vairbale that is considered neither?
Temperature
What is the dates if its neither a flow or stock?
Every time we have a variable that represents an average we set the date to the middle and if its for the total over till the end (stock variable)
Can stock variables be averages?
YES stats Canada does it as they publish stats that use the average population
How do we define our datasets as time series?
- There might not be a column that has a definite date column (either fix or create one)
How to create a monthly time series?
- Add and use the year month date provided and make a column
- Its a monthly time series so we set the date to the middle of the month (flow variable)
How to name a table
- Go to ‘design’ and change the ‘table name’
How to create an annual time series?
- We create the date column
- However the actual day we set to the middle of the year as its annual flow vraible (july 1)
How to add a date column in decimal format
Annual time series
Decimal date = Year + 0.5
Quarterly:
Decimal date = Year + 1/8 + Q-1/4
Monthly:
Decimal date = year + 1/24 + M-1/12
What’s a big problem when numbers are saved in text format?
it affects mathematical oerpations so we to change it column by column
What should we do if the series are in different units of measurements?
- Make sure to change them into the same units
How to change *c to *f?
C = (F-32) *5/9
What are growth rates?
Growth rates in this context describes changes in any variable between two periods in percentage form
XT- Express the value of a variable at time T
XT -1 –> expresses the value of the same variable one period in the past
(this is dependent on the time units)
If its monthly previous month and so on
What is the equation for the Growth rate?
gt = (Xt - Xt-1 / xt-1)*100
For growth rates do you need to only express as a %
No you can keep it as a decima;
When we played around with the equation what did we come to learn?
(gt+1 ) = (xt / xt-1)
Whats something to keep in mind about mathematical operations with gt?
Never express growth rates in % when doing mathematical operations: use decimal before converting
Do growth rates have measurements?
NO
Will growth rates in each example be constant?
NO
What is the growth rate of a product?
(1+ gx)*(1+gy) -1 = gx + gy –> apporximation
Do we wat a higher or smaller growth rate?
Smaller thats why we most likely use the approximation instead of the formula
What is the growth rate of ratios?
gt = (1+ gx) / (1+ gy) = gx - gy
Can growth rates be negative
Yes so read the question crefully
What is the equation for annualized growth rates (monthly data)
gt = (1+ gt)^12 -1
What are annualized growth rates?
Its when a monthly growth rate is annualized and calculated over one year
What is the equation for annualzied gt (quarterly )
gt = (1+ gt) ^4 -1
For any positive/neagtive numbers for log(ab)
log(ab) = Log(a) = Log(B)
Log(a/b) = Log(a) - log (B)
How do we express log in
natural (ln)
How to interpret the growth rate using log?
Log(xt) - log(xt-1) = log(xt/xt-1) = log(1+gt)
What if we want the growth rate of the log (product version)
={ log(xt) - log(xt-1)} + {log(yt) - log(yt-1) = (gx + gy)
What is aggregation?
its when we combine multiple numbers to form a single number
- its main usage was to reduce the frequency of a time series
- Converting a monthly –> quarterly
How to do aggregation?
- if it’s monthly to quarters you take the first three months and add them up to make 1 quarter –. yearly add everything up
When we refer to a variable in anexcel file what do we mean?
- Its when we look by the name of the table followed by the name of the varibake inside the brackets
Ex:
= tempdata[jjA]
What are the different logical operators
”>=”
“<”
“<=”
“=”
how to take average for 3 months using sum?
=sum(tempdata[@jun] , [@jul] , [@Aug] ) / 3
= sum(tempdata[@[jun] : [Aug] ] ) /3
how to use round to find the average of the three months
=round(average([tempdata[@[jun] : [Aug]] , 2)
How do we use ‘sumif’/ averageif to find the co2 emission after 1980
=sumif([co2Y[date]] , “>1980” , co2y[co2}
Third argument what we want to sum
First was what we wanted to restrict the observation
Second was the actual restriction
How to restrict observations based on a date? (ex: Suppose you want the total CO2 emission before January 15th 1970.
=sumif(co2Y[date] , “<”&DATE(1970, 1 ,15) , co2Y[co2])
Can we impose more than one rrestriction? How? Suppose for example that we want the total CO2
emission between January 1st 1980 and March 20th 1995.
=SUMIFS(co2data[Co2], co2data[Date], “<”&DATE(1995, 3, 20), co2data[Date], “>”&DATE(1980,1,1))
1st argument –> the variable used for the operation
Second is the variable for the first criteria
Third –> is the restriction
fourth –> second criteria
fifth –> restriction