1/25
Looks like no tags are added yet.
Confounding variable (definition)
A third variable that affects both X and Y, making them look related when X doesn't cause Y. The X–Y relationship is spurious.
3 criteria for a confounder
(1) related to X, (2) related to Y, (3) not caused by X (not on the causal path from X to Y).
Smoking vs. life expectancy plot: upward line, slope = 6.8 years per 1,000 cigarettes. Interpret.
"A 1,000-cigarette increase per person is associated with an average increase of 6.8 years in life expectancy." Not causal: confounded by national wealth (rich countries smoke more AND have better healthcare). The relationship is spurious.
Correlation vs. causation
Observational correlation does not prove X causes Y; confounders may drive both.
Experimental vs. observational data
Experimental: researcher randomly assigns X, so confounders are balanced → causal claims. Observational: X is just observed (people choose), so confounders can differ → must measure and control for them.
Random assignment protects against…
Confounding. Allows causal conclusions.
Random sampling protects against…
Selection bias. Allows generalizing from the sample to the population.
Counterfactual
The ideal comparison: what happens to the SAME person with X vs. without X. Impossible, so we compare groups.
3 assumptions of linear regression
(1) Linearity: means of Y on a straight line. (2) Constant variance (homoscedasticity): same spread at every X. (3) Normality: Y bell-shaped at each X.
Skewness: what it does
Long tail on one side; mean pulled toward the tail, so mean ≠ typical value. Right skew: mean > median.
Multimodality
Two or more peaks; suggests hidden subgroups / an omitted categorical variable.
Heavy tails
Extreme values more common than normal; mean unstable; least squares inefficient.
Heteroscedasticity (definition and consequence)
Spread of Y changes with X (often a funnel). Estimates stay unbiased but inefficient; standard errors, CIs and p-values are wrong.
Nonlinearity consequence
Relationship is curved; a straight line gives biased predictions.
Wages vs. education plot: columns get taller as education rises. What does it show?
The spread of wages grows with education → heteroscedasticity (non-constant variance). The black line = conditional mean (average wage at each education level).
Conditional distribution
Distribution of Y for observations with one specific value of X (e.g., wages of people with exactly 12 years of education).
Conditional mean
Average of Y at a given X, E(Y | X = x). Regression models conditional means.
Nonparametric regression
Estimates how the mean of Y changes with X without assuming a shape (e.g., binning, loess); lets the data show the shape. Needs lots of data.
Binning
Split X into bins, average Y in each bin, connect the averages.
Loess / lowess
Local averaging: a moving window slides along X and averages nearby points, giving a smooth curve.
Span (loess)
Fraction of data in each local window. Large span = smooth, low variance, more bias. Small span = wiggly, low bias, high variance (can overfit).
Bias–variance trade-off
Wide bins/large span: low variance, high bias (misses shape). Narrow bins/small span: low bias, high variance (noisy). Fix: large n.
Loess plot with spans 0.2 (wiggly), 0.5, 0.7 (smooth): which to choose?
About 0.5: the smallest span that still gives a reasonably smooth curve. 0.2 chases noise (overfits); 0.7 may miss real features.
Prestige vs. income loess plot: describe
Positive but nonlinear: prestige rises steeply at low income then levels off (diminishing returns). A straight line would miss the curve.
Curse of dimensionality
With many Xs, the number of bins/cells explodes (10 values^3 = 1,000 cells), so each has too little data; nonparametric regression breaks down.
Outlier effect on bin averages (Davis obs. 4)
One extreme point can distort a conditional mean (bin average).