Lecture 15: Revision for Final
Types of jobs where these skills are valuable:
\[\hat{Y}_i = b X_i + a\]
The slope \(b\) can be calculated using:
\[b = \rho \frac{\sigma_y}{\sigma_x}\]
where:
\(R^2\) tells us the variance explained in our outcome variable by our predictor variable(s).
\(R^2\) ranges from 0 to 1: \(R^2 \in [0, 1]\)
We typically convert to a percentage by multiplying by 100.
Interpretation: “Our model explains X% of the variance in our outcome variable.”
For example, \(R^2 = 0.6527\) means the model explains 65.27% of the variance.
Coefficient Interpretation
On average, EU countries live 5.82 years longer compared to non-EU countries.
Magnitude
Residual: the difference between observed and predicted values:
\[e_i = Y_i - \hat{Y}_i\]
Standard Error of the slope:
\[SE(b) = \sqrt{\frac{1}{n-2} \cdot \frac{\sum e_i^2}{\sum(X_i - \bar{X})^2}}\]
For \(\hat{\beta}_1\) to be unbiased, we need:
Omitted Variable Bias — the most common violation: when a variable affects both \(X\) and \(Y\) but is left out of the model, \(\hat{\beta}_1\) is biased.
| OLS4 | |
|---|---|
| (Intercept) | 48.979*** |
| (1.040) | |
| EU | 33.097*** |
| (6.595) | |
| Urbanization | 0.233*** |
| (0.019) | |
| EU \(\times\) Urbanization | -0.456*** |
| (0.097) | |
| Num.Obs. | 215 |
| \(R^2\) | 0.464 |
+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001
Summary statistics reveal central tendency (mean, median), variability (SD), and outliers (min, max).
| life_expectancy | urbanization | gdp | log_gdp | |
|---|---|---|---|---|
| life_expectancy | 1 | . | . | . |
| urbanization | .66 | 1 | . | . |
| gdp | .55 | .62 | 1 | . |
| log_gdp | .77 | .77 | .84 | 1 |
A correlation table tells us about the strength and direction of the linear relationship between two variables.
When the independent variable is log-transformed:
\[Y = \beta_0 + \beta_1 \log(X)\]
A 1% increase in \(X\) is associated with a \(\beta_1 / 100\) unit change in \(Y\).
Example: If \(\beta_1 = 7.5\) for log(GDP) predicting life expectancy, then a 1% increase in GDP is associated with a \(7.5 / 100 = 0.075\) year increase in life expectancy.
For OLS to be the Best Linear Unbiased Estimator (BLUE):
Scaling: \(z_i = \frac{x_i - \bar{x}}{\sigma_x}\) — puts variables on a common scale (standard deviations)
\(R^2\) vs. Adjusted \(R^2\)
A public policy program should contain the following elements:
\[\text{Inputs} \rightarrow \text{Activities} \rightarrow \text{Outputs} \rightarrow \text{Outcomes}\]
Three types of associations: Confounding (problematic), Collision (problematic), Mediation (helpful)
Collision — a distortion that modifies an association between X and Y, caused by attempts to control for a common effect of X and Y.
Mediation — a hypothesized causal chain in which X affects Z, which in turn affects Y.
The challenge in causal inference is that we do not observe both potential outcomes — we only observe one.
For example, one patient gets or does not get a pill.
We don’t get to observe the outcome for both taking and not taking the pill for the same patient.
Random assignment of treatment implies that selection bias is 0.
Randomization ensures that the ATE and ATT are the same and equal to the observed difference in means.
RCTs are usually considered the best approach to studying causal effects. However:
A study can have strong internal validity but weak external validity (and vice versa).
Statistical power is the probability of detecting a true effect (i.e., avoiding a Type II error).
Experimental studies are more likely to establish cause-and-effect relationships:
Observational studies can provide valuable real-world insights but are more prone to bias and confounding.
\[\text{DiD} = (\bar{Y}_{T,\text{after}} - \bar{Y}_{T,\text{before}}) - (\bar{Y}_{C,\text{after}} - \bar{Y}_{C,\text{before}})\]
As a regression:
\[Y_{it} = \beta_0 + \beta_1 \text{Group}_i + \beta_2 \text{Time}_t + \beta_3 (\text{Group}_i \times \text{Time}_t) + \varepsilon_{it}\]
Does raising the minimum wage reduce employment?
| Before | After | Change | |
|---|---|---|---|
| NJ (treatment) | 20.44 | 21.03 | +0.59 |
| PA (control) | 23.33 | 21.17 | −2.16 |
\[\text{DiD} = 0.59 - (-2.16) = \mathbf{2.75}\]
Raising the minimum wage increased employment — contrary to textbook predictions.
Parallel Trends Assumption
The treatment and control groups have the same trends prior to the intervention.
We assume the treatment group would have changed like the control group in the absence of the treatment.
Timing
Sometimes, units receive treatment at different times, which can distort our estimates.
Pre-treatment trends are parallel — DiD is valid
Pre-treatment trends diverge — DiD is not valid
Already-treated “Early Adopters” used as controls for “Late Adopters” — biased estimates
The exam in relation to grading:
Problem Sets (Reminder)
Average of:
Peer-grading: evaluating your colleague’s participation (5%)
What are some aspects of the course that you liked?
What are areas for improvement?
Let’s do the course evaluations.
1. You have the following regression model:
\[\text{Final\_grade} = 51 + 2 \times X_i\]
where 51 is the constant, 2 is \(b\), and \(X_i\) is the number of hours studied. What is the predicted final grade for a student who studies 21 hours?
2. You have a model predicting regime turnover using natural oil reserves. Every ton increase in oil reserves is associated with a 35% higher chance of democratization. \(R^2 = 0.62\). How do you interpret the \(R^2\)?
4. Interpret the coefficient for math score and for female
5. What can you say about the statistical significance of the two variables? Why?
6. Look at the following regression predicting income (thousands of dollars per month). Male is a binary variable. Interpret it.
8. Interpret the following coefficients
You are trying to explain health scores (0 to 10) using age (years) and weight (kilos) as independent variables.
9. What is statistical power?
10. What is maturation and why is it a threat to internal validity?
11. What is attrition and why is it a threat to internal validity?
12. How can sample selection affect external validity?
13. Examine the following graph. Do you see a violation of the parallel trends assumption? Answer Yes or No.

1. \(\text{Final\_grade} = 51 + 2 \times 21 = 51 + 42 = 93\)
2. Oil reserves explain 62 percent of the variation in democratization.
4. Interpret the coefficients:
5. Only math is statistically significant at 5% because \(p < 0.05\). The female variable is significant at the 0.051 level.
6.
Men make 249 dollars per month more than women, holding other factors constant.
7. Men make \(1{,}583 + 249 = 1{,}832\) dollars a month. Women make \(1{,}583\) dollars a month.
8.
9. Statistical power is the probability of a hypothesis test finding an effect if there is an effect to be found.
10. Maturation — participants may change over time, even in the absence of an intervention.
11. Attrition — occurs when a randomly assigned participant drops out. E.g., participants who drop out are those not responding well to therapy.
12. Sample selection is the process of selecting a sample that is not reflective of the actual population. The experimental sample may not be representative.
13. No.

Popescu (JCU) Statistical Analysis Lecture 15: Revision for Final