Chapter 1: Introduction to Data
We will now begin our discussion of data. Data can be a powerful tool to answer important questions in Economics and beyond, but we must be sure we are understanding and using our data correctly. Today we will go over different types of data we will encounter in this class.
To be able to make assertions about the broader population, our typical goal, we want our sample data to be representative. We will talk more about what this means later.
There are many types of data we may encounter as well:
Furthermore, continuous numerical data can take any real number as a value, e.g. GDP, while discrete numerical data can take only separate, countable values (often whole numbers), e.g. number of classes taken in a quarter
Finally, we may need or want to transform our data in some way for analysis, e.g. calculating a growth rate
The method we use to obtain our data also matters:
We can further classify our data by thinking about how many units of observation and points in time it covers:
We denote a variable \(x_{...}\) with its necessary subscripts depending on the kind of data it contains:
The \(i\) subscript corresponds to units of observation
The \(t\) subscript corresponds to points in time
What kind of variable would \(x_i\) be? \(x_t\)? \(x_{it}\)?
\(x_i\) would be a cross-sectional variable, \(x_t\) would be a time-series variable, and \(x_{it}\) would be a panel variable.
The main goal for a field like Economics is ultimately causality, or the robust determination that x causes y. Experimental and quasi-experimental methods speak to this concern, but are often unfeasible or impractical to implement. For this class, we will restrict our discussion to correlational variable relationships, where x and y are covarying but we cannot claim causality.
We cannot say: x going up causes y to go up
We can say: x going up is associated with y going up as well
Summation notation: how we add across observations
\[x_1+x_2+x_3+x_4 = \sum_{i=1}^4x_i\]
“Add up the first four observations of a variable \(x\)”
Generally for a variable \(x\) with sample size \(n\) we write:
\[\sum_{i=1}^nx_i\]
“Sum up all observations in our sample from 1 to \(n\)”
We can also add/subtract and multiply/divide elements within a summation:
\[\begin{align*} X &= \sum_{i=1}^{3} 2x_i+7\\ &= \underbrace{2x_1+7}_{i=1} + \underbrace{2x_2 + 7}_{i=2} + \underbrace{2x_3 + 7}_{i=3} \\ &= 2(x_1+x_2+x_3) + 7(3)\\ &= 2\sum_{i=1}^3(x_i) + 21 \end{align*}\]
For a constant \(c\) with sample size \(n\):
\[\sum_{i=1}^n c = nc\text{ and } \sum_{i=1}^n c(x_i) = c\sum_{i=1}^nx_i\]
What do the following sums add to?
\[\sum_{i=5}^6 i\]
\[\sum_{i=1}^3(2i + 1)=2\sum_{i=1}^3 (i) + 3(1)\]
\[\sum_{i=1}^3 2^i\]
What do the following sums add to?
\[\sum_{i=5}^6 i=5+6=11\]
\[\sum_{i=1}^3(2i+1)=3+5+7=15\]
\[\sum_{i=1}^3 2^i=2+4+8=14\]
What types of data are the following examples and why?
Quarterly data on average US mortgage rates 2005-2015
Data on the mode of transit used to commute around Davis from a sample of 200 students
Data on the number of students attending each elementary school in Yolo county this year
Results from a double-blind medical trial of a new drug on immediate patient outcomes