Linear Regression
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the goal of regression in statistics?
20 questions
- 1
What is the goal of regression in statistics?
Model answer
To predict one variable (the explained variable) based on another variable (the explanatory variable).
Explanation
Regression aims to model the relationship between variables to enable prediction, often by estimating a function f such that y ≈ f(x).
- 2
What are the common names for the explained variable and the explanatory variable in regression?
Model answer
The explained variable is also called the dependent variable or response variable; the explanatory variable is also called the independent variable or predictor.
Explanation
These terms are used interchangeably in regression contexts. The explained variable is what we want to predict, and the explanatory variable is what we use to predict.
- 3
What is the difference between univariate regression and multivariate regression?
Model answer
Univariate regression has one explanatory variable (x is a scalar), while multivariate regression has two or more explanatory variables (x is a vector in ℝᵖ with p ≥ 2).
Explanation
In univariate regression, the model is y = a + bx + ε. In multivariate regression, the model is y = a + b₁x₁ + b₂x₂ + ... + bₚxₚ + ε.
- 4
Why is linear regression considered the simplest non‑trivial function for modeling relationships?
Model answer
Because the simplest function that depends on x is a constant (no dependence), and linear functions are the next simplest while still allowing the prediction to vary with x.
Explanation
Linear functions are easy to interpret and often provide a good approximation even when the true relationship is nonlinear, making them a common starting point.
- 5
In the linear regression model y = a + bx + ε, what does ε represent?
Model answer
ε represents random noise or error, accounting for everything not captured by the linear relationship between x and y, including measurement error and unobserved factors.
Explanation
The noise term ε allows for deviations from the exact linear relationship; it is assumed to have certain properties (e.g., mean zero) to make estimation possible.
- 6
How can a nonlinear relationship be transformed into a linear one for regression?
Model answer
By applying transformations such as logarithms, exponentials, or squares to the variables. For example, the ideal gas law PV = nRT can be turned into log P = a − log V + log T + ε.
Explanation
Variable transformation is domain‑specific and can linearize multiplicative or power‑law relationships, allowing linear regression to be used.
- 7
What is the least squares criterion for finding the best‑fitting line in univariate regression?
Model answer
Minimize the expectation of (y − a − bx)², or equivalently minimize the average squared vertical distance from the data points to the line.
Explanation
Vertical distances are used because they are mathematically convenient (allowing closed‑form solutions) and correspond to minimizing the sum of squared errors.
- 8
Derive the population least squares solutions for a and b assuming no centering.
Model answer
b=Var(x)Cov(x,y) and a=E[y]−bE[x].
Explanation
Minimizing E[(y−a−bx)2] gives two equations: a+bE[x]=E[y] and E[xy]=aE[x]+bE[x2]. Solving yields the formulas.
- 9
Why must the variance of x be non‑zero for the least squares solution to exist?
Model answer
Because the formula for b involves division by Var(x). If Var(x) = 0, all x values are identical, making it impossible to estimate a slope uniquely.
Explanation
Without variation in x, the data provides no information about how y changes with x, so the slope cannot be determined.
- 10
What two conditions does the least squares solution impose on the error term ε = y − (a + bx)?
Model answer
The error has zero mean: E[ε]=0, and zero covariance with x: Cov(x,ε)=0.
Explanation
These conditions follow from setting the derivatives of the least squares criterion to zero. They ensure the best linear fit is unbiased in a probabilistic sense.
- 11
Give two common assumptions about the relationship between x and ε that guarantee the two conditions above.
Model answer
Either assume x and ε are independent, or assume E[ε∣x]=0 (zero conditional mean).
Explanation
Independence implies zero covariance, and zero conditional mean implies both E[ε]=0 and Cov(x,ε)=0. These are standard assumptions in regression modeling.
- 12
To perform inference (e.g., confidence intervals), what additional assumption is often made about ε?
Model answer
That ε follows a Gaussian (normal) distribution.
Explanation
Normality of errors allows the use of t‑distributions for hypothesis testing and constructing confidence intervals for the regression coefficients.
- 13
How are the sample estimators a^ and b^ obtained from the population formulas?
Model answer
Replace expectations with sample averages: b^=x2−xˉ2xy−xˉyˉ and a^=yˉ−b^xˉ, where xy=n1∑xiyi, etc.
Explanation
This is the method of moments: estimate population moments (expectations) by their sample counterparts. Alternatively, minimize the sum of squared errors directly yields the same formulas.
- 14
In multivariate regression, what is the model in matrix form?
Model answer
y=Xβ+ε, where y is an n-vector, X is an n×p matrix (with first column of ones for the intercept), β is a p-vector of coefficients, and ε is an n-vector of errors.
Explanation
Each row of X contains the explanatory variables for one observation, including a 1 for the intercept. The model assumes each yi=xiTβ+εi.
- 15
How is the intercept included in the multivariate regression model?
Model answer
By adding a column of ones to the design matrix X. The corresponding coefficient is the intercept.
Explanation
This allows the model y=β1x1+β2x2+...+βpxp to include a constant term when the first variable x1 is always 1.
- 16
What does the condition Cov(x,ε)=0 mean in multivariate regression?
Model answer
It means that for each coordinate of x, the covariance between that coordinate and ε is zero.
Explanation
This is a vector condition ensuring no linear relationship between any explanatory variable and the error, analogous to the univariate case. Often justified by assuming x and ε are independent or E[ε∣x]=0.
- 17
Write the least squares criterion for multivariate regression in matrix form.
Model answer
mint∈Rp∥y−Xt∥2, where ∥⋅∥ denotes the Euclidean norm (sum of squared components).
Explanation
This is the natural extension of the univariate least squares: minimize the sum of squared residuals across all observations. The solution β^ can be obtained by solving the normal equations.
- 18
Why is matrix notation used for multivariate regression instead of solving coordinate‑by‑coordinate?
Model answer
Because the solution involves all cross‑covariances between explanatory variables, leading to a system of p equations. Matrix notation allows a compact representation and formal solution via matrix inversion.
Explanation
The gradient conditions produce a linear system XTXβ=XTy, which can be expressed as β=(XTX)−1XTy if the inverse exists.
- 19
What is an alternative to least squares regression that minimizes absolute deviations instead of squared deviations?
Model answer
Mean absolute deviation (LAD) regression, which minimizes ∑i=1n∣yi−a−bxi∣.
Explanation
LAD is less sensitive to outliers than least squares but does not have a closed‑form solution; it must be solved numerically.
- 20
In the context of regression, what does the statement 'statisticians manage to miss all the points' illustrate?
Model answer
It illustrates that in scatterplots, data points rarely lie exactly on the fitted regression line; the line is an estimate that minimizes the distance to the points, but most points are off the line.
Explanation
The saying humorously points out that even with many data points, the linear model typically does not pass through any of them because of random noise.

Ask anything
We've read this whole study set, so questions about it get the best answers.