1/25
Looks like no tags are added yet.
What is a confounding variable?
A third variable that affects BOTH X and Y. It makes X and Y look related even when X does not cause Y. The X–Y relationship it creates is called spurious.
What 3 conditions make a variable a confounder?
(1) It is related to X. (2) It is related to Y. (3) It is NOT caused by X (it is not a step on the path from X to Y; that would be a mediator).
Plot: countries' cigarette consumption per person (X) vs. life expectancy (Y). The fitted line slopes UP, slope = 6.8 years per 1,000 cigarettes. Interpret it.
What you see: countries that smoke more live longer. Interpretation: "A 1,000-cigarette increase per person is associated with an average increase of 6.8 years in life expectancy." Meaning: this is NOT causal. National wealth is a confounder: rich countries can afford more cigarettes AND have better healthcare. The relationship is spurious.
Why doesn't correlation prove causation?
In observational data a confounder can drive both X and Y. A correlation only says they move together, not that changing X would change Y.
Experimental vs. observational data
Experimental: the researcher RANDOMLY ASSIGNS X, so confounders are balanced across groups → causal claims are possible. Observational: X is just observed (people choose it), so groups can differ on confounders → you must measure and control for them, and causal claims are weaker.
What does random ASSIGNMENT protect against?
Confounding. Because X is assigned by chance, the groups are alike on everything else, so differences in Y can be attributed to X (causal conclusion).
What does random SAMPLING protect against?
Selection bias. A random sample represents the population, so results can be generalized from the sample to the population. (It does NOT remove confounding.)
What is the counterfactual, and why can't we observe it?
The ideal comparison: the SAME person with X and without X at the same time. Impossible to observe both, so we compare different groups and must worry about how those groups differ.
What are the 3 basic assumptions behind a linear regression of Y on X?
(1) Linearity: the average of Y at each X lies on a straight line. (2) Constant variance (homoscedasticity): Y has the same spread at every X. (3) Normality: at each X, Y is bell-shaped around its average.
Skewness: what it looks like and what it does
A long tail on one side of the distribution. The mean is pulled toward the tail, so the mean is not a typical value. Right skew (tail to the right): mean > median.
Multimodality: what it looks like and what it suggests
Two or more peaks in the distribution. Suggests hidden subgroups, e.g., an omitted categorical variable such as sex or occupation type.
Heavy tails: what they mean
Extreme values happen more often than in a normal distribution. The mean becomes unstable and least squares becomes inefficient (estimates bounce around a lot).
What is heteroscedasticity, and what does it do to a regression?
The spread of Y changes with X (often a funnel shape in a scatterplot). Coefficient estimates stay unbiased but are inefficient, and the standard errors, CIs and p-values are wrong.
What happens if you fit a straight line to a curved relationship?
The line is the wrong shape, so predictions are systematically too high in some ranges and too low in others (biased). Check with a scatterplot or a smooth (loess) curve.
Plot: wages (Y) vs. years of education (X). The vertical columns of points get TALLER as education increases, and a black line connects the average wage at each education level. What does it show?
What you see: average wage rises with education, and the spread of wages also grows with education. Meaning: (1) the black line is the conditional mean, E(wage | education). (2) Growing spread = heteroscedasticity (non-constant variance), which violates the constant-variance assumption.
What is a conditional distribution?
The distribution of Y for the observations that share ONE specific value of X, e.g., the wages of only the people with exactly 12 years of education.
What is a conditional mean, and why does it matter?
The average of Y at a given value of X: E(Y | X = x). Regression is a model of how conditional means change with X.
What is nonparametric regression?
A way to estimate how the average of Y changes with X WITHOUT assuming a shape (e.g., a straight line). The data decide the shape. Examples: binning, loess. Needs a lot of data.
How does binning work?
Split X into intervals (bins), compute the average Y in each bin, and connect the averages. Simple nonparametric regression.
How does loess (lowess) work?
A window slides along X; at each point it fits/averages only the nearby observations (closer points get more weight). Joining these local fits gives a smooth curve that follows the data's shape.
What is the span in loess, and what happens when it is large vs. small?
The fraction of the data used in each local window. Large span (e.g., 0.7): smooth curve, low variance, but more bias (can miss real bends). Small span (e.g., 0.2): wiggly curve, low bias, but high variance (chases noise, overfits).
Explain the bias–variance trade-off for smoothing
Wide bins / large span: low variance but high bias (misses the true shape). Narrow bins / small span: low bias but high variance (noisy). The only way to get both low is more data (large n).
Plot: three loess curves on the same data with spans 0.2 (very wiggly), 0.5, and 0.7 (very smooth). Which do you pick and why?
About 0.5: the smallest span that still gives a reasonably smooth curve. 0.2 follows random noise (overfitting); 0.7 may smooth away real features (bias).
Plot: occupational prestige (Y) vs. average income (X) for Canadian occupations, with a loess curve that rises steeply and then flattens. Describe and interpret.
What you see: positive but curved relationship. Prestige rises quickly at low incomes and levels off at high incomes (diminishing returns). Meaning: a straight line would understate the effect at low income and overstate it at high income; a transformation (e.g., log income) or curve is needed.
What is the curse of dimensionality?
With many Xs, the number of bins explodes (3 Xs with 10 bins each = 10³ = 1,000 cells), so each cell has too few observations. Nonparametric regression breaks down; we need a model like linear regression.
How can a single outlier affect a binning (bin-average) curve?
One extreme point can pull its bin's average far away from the others, distorting the conditional mean. Example: in the Davis weight data, one woman whose weight was recorded incorrectly as 166 kg distorts the average in her bin.