Tutorials › Statistical Theory III - Theories of Inference, Multivariate Methods, and Contingency Tables › The IID Random-Design Regression Framework

Random-Design Regression Asymptotics · Tutorial 565 of 972

The IID Random-Design Regression Framework

Learn how iid covariate-response pairs define random-design regression and when the population least-squares coefficient equals the conditional-mean parameter.

Advanced 10 min read

What You'll Learn

  • Define iid covariate-response pairs and fixed-dimensional regressors
  • Distinguish random design from fixed design and within-pair independence
  • State the conditional mean-zero error assumption precisely
  • Define the population least-squares coefficient and its uniqueness conditions
  • Separate an exact linear conditional mean from a best linear approximation
  • Identify how dependence between a regressor and its error changes the target

Why Specify the Regression Design?

Regression asymptotics begin by specifying how the observations are generated. In a random-design model, each observation contains a random covariate vector and a random response. The pairs are sampled from one common distribution, so the covariates themselves vary across repeated samples. This setup differs from fixed-design regression, where the covariate values are treated as given.

The setup also distinguishes a model's population target from the coefficient computed in a particular sample. The population target is defined by minimizing expected squared prediction error. Under a linear conditional-mean model and a suitable nondegeneracy condition, that target is the model's coefficient. Without those assumptions, least squares still has a population target, but it may describe a best linear approximation rather than a true conditional-mean relationship.

The IID Random-Design Setup

Definition: For each sample size \(n\), observe \(n\) pairs \((X_i,Y_i)\), \(i=1,\ldots,n\), that are independent and identically distributed as a pair \((X,Y)\). Here \(X\in\mathbb{R}^p\) is a covariate vector, \(Y\in\mathbb{R}\) is a response, and \(p\) is fixed: it does not increase with \(n\). The common distribution of the pairs is the population distribution. An intercept can be included as a component of \(X\) that equals 1 for every observation.

The iid condition applies to the pairs. It means that different observations are independent and have the same joint distribution of covariates and response. It does not say that \(X_i\) and \(Y_i\) are independent within an observation; regression is generally used precisely because they are related. Nor does it require the error to be independent of the covariates.

A common representation of the relationship is

$$ Y_i = X_i'\beta_0 + u_i, $$

where \(\beta_0\in\mathbb{R}^p\) is a fixed coefficient vector and \(u_i\) is the error. The corresponding population conditional-mean assumption is

Definition: The conditional mean-zero error assumption is \(E[u\mid X]=0\) almost surely, where \(u=Y-X'\beta_0\). Equivalently, the conditional mean of the response is linear in the specified regressors: \(E[Y\mid X]=X'\beta_0\) almost surely.

Conditional mean zero is stronger than merely requiring \(E[u]=0\): it rules out systematic error patterns across covariate values. It does not require constant conditional variance, normal errors, or independence between \(u\) and \(X\). It does require that the conditional expectation be well defined; below, finite second moments ensure the needed integrability.

The Population Least-Squares Target

For a candidate coefficient \(b\in\mathbb{R}^p\), define its population squared-error risk by \(R(b)=E[(Y-X'b)^2]\). A population least-squares coefficient is any vector minimizing this risk. To state a simple sufficient condition for existence and uniqueness, assume \(E[Y^2]<\infty\), \(E[\|X\|^2]<\infty\), and that \(Q=E[XX']\) is positive definite. Positive definiteness means \(a'Qa>0\) for every nonzero vector \(a\in\mathbb{R}^p\).

Definition: Under these finite-moment and positive-definiteness conditions, the unique population least-squares coefficient is
$$ \beta^* = \underset{b\in\mathbb{R}^p}{\operatorname{argmin}}\ E[(Y-X'b)^2]. $$

The expectations in this definition are with respect to the population distribution, not the observed sample. The finite-moment conditions make the risk finite for every fixed \(b\); for example, \(E[|XY|]\) is finite by the Cauchy–Schwarz inequality. The following derivation establishes the target and its uniqueness.

Theorem: If \(E[Y^2]<\infty\), \(E[\|X\|^2]<\infty\), and \(Q=E[XX']\) is positive definite, then the population risk has the unique minimizer \(\beta^*=Q^{-1}c\), where \(c=E[XY]\).

Proof. Expanding the square and taking expectations gives

$$ R(b)=E[Y^2]-2b'c+b'Qb. $$

Positive definiteness makes \(Q\) invertible, so define \(\beta^*=Q^{-1}c\). Since \(Q\beta^*=c\), expanding the quadratic around \(\beta^*\) yields

$$ R(b)-R(\beta^*)=(b-\beta^*)'Q(b-\beta^*). $$

The right-hand side is nonnegative and is strictly positive whenever \(b\ne\beta^*\), by positive definiteness. Therefore \(\beta^*\) is the unique minimizer, and it equals \(Q^{-1}c\). \(\square\)

The next result connects this population target to the conditional mean assumption. It also makes explicit why the assumption concerns the error's mean at each covariate value, rather than only its overall mean.

Theorem: Suppose \(Y=X'\beta_0+u\) almost surely, \(E[\|X\|^2]<\infty\), \(E[u^2]<\infty\), and \(E[u\mid X]=0\) almost surely. If \(Q=E[XX']\) is positive definite, then the unique population least-squares coefficient is \(\beta^*=\beta_0\).

Proof. The finite second moments imply that each component of \(Xu\) is integrable, since \(E[|X_j u|]\leq \{E[X_j^2]E[u^2]\}^{1/2}<\infty\). Because \(X\) is determined by itself, the defining property of conditional expectation gives

$$ E[Xu]=E\!\left[X\,E[u\mid X]\right]=0. $$

Consequently,

$$ c=E[XY]=E[X(X'\beta_0+u)]=Q\beta_0+E[Xu]=Q\beta_0. $$

The first theorem gives \(\beta^*=Q^{-1}c=Q^{-1}Q\beta_0=\beta_0\). Positive definiteness supplies uniqueness. \(\square\)

Worked Examples

Worked Example: A Correctly Specified Random-Design Model

Let \(X\) be Bernoulli with \(P(X=1)=0.4\), and include an intercept by taking the regressor vector to be \(R=(1,X)'\). Let \(u\) equal \(1\) or \(-1\) with equal probability, independently of \(X\), and set \(Y=2+3X+u\). Find the population least-squares coefficient.

Here \(E[u\mid X]=0\), and the proposed coefficient is \(\beta_0=(2,3)'\). To verify the population target directly, first calculate

$$ Q=E[RR']=\begin{pmatrix}1&0.4\\0.4&0.4\end{pmatrix}, \qquad \det(Q)=0.4-0.16=0.24>0. $$

Thus \(Q\) is positive definite. Also \(E[Y\mid X]=2+3X\), so

$$ c=E[RY] =\begin{pmatrix}E[Y]\\E[XY]\end{pmatrix} =\begin{pmatrix}2+3(0.4)\\(2+3)(0.4)\end{pmatrix} =\begin{pmatrix}3.2\\2\end{pmatrix}. $$

Multiplying \(Q\) by \((2,3)'\) gives \((2+1.2,\ 0.8+1.2)'=(3.2,2)'\), so \(Q^{-1}c=(2,3)'\). The population target is the conditional-mean coefficient. The error can vary with observations; the key assumption here is its conditional mean, not that it vanishes observation by observation.

Worked Example: A Best Linear Approximation

Let \(Z\) take the values \(-1,0,1\), each with probability \(1/3\), and let \(Y=Z^2\). Fit a population linear regression with an intercept, using \(R=(1,Z)'\). There is no assumption that the conditional mean is linear; here it is \(E[Y\mid Z]=Z^2\).

By symmetry, \(E[Z]=0\) and \(E[Z^3]=0\). Also, \(E[Z^2]=2/3\). Therefore,

$$ Q=E[RR']=\begin{pmatrix}1&0\\0&2/3\end{pmatrix}, \qquad c=E[RY]=\begin{pmatrix}E[Z^2]\\E[Z^3]\end{pmatrix} =\begin{pmatrix}2/3\\0\end{pmatrix}. $$

The matrix is positive definite, and \(Q^{-1}c=(2/3,0)'\). Thus the best linear predictor is the constant \(2/3\), even though the conditional mean is curved. Its residual \(Y-R'\beta^*\) is \(1/3\) at \(Z=-1\) and \(Z=1\), and \(-2/3\) at \(Z=0\). These residuals average to zero, but their conditional means given \(Z\) are not zero. Least squares still has a well-defined target; it is an approximation coefficient, not a coefficient in a correctly specified linear conditional mean.

Worked Example: IID Pairs Do Not Guarantee Conditional Mean Zero

Let \(X\) equal \(-1\) or \(1\) with equal probability, take \(R=(1,X)'\), and set \(u=X\) and \(Y=1+X+u=1+2X\). Draw independent observations from this same construction, so the pairs are iid. If the displayed decomposition is treated as a proposed model with \(\beta_0=(1,1)'\), does its error satisfy the conditional mean-zero assumption, and what is the population regression coefficient?

Since \(u=X\), conditioning on \(X\) gives \(E[u\mid X]=X\), which is not zero almost surely. For the population target, \(E[X]=0\) and \(E[X^2]=1\), so

$$ Q=E[RR']=\begin{pmatrix}1&0\\0&1\end{pmatrix}, \qquad c=E[RY]=\begin{pmatrix}E[1+2X]\\E[X(1+2X)]\end{pmatrix} =\begin{pmatrix}1\\2\end{pmatrix}. $$

It follows that \(\beta^*=Q^{-1}c=(1,2)'\), not the proposed \((1,1)'\). The pairs are iid, but that sampling condition alone does not make the error conditionally mean zero. The difference between these assumptions matters: iid sampling describes how observations are drawn, while conditional mean zero describes the response-error relationship within each observation.

What the Framework Does—and Does Not—Assume

The setup gives a clear interpretation to the target of least squares without imposing a full probability model for the response. In particular, errors may be heteroskedastic: \(E[u^2\mid X]\) can vary with \(X\). They may also have nonnormal distributions. Neither feature changes the definition of \(\beta^*\). The conditional mean-zero assumption, when imposed, identifies that target with the coefficient in the linear conditional mean.

The fixed-\(p\) condition means that the number of regressors stays constant as the sample size grows. It keeps the parameter dimension stable in the asymptotic framework. This tutorial defines the data-generating setup and population target; it does not by itself establish that a sample estimator converges to the target or has a particular limiting distribution. Such conclusions require additional results and assumptions.

If \(Q\) is not positive definite, the quadratic risk need not have a unique coefficient vector: different vectors may produce the same predictions on the population covariate support. Positive definiteness is therefore a convenient sufficient condition for a unique coefficient target, not a property guaranteed merely by calling the data random-design.

Common Mistake

Wrong reasoning: “The observations are iid and the errors average to zero, so the regression error is exogenous and the least-squares target equals the model coefficient.” This confuses three different claims. Iid sampling concerns independence and identical distribution across observations; \(E[u]=0\) is an unconditional statement; and \(E[u\mid X]=0\) rules out a nonzero conditional error mean across covariate values.

Correction: Check the conditional mean explicitly. In the third example, \(E[u]=E[X]=0\), but \(E[u\mid X]=X\ne0\), and the target slope is 2 rather than the proposed slope 1. When conditional mean zero is not justified, describe \(\beta^*\) as the population best linear least-squares coefficient, not automatically as a structural or conditional-mean parameter.

Key takeaway: Random-design regression starts with iid covariate-response pairs of fixed dimension. The population least-squares target minimizes expected squared error; under finite moments, a positive-definite \(E[XX']\), and conditional mean-zero errors, it equals the coefficient in the linear conditional mean.

Check Your Understanding

Use the definitions and examples above to answer these questions.

  1. In the random-design framework, what is iid: the covariates alone, the responses alone, or the covariate-response pairs?
  2. Does \(E[u]=0\) imply \(E[u\mid X]=0\)? Explain the distinction.
  3. What role does positive definiteness of \(E[XX']\) play in defining a unique population coefficient?
  4. Can a population least-squares coefficient be meaningful when the conditional mean is not linear? What does it represent then?
  5. Give one condition that is not required by the conditional mean-zero assumption: normal errors, constant conditional variance, or independence of errors and covariates.
Clinical Biostats