PS 812 - Introduction to Statistical Methods in Political Science
October 20, 2026
\[ \newcommand{\Var}{\text{Var}} \newcommand{\Cov}{\text{Cov}} \newcommand{\Corr}{\text{Corr}} \newcommand{\indep}{\mathrel{\perp\mkern-10mu\perp}} \]
Adapted from Blackwell (2025), Ch. 2
\(\mathbb{E}[\hat{\mu}] =\)
\(\displaystyle \mathbb{E}\left[\frac{1}{n}\sum_{i=1}^n Y_i\right]\)
\(\displaystyle \frac{1}{n}\sum_{i=1}^n \mathbb{E}[Y_i]\)
\(\displaystyle \frac{1}{n}\sum_{i=1}^n \mu\)
\(\displaystyle \mu\)
linearity of expectations
identical: \(\mathbb{E}[Y_i] = \mu\)
unbiased
\(\Var(\hat{\mu}) =\)
\(\displaystyle \Var\left(\frac{1}{n}\sum_{i=1}^n Y_i\right)\)
\(\displaystyle \frac{1}{n^2}\left[\sum_{i=1}^n \Var(Y_i) + \sum_{i=1}^n \sum_{j \neq i} \Cov(Y_i, Y_j)\right]\)
\(\displaystyle \frac{1}{n^2}\sum_{i=1}^n \Var(Y_i)\)
\(\displaystyle \frac{1}{n^2}\sum_{i=1}^n \sigma^2\)
\(\displaystyle \frac{\sigma^2}{n}\)
constants out squared; variance of a sum
independent: \(\Cov(Y_i, Y_j) = 0\)
identical: \(\Var(Y_i) = \sigma^2\)
sampling variance
\(\hat{\mu} \sim \; {\color{#c5050c}{?}}\left(\mu, \dfrac{\sigma^2}{n}\right)\)
\(\hat{\mu} \sim \; {\color{#c5050c}{?}}\left(\mu, \dfrac{\sigma^2}{n}\right)\)
Sometimes we’ll want to use shorthand to characterize how fast a term shrinks (or grows)
Little-\(o\) notation: \(a_n = o(b_n)\) means \(\dfrac{a_n}{b_n} \to 0\) as \(n \to \infty\)
Big-\(O\) notation: \(a_n = O(b_n)\) means \(\left|\dfrac{a_n}{b_n}\right|\) stays bounded as \(n \to \infty\)
So \(o(1)\) is anything going to \(0\), and \(O(1)\) is anything that stays bounded
For random variables, the same shorthand is stated in terms of probabilities
Little-\(o_p\) notation denotes convergence (in probability) to zero
Big-\(O_p\) notation denotes boundedness (in probability) of a sequence as \(n \to \infty\)
The rest of the orders are defined by rescaling
We want to approximate the sampling distribution of \(\bar{Y}_n\). Does \(\bar{Y}_n\) itself converge in distribution?
We need to analyze a sequence that does not collapse to a single point
We’ll rescale \(\bar{Y}_n - \mu\) by some factor that guarantees the variance converges to a non-zero constant \[\Var\big(n^r(\bar{Y}_n - \mu)\big) = n^{2r} \cdot \frac{\sigma^2}{n} = \sigma^2 n^{2r - 1} \to \begin{cases} 0 & r < 1/2 \\ \sigma^2 & r = 1/2 \\ \infty & r > 1/2 \end{cases}\]
So scaling the error by \(\sqrt{n}\) keeps the variance stable:
Sums and means of independent and identically distributed random variables tend to be normally distributed.
Central Limit Theorem: Let \(Y_1, Y_2, \dotsc, Y_n\) be i.i.d. with \(\mathbb{E}[Y_i] = \mu\) and \(\Var(Y_i) = \sigma^2 < \infty\). Then \[\sqrt{n}(\bar{Y}_n - \mu) \xrightarrow{d} \mathcal{N}(0, \sigma^2)\]
Equivalently, the standardized sample mean \(\dfrac{\bar{Y}_n - \mu}{\sigma/\sqrt{n}} \xrightarrow{d} \mathcal{N}(0, 1)\)
In the limit, the only things that matter about \(Y_i\) after averaging are its mean and variance
We’ll use this to say that for large \(n\), the sample mean is approximately normal \[\bar{Y}_n \overset{a}{\sim} \mathcal{N}\left(\mu, \frac{\sigma^2}{n}\right)\]
Let’s prove it!
Our proof requires a new concept: a moment generating function
The moment generating function (MGF) of a random variable \(X\) is \[M_X(t) = \mathbb{E}\left[e^{tX}\right]\] so long as it’s finite for all \(t\) in some interval around \(0\)
Taking the derivative and evaluating at \(t = 0\) generates the moments:
Define \(W_i = Y_i - \mu\), the centered draw, and let \(M(t) = \mathbb{E}\left[e^{tW_i}\right]\) be its MGF. Then \[M(0) = 1, \qquad M'(0) = \mathbb{E}[W_i] = 0, \qquad M''(0) = \mathbb{E}[W_i^2] = \sigma^2\]
Writing the scaled sum of the \(W_i\) \[\sqrt{n}(\bar{Y}_n - \mu) = \frac{1}{\sqrt{n}}\sum_{i=1}^n W_i\]
Call the MGF of this scaled error \(M_n(t)\). We first want to write \(M_n(t)\) in terms of \(M(t)\)
We’ll assume the MGF \(M\) exists
First, turn the sum in the exponent into a product \[\begin{aligned} M_n(t) &= \mathbb{E}\left[e^{t\sqrt{n}(\bar{Y}_n - \mu)}\right] && \small\color{#777777}{\text{definition of the MGF}} \\ &= \mathbb{E}\left[\exp\left(\tfrac{t}{\sqrt{n}}\textstyle\sum_{i=1}^n W_i\right)\right] && \small\color{#777777}{\text{scaled error = scaled sum}} \\ &= \mathbb{E}\left[\exp\left(\textstyle\sum_{i=1}^n \tfrac{t}{\sqrt{n}} W_i\right)\right] && \small\color{#777777}{\text{constant inside the sum}} \\ &= \mathbb{E}\left[\textstyle\prod_{i=1}^n \exp\left(\tfrac{t}{\sqrt{n}} W_i\right)\right] && \small\color{#777777}{e^{a + b} = e^a e^b} \end{aligned}\]
Then use the i.i.d. properties \[\begin{aligned} \mathbb{E}\left[\textstyle\prod_{i=1}^n \exp\left(\tfrac{t}{\sqrt{n}} W_i\right)\right] &= \textstyle\prod_{i=1}^n \mathbb{E}\left[\exp\left(\tfrac{t}{\sqrt{n}} W_i\right)\right] && \small\color{#777777}{\text{independent}} \\ &= \textstyle\prod_{i=1}^n M\left(\tfrac{t}{\sqrt{n}}\right) && \small\color{#777777}{\text{identical: each $W_i$ has MGF $M$}} \\ &= \left[M\left(\tfrac{t}{\sqrt{n}}\right)\right]^n && \small\color{#777777}{\text{$n$ identical factors}} \end{aligned}\]
Take a second-order Taylor expansion of \(M(t)\) around \(t = 0\) \[M(t) = M(0) + t\,M'(0) + \frac{t^2}{2}M''(0) + o(t^2) = 1 + 0 + \frac{\sigma^2 t^2}{2} + o(t^2)\] \(o(t^2)\) is the remainder - we use little-o notation to show that it goes to \(0\) faster than \(t^2\)
Evaluate it at \(t/\sqrt{n}\), which goes to \(0\) as \(n\) grows \[M_n(t) = \left[M\left(\frac{t}{\sqrt{n}}\right)\right]^n = \left[1 + \frac{\sigma^2 t^2}{2n} + o\left(\frac{1}{n}\right)\right]^n\]
Factor so this looks like the familiar compound interest formula. \[M_n(t) = \left(1 + \frac{a_n}{n}\right)^n, \qquad a_n = \frac{\sigma^2 t^2}{2} + n \cdot o\left(\frac{1}{n}\right)\]
The remainder is \(o\left(\frac{1}{n}\right)\) and shrinks faster than \(\frac{1}{n}\), so even \(n\) times it goes to \(0\).
Since \(a_n \to a\), for large \(n\) our \(M_n(t)\) behaves just like compound interest at the fixed rate \(a\), which is one our definitions of \(e\). \[M_n(t) = \left(1 + \frac{a_n}{n}\right)^n \approx \left(1 + \frac{a}{n}\right)^n \to e^{a} = e^{\sigma^2 t^2/2}\]
That’s the MGF of a \(\mathcal{N}(0, \sigma^2)\), so \(\sqrt{n}(\bar{Y}_n - \mu) \xrightarrow{d} \mathcal{N}(0, \sigma^2)\)
For an alternative proof that takes logs and applies L’Hôpital’s rule, see Blitzstein and Hwang (2019), Ch. 10
| CLT | Relaxes | Needs | Where you’ll see it |
|---|---|---|---|
| Lindeberg–Lévy | i.i.d., finite variance | Sample means under random sampling | |
| Lindeberg–Feller, Lyapunov | Identical distribution | No single term dominates the total variance | Heteroskedastic errors, robust SEs |
| Clustered | Independence within clusters | Many independent clusters, none dominant | Clustered samples, cluster-robust SEs |
| Mixing, \(m\)-dependent | Independence across time or space | Dependence dies out with distance | Time series and spatial data, HAC SEs |
| Martingale | Independence | Each term has mean zero given the past | Time series, adaptive experiments |
| Finite-population (Hájek) | An infinite population | \(n\) and \(N - n\) both large | Survey sampling, randomization inference |
| Multivariate | A single mean | Finite covariance matrix | Regression coefficients |
Consider \(X_n \xrightarrow{d} X\), \(Y_n \xrightarrow{p} c\) for a constant \(c\), and a continuous function \(g()\)
By the continuous mapping theorem, \(g(X_n) \xrightarrow{d} g(X)\)
By Slutsky’s theorem
Careful: \(X_n \xrightarrow{d} X\) and \(Y_n \xrightarrow{d} Y\) does not imply \(X_n + Y_n \xrightarrow{d} X + Y\) in general
Why this matters: we don’t know \(\sigma\), but if \(\hat{\sigma} \xrightarrow{p} \sigma\) (more on this later), we can plug it in and still know the asymptotic distribution. \[\frac{\bar{Y}_n - \mu}{\hat{\sigma}/\sqrt{n}} = \underbrace{\frac{1}{\hat{\sigma}}}_{\xrightarrow{p} 1/\sigma} \cdot \underbrace{\sqrt{n}(\bar{Y}_n - \mu)}_{\xrightarrow{d} \mathcal{N}(0, \sigma^2)} \xrightarrow{d} \frac{1}{\sigma}\mathcal{N}(0, \sigma^2) = \mathcal{N}(0, 1)\]
\(\hat{\mu} \overset{a}{\sim} \; {\color{#c5050c}{\mathcal{N}}}\left(\mu, \dfrac{\sigma^2}{n}\right)\)
So far, we’ve estimated one feature of the population: the mean \(\mu = \mathbb{E}[Y_i]\), with the sample mean \(\bar{Y}_n\)
But we often want to learn other features of the population distribution
Informally: Write down the feature of the population we care about, then compute its sample analog
Each of these features is a function of the CDF \(F\)
By the fundamental bridge, the CDF is an expectation of an indicator random variable
\[F(y) = \Pr(Y_i \le y) = \mathbb{E}\left[I(Y_i \le y)\right]\]
Its sample analog is the empirical CDF: replace the expectation with a sample mean \[\hat{F}_n(y) = \frac{1}{n}\sum_{i=1}^n I(Y_i \le y) = \text{share of observations at or below } y\]
A step function that jumps by \(\frac{1}{n}\) at each observation, even when \(Y_i\) is continuous
For any given value of \(y\), the indicators \(Z_i = I(Y_i \le y)\) are i.i.d. Bernoulli with mean \(\Pr(Y_i \le y) = F(y)\)
So \(\hat{F}_n(y) = \bar{Z}_n\) is just a sample mean, and everything we know about sample means applies
Even stronger, the Glivenko–Cantelli theorem shows that the largest gap over all \(y\) also goes to zero (with probability 1) \[\sup_y \left|\hat{F}_n(y) - F(y)\right| \to 0\]
A statistical functional \(T\) maps a CDF to a number. Many estimands can be written as \(\theta = T(F)\)
Notation: \(\int g(y)\,dF(y)\) means \(\sum_y g(y) f(y)\) if \(Y_i\) is discrete, or \(\int g(y) f(y)\,dy\) if it’s continuous.
Examples
The plug-in estimator of \(\theta = T(F)\) applies the same functional to the empirical CDF \[\hat{\theta} = T(\hat{F}_n)\]
\(\hat{F}_n\) is the CDF of a discrete distribution that puts mass \(\frac{1}{n}\) on each observation, so for any \(g\) \[\int g(y)\,d\hat{F}_n(y) = \sum_{i=1}^n g(Y_i) \cdot \frac{1}{n} = \frac{1}{n}\sum_{i=1}^n g(Y_i)\]
Mean: \(T_{\mu}(\hat{F}_n) = \frac{1}{n}\sum_{i=1}^n Y_i = \bar{Y}_n\).
Variance: \(T_{\sigma^2}(\hat{F}_n) = \frac{1}{n}\sum_{i=1}^n Y_i^2 - \bar{Y}_n^2 = \frac{1}{n}\sum_{i=1}^n (Y_i - \bar{Y}_n)^2\), the plug-in sample variance
Median: \(\hat{F}_n^{-1}(1/2)\), the sample median.
Tail probability: \(1 - \hat{F}_n(c)\), the share of observations above \(c\)
The population variance \[\sigma^2 = \mathbb{E}[Y_i^2] - \mu^2 \]
We can re-write our plug-in variance estimator the same way.
\[\begin{aligned} \hat{\sigma}^2_n &= \frac{1}{n}\sum_{i=1}^n (Y_i - \bar{Y}_n)^2 \\ &= \frac{1}{n}\sum_{i=1}^n \left(Y_i^2 - 2Y_i\bar{Y}_n + \bar{Y}_n^2\right) && \small\color{#777777}{\text{expand the square}} \\ &= \frac{1}{n}\sum_{i=1}^n Y_i^2 - 2\bar{Y}_n \cdot \frac{1}{n}\sum_{i=1}^n Y_i + \frac{1}{n}\sum_{i=1}^n \bar{Y}_n^2 && \small\color{#777777}{\text{split the sum; } \bar{Y}_n \text{ doesn't depend on } i} \\ &= \frac{1}{n}\sum_{i=1}^n Y_i^2 - 2\bar{Y}_n \cdot \bar{Y}_n + \bar{Y}_n^2 && \small\color{#777777}{\tfrac{1}{n}\textstyle\sum_i Y_i = \bar{Y}_n \text{, and } n \text{ copies of } \bar{Y}_n^2} \\ &= \frac{1}{n}\sum_{i=1}^n Y_i^2 - \bar{Y}_n^2 \end{aligned}\]
Is it unbiased? Take the expectation of each piece. First, the average of the squares \[\begin{aligned} \mathbb{E}\left[\frac{1}{n}\sum_{i=1}^n Y_i^2\right] &= \frac{1}{n}\sum_{i=1}^n \mathbb{E}\left[Y_i^2\right] && \small\color{#777777}{\text{linearity of expectations}} \\ &= \frac{1}{n} \cdot n\,\mathbb{E}\left[Y_i^2\right] = \mathbb{E}\left[Y_i^2\right] && \small\color{#777777}{\text{identically distributed}} \end{aligned}\]
Then the square of the average. Rearrange \(\Var(X) = \mathbb{E}[X^2] - \mathbb{E}[X]^2\) with \(X = \bar{Y}_n\) \[\begin{aligned} \mathbb{E}\left[\bar{Y}_n^2\right] &= \Var(\bar{Y}_n) + \mathbb{E}[\bar{Y}_n]^2 \\ &= \frac{\sigma^2}{n} + \mu^2 && \small\color{#777777}{\text{last week: } \mathbb{E}[\bar{Y}_n] = \mu,\ \Var(\bar{Y}_n) = \sigma^2/n} \end{aligned}\]
Combining the components \[\begin{aligned} \mathbb{E}\left[\hat{\sigma}^2_n\right] &= \mathbb{E}\left[\frac{1}{n}\sum_{i=1}^n Y_i^2\right] - \mathbb{E}\left[\bar{Y}_n^2\right] && \small\color{#777777}{\text{linearity of expectations}} \\ &= \mathbb{E}\left[Y_i^2\right] - \left(\frac{\sigma^2}{n} + \mu^2\right) && \small\color{#777777}{\text{the two pieces}} \\ &= \left(\mathbb{E}\left[Y_i^2\right] - \mu^2\right) - \frac{\sigma^2}{n} && \small\color{#777777}{\text{regroup}} \\ &= \sigma^2 - \frac{\sigma^2}{n} && \small\color{#777777}{\text{definition of } \sigma^2} \\ &= \frac{n - 1}{n}\sigma^2 \end{aligned}\]
So it’s biased downward: on average, it’s too small by \(\frac{\sigma^2}{n}\)
How big is the bias? \(\mathbb{E}\left[\hat{\sigma}^2_n\right] = \frac{n-1}{n}\sigma^2\) is too small by a fraction \(\frac{1}{n}\)
Rescale by \(\frac{n}{n-1}\) to get the unbiased sample variance estimator (R’s var()) \[S^2_n = \frac{n}{n-1}\hat{\sigma}^2_n = \frac{1}{n-1}\sum_{i=1}^n (Y_i - \bar{Y}_n)^2 \qquad \mathbb{E}\left[S^2_n\right] = \frac{n}{n-1} \cdot \frac{n-1}{n}\sigma^2 = \sigma^2\]
Dividing by \(n - 1\) instead of \(n\) eliminates the bias (“Bessel’s correction”)
But the bias vanishes as \(n\) grows. Does \(\hat{\sigma}^2_n\) still get the right answer in large samples?
The \(Y_i^2\) are i.i.d. with mean \(\mathbb{E}[Y_i^2]\), so by the WLLN \[\frac{1}{n}\sum_{i=1}^n Y_i^2 \xrightarrow{p} \mathbb{E}[Y_i^2]\]
By the WLLN, \(\bar{Y}_n \xrightarrow{p} \mu\). A limit of a product is the product of the limits, so \(\bar{Y}_n^2 = \bar{Y}_n \cdot \bar{Y}_n \xrightarrow{p} \mu^2\)
A sum (or difference) converges to the sum of the limits, so \[\hat{\sigma}^2_n = \frac{1}{n}\sum_{i=1}^n Y_i^2 - \bar{Y}_n^2 \xrightarrow{p} \mathbb{E}[Y_i^2] - \mu^2 = \sigma^2\]
Biased, but consistent
In general: \(\hat{F}_n \to F\). So if small changes in \(F\) only cause small changes in \(T(F)\), then \(T(\hat{F}_n) \to T(F)\)
Under some additional regularity conditions, plug-in estimators are also asymptotically normal
Most estimands we’ll work with are well behaved: means, variances, covariances, quantiles (where \(F\) isn’t flat), regression coefficients
When does it fail? When \(T\) is too sensitive to small changes in \(F\)
| Estimand \(\theta = T(F)\) | Plug-in estimator \(T(\hat{F}_n)\) | Estimate |
|---|---|---|
| Mean age, \(\mathbb{E}[Y_i]\) | \(\bar{Y}_n\) | 49.0 |
| Variance, \(\Var(Y_i)\) | \(\frac{1}{n}\sum_{i=1}^n (Y_i - \bar{Y}_n)^2\) | 311.9 |
| Median, \(F^{-1}(1/2)\) | Sample median | 48 |
| Share 65 or older, \(\Pr(Y_i \ge 65)\) | \(1 - \hat{F}_n(64)\) | 0.236 |
library(tidyverse)
gss <- read_csv("../week6/data/gss2024.csv") |>
filter(!is.na(age)) # the GSS top-codes age at 89
Fhat <- ecdf(gss$age) # the empirical CDF, as an R function
age_est <- gss |>
summarize(n = n(),
mean = mean(age),
var_plugin = mean((age - mean(age))^2),
var_unbiased = var(age),
median = median(age),
share65 = 1 - Fhat(64))
age_est# A tibble: 1 × 6
n mean var_plugin var_unbiased median share65
<int> <dbl> <dbl> <dbl> <dbl> <dbl>
1 3859 49.0 312. 312. 48 0.236
The plug-in principle can’t give us the density \(f(y)\) directly
Recall what a density is: the share of the population in a small window around \(y\), divided by the window’s width \[f(y) \approx \frac{F(y + h/2) - F(y - h/2)}{h} \qquad \text{for small } h\]
Plug in \(\hat{F}_n\): the share of the sample within \(h/2\) of \(y\), divided by \(h\) \[\hat{f}(y) = \frac{\hat{F}_n(y + h/2) - \hat{F}_n(y - h/2)}{h} = \frac{\#\{i : |Y_i - y| \le h/2\}}{nh}\]
The width \(h\) is a tuning parameter
A histogram splits the real number line into bins \(B_1, B_2, \dotsc\) of width \(h\). For \(y\) in bin \(B_j\) \[\hat{f}(y) = \frac{\#\{i : Y_i \in B_j\}}{nh}\]
Bias: the bar is flat but \(f\) might not be. Larger \(h\) \(\leadsto\) larger bias (depending on \(f^\prime(y)\))
Variance: the count in a bin is binomial with \(n\) trials and success probability approximately \(hf(y)\) \[\Var\left(\hat{f}(y)\right) \approx \frac{n hf(y) (1 - hf(y))}{(nh)^2} = \frac{f(y)}{nh} (1 - hf(y)) \approx \frac{f(y)}{nh} \qquad \text{for small } h\]
Consistent if the bins shrink, \(h \to 0\), but slowly enough that each still fills up, \(nh \to \infty\)
See Wasserman (2006), Ch. 6
hist() - tends to use too few bins in large samplesA histogram’s estimate at \(y\) depends on where the bin edges happen to fall
Instead, we could imagine centering a window on every point \(y\) (Rosenblatt 1956) \[\hat{f}(y) = \frac{1}{nh}\sum_{i=1}^n I\left(|Y_i - y| \le \tfrac{h}{2}\right)\]
A weighted count: observations within \(h/2\) of \(y\) get weight \(1\). Everyone else gets nothing
The kernel density estimator (Rosenblatt 1956; Parzen 1962)
\[\hat{f}_h(y) = \frac{1}{nh}\sum_{i=1}^n K_h(Y_i - y) \]
Where the kernel is defined as:
\[K_h(u) = K\left(\frac{u}{h}\right)\]
The kernel \(K\) is a function that is symmetric, non-negative and integrates to \(1\):
The bandwidth \(h\) defines how many observations get meaningful weight.
bin_width bandwidth
3.825249 3.047998
[1] 0.01749374 0.01663595
PS 812 - University of Wisconsin-Madison