1. Home
  2. Explore
  3. Mathematics
  4. Linear Regression

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Linear Regression

  • 18Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Regression Basics

What is the primary goal of regression analysis?

18 questions

  1. 1

    What is the primary goal of regression analysis?

    1. A

      To test whether two variables are independent

    2. B

      To predict one variable based on another variable

    3. C

      To estimate the population mean of a variable

    4. D

      To determine the causal relationship between variables

    Correct answer
    B

    To predict one variable based on another variable

    Explanation

    Regression aims to predict an outcome variable (y) using one or more explanatory variables (x). This is explicitly stated as the goal of regression in the lecture.

  2. 2

    In regression, the variable y is often called the:

    1. A

      Independent variable

    2. B

      Explanatory variable

    3. C

      Predictor

    4. D

      Explained variable

    Correct answer
    D

    Explained variable

    Explanation

    y is referred to as the explained variable, while x is the explanatory variable. This is standard terminology in regression.

  3. 3

    In simple linear regression, the model is written as:

    1. A

      Y=aX+b+εY = aX + b + \varepsilonY=aX+b+ε

    2. B

      Y=a+bε+XY = a + b\varepsilon + XY=a+bε+X

    3. C

      Y=a+bXY = a + bXY=a+bX

    4. D

      Y=a+bX+εY = a + bX + \varepsilonY=a+bX+ε

    Correct answer
    D

    Y=a+bX+εY = a + bX + \varepsilonY=a+bX+ε

    Explanation

    The standard simple linear regression model includes an intercept a, slope b, and an error term varepsilonvarepsilonvarepsilon to account for noise or unmodeled factors.

  4. 4

    What does the error term varepsilonvarepsilonvarepsilon in a regression model represent?

    1. A

      The deviation of the true relationship from linearity

    2. B

      Everything not captured by the linear relationship, including measurement error and unobserved factors

    3. C

      The random component that makes the relationship exact

    4. D

      The variance of the explanatory variable

    Correct answer
    B

    Everything not captured by the linear relationship, including measurement error and unobserved factors

    Explanation

    The error term accounts for all sources of variation in y that are not explained by the linear function of x, such as measurement error, omitted variables, or inherent randomness.

  5. 5

    Which of the following correctly describes the difference between univariate and multivariate regression?

    1. A

      Univariate regression has one explanatory variable; multivariate regression has two or more explanatory variables

    2. B

      Univariate regression has one response variable; multivariate regression has multiple response variables

    3. C

      Univariate regression uses least squares; multivariate regression uses maximum likelihood

    4. D

      Univariate regression assumes a linear relationship; multivariate regression allows non-linear relationships

    Correct answer
    A

    Univariate regression has one explanatory variable; multivariate regression has two or more explanatory variables

    Explanation

    Univariate regression involves a single predictor (x in mathbbRmathbb{R}mathbbR), while multivariate regression involves multiple predictors (x in mathbbRpmathbb{R}^pmathbbRp with pgeq2p geq 2pgeq2).

  6. 6

    In the population framework for simple linear regression, the intercept and slope are derived by minimizing:

    1. A

      E[Y−a−bX]\mathbb{E}[Y - a - bX]E[Y−a−bX]

    2. B

      E[∣Y−a−bX∣]\mathbb{E}[|Y - a - bX|]E[∣Y−a−bX∣]

    3. C

      E[(Y−a−bX)2]\mathbb{E}[(Y - a - bX)^2]E[(Y−a−bX)2]

    4. D

      1n∑i=1n(Yi−a−bXi)2\frac{1}{n}\sum_{i=1}^n (Y_i - a - bX_i)^2n1​∑i=1n​(Yi​−a−bXi​)2

    Correct answer
    C

    E[(Y−a−bX)2]\mathbb{E}[(Y - a - bX)^2]E[(Y−a−bX)2]

    Explanation

    The population parameters aaa and bbb minimize the expected squared error E[(Y−a−bX)2]\mathbb{E}[(Y - a - bX)^2]E[(Y−a−bX)2], which is a measure of average squared deviation from the line.

  7. 7

    What condition is necessary for the variance of XXX to be non-zero when deriving the least squares slope?

    1. A

      To avoid division by zero in the formula b=Cov(X,Y)Var(X)b = \frac{\text{Cov}(X,Y)}{\text{Var}(X)}b=Var(X)Cov(X,Y)​

    2. B

      To guarantee that the errors have mean zero

    3. C

      To ensure the intercept aaa is identifiable

    4. D

      To make the covariance between XXX and YYY positive

    Correct answer
    A

    To avoid division by zero in the formula b=Cov(X,Y)Var(X)b = \frac{\text{Cov}(X,Y)}{\text{Var}(X)}b=Var(X)Cov(X,Y)​

    Explanation

    The formula b=Cov(X,Y)/Var(X)b = \text{Cov}(X,Y)/\text{Var}(X)b=Cov(X,Y)/Var(X) requires Var(X)≠0\text{Var}(X) \neq 0Var(X)=0; if all XXX values are the same, the slope cannot be estimated.

  8. 8

    In simple linear regression, the slope bbb can be expressed in terms of expectations as:

    1. A

      b=E[Y]−E[X]Var(X)b = \frac{\mathbb{E}[Y] - \mathbb{E}[X]}{\text{Var}(X)}b=Var(X)E[Y]−E[X]​

    2. B

      b=Cov(X,Y)Var(Y)b = \frac{\text{Cov}(X,Y)}{\text{Var}(Y)}b=Var(Y)Cov(X,Y)​

    3. C

      b=E[XY]−E[X]E[Y]E[X2]−(E[X])2b = \frac{\mathbb{E}[XY] - \mathbb{E}[X]\mathbb{E}[Y]}{\mathbb{E}[X^2] - (\mathbb{E}[X])^2}b=E[X2]−(E[X])2E[XY]−E[X]E[Y]​

    4. D

      b=E[Y]−aE[X]b = \frac{\mathbb{E}[Y] - a}{\mathbb{E}[X]}b=E[X]E[Y]−a​

    Correct answer
    C

    b=E[XY]−E[X]E[Y]E[X2]−(E[X])2b = \frac{\mathbb{E}[XY] - \mathbb{E}[X]\mathbb{E}[Y]}{\mathbb{E}[X^2] - (\mathbb{E}[X])^2}b=E[X2]−(E[X])2E[XY]−E[X]E[Y]​

    Explanation

    The slope bbb equals the covariance of XXX and YYY divided by the variance of XXX, which simplifies to the given expression.

  9. 9

    What are the two key assumptions about the error term varepsilonvarepsilonvarepsilon needed for the least squares estimators to be unbiased?

    1. A

      ε\varepsilonε has constant variance and is uncorrelated across observations

    2. B

      mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0 and Var(ε)=σ2\text{Var}(\varepsilon) = \sigma^2Var(ε)=σ2

    3. C

      mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0 and Cov(X,ε)=0\text{Cov}(X,\varepsilon) = 0Cov(X,ε)=0

    4. D

      ε\varepsilonε is normally distributed and independent of XXX

    Correct answer
    C

    mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0 and Cov(X,ε)=0\text{Cov}(X,\varepsilon) = 0Cov(X,ε)=0

    Explanation

    The derivation of the least squares estimators in the population leads to mathbbE[ε]=0mathbb{E}[\varepsilon]=0mathbbE[ε]=0 and extCov(X,ε)=0 ext{Cov}(X,\varepsilon)=0extCov(X,ε)=0, which ensure that the parameters aaa and bbb satisfy the normal equations.

  10. 10

    If XXX and ε\varepsilonε are independent, which of the following automatically holds?

    1. A

      Neither mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0 nor extCov(X,ε)=0 ext{Cov}(X,\varepsilon) = 0extCov(X,ε)=0

    2. B

      mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0

    3. C

      Both mathbbE[ε]=0mathbb{E}[\varepsilon] = 0mathbbE[ε]=0 and extCov(X,ε)=0 ext{Cov}(X,\varepsilon) = 0extCov(X,ε)=0

    4. D

      extCov(X,ε)=0 ext{Cov}(X,\varepsilon) = 0extCov(X,ε)=0

    Correct answer
    D

    extCov(X,ε)=0 ext{Cov}(X,\varepsilon) = 0extCov(X,ε)=0

    Explanation

    Independence implies zero covariance, but does not guarantee that the mean of varepsilonvarepsilonvarepsilon is zero; however, we typically also assume mathbbE[ε]=0mathbb{E}[\varepsilon]=0mathbbE[ε]=0 separately.

  11. 11

    The least squares estimate hatbhat{b}hatb is obtained by:

    1. A

      Solving Cov(X,Y)=0\text{Cov}(X,Y) = 0Cov(X,Y)=0

    2. B

      Minimizing sumi=1n(Yi−a−bXi)2sum_{i=1}^n (Y_i - a - bX_i)^2sumi=1n​(Yi​−a−bXi​)2 and then setting derivatives to zero

    3. C

      Minimizing mathbbE[(Y−a−bX)2]mathbb{E}[(Y - a - bX)^2]mathbbE[(Y−a−bX)2] and replacing expectations with sample averages

    4. D

      Both (a) and (b) yield the same result

    Correct answer
    D

    Both (a) and (b) yield the same result

    Explanation

    The sample least squares estimator can be found either by minimizing the sum of squared residuals or by replacing population expectations in the formula with sample averages; both approaches give identical results.

  12. 12

    In the sample least squares method, the intercept estimate hatahat{a}hata is given by:

    1. A

      hata=Yˉ−b^Xˉhat{a} = \bar{Y} - \hat{b}\bar{X}hata=Yˉ−b^Xˉ

    2. B

      hata=Yˉ/Xˉhat{a} = \bar{Y} / \bar{X}hata=Yˉ/Xˉ

    3. C

      hata=Yˉ+b^Xˉhat{a} = \bar{Y} + \hat{b}\bar{X}hata=Yˉ+b^Xˉ

    4. D

      hata=Yˉ−Xˉhat{a} = \bar{Y} - \bar{X}hata=Yˉ−Xˉ

    Correct answer
    A

    hata=Yˉ−b^Xˉhat{a} = \bar{Y} - \hat{b}\bar{X}hata=Yˉ−b^Xˉ

    Explanation

    The least squares line passes through the sample means (ar{X}, ar{Y}), so hat{a} = ar{Y} - hat{b}ar{X}.

  13. 13

    What is the main advantage of using squared errors in least squares regression over using absolute errors?

    1. A

      The solution has a closed form (explicit formula)

    2. B

      Absolute errors require more computation

    3. C

      Squared errors are always positive

    4. D

      Squared errors are more robust to outliers

    Correct answer
    A

    The solution has a closed form (explicit formula)

    Explanation

    The least squares criterion leads to a quadratic optimization problem that has a closed-form solution (normal equations), unlike absolute errors which typically require numerical optimization.

  14. 14

    In the multivariate linear regression model Y=Xβ+εY = X\beta + \varepsilonY=Xβ+ε, the design matrix XXX includes:

    1. A

      Only the response variable

    2. B

      A column of ones for the intercept, followed by the predictor variables

    3. C

      The errors for each observation

    4. D

      Only the predictor variables without an intercept

    Correct answer
    B

    A column of ones for the intercept, followed by the predictor variables

    Explanation

    To include an intercept, a column of ones is added to the design matrix XXX; the corresponding coefficient is the intercept.

  15. 15

    The least squares estimator for eta in matrix form is:

    1. A

      β^=XT(XXT)−1Y\hat{\beta} = X^T (X X^T)^{-1} Yβ^​=XT(XXT)−1Y

    2. B

      β^=(XTX)−1XTY\hat{\beta} = (X^T X)^{-1} X^T Yβ^​=(XTX)−1XTY

    3. C

      β^=(YTY)−1XTY\hat{\beta} = (Y^T Y)^{-1} X^T Yβ^​=(YTY)−1XTY

    4. D

      β^=(XTY)−1XTX\hat{\beta} = (X^T Y)^{-1} X^T Xβ^​=(XTY)−1XTX

    Correct answer
    B

    β^=(XTX)−1XTY\hat{\beta} = (X^T X)^{-1} X^T Yβ^​=(XTX)−1XTY

    Explanation

    Minimizing ∥Y−Xβ∥2\|Y - X\beta\|^2∥Y−Xβ∥2 yields the normal equations XTXβ^=XTYX^T X \hat{\beta} = X^T YXTXβ^​=XTY, and when XTXX^T XXTX is invertible, β^=(XTX)−1XTY\hat{\beta} = (X^T X)^{-1} X^T Yβ^​=(XTX)−1XTY.

  16. 16

    Why is matrix notation particularly useful in multivariate regression?

    1. A

      It reduces the number of assumptions needed

    2. B

      It allows us to visualize the data in higher dimensions

    3. C

      It automatically ensures the errors are normally distributed

    4. D

      It provides a compact way to derive and express the estimator for many parameters

    Correct answer
    D

    It provides a compact way to derive and express the estimator for many parameters

    Explanation

    Matrix notation simplifies the derivation and expression of the least squares estimator when there are multiple predictors, avoiding lengthy coordinate-by-coordinate calculations.

  17. 17

    In multivariate regression, the assumption that the covariance between each predictor and the error is zero implies:

    1. A

      Each predictor is uncorrelated with the error term

    2. B

      The error term has zero mean

    3. C

      The predictors are uncorrelated with each other

    4. D

      The error term is normally distributed

    Correct answer
    A

    Each predictor is uncorrelated with the error term

    Explanation

    The condition Cov(Xj,ε)=0\text{Cov}(X_j, \varepsilon)=0Cov(Xj​,ε)=0 for each predictor XjX_jXj​ ensures that the error is uncorrelated with every predictor, which is necessary for consistent estimation.

  18. 18

    In the simple linear regression model, the slope bbb measures:

    1. A

      The expected change in YYY when XXX changes by one unit

    2. B

      The intercept of the regression line

    3. C

      The correlation between XXX and YYY

    4. D

      The proportion of variance in YYY explained by XXX

    Correct answer
    A

    The expected change in YYY when XXX changes by one unit

    Explanation

    The slope represents the average change in the response YYY for a one-unit increase in the predictor XXX.

Question 1 of 18
Question 1 of 18

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent