1. Home
  2. Explore
  3. Engineering
  4. Regression Models & Hypothesis Testing

Study methods

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

Regression Models & Hypothesis Testing

  • 36Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Regression Fundamentals

What does regression analysis estimate?

36 questions

  1. 1

    What does regression analysis estimate?

    1. A

      The distribution of a categorical variable

    2. B

      The probability of a binary outcome

    3. C

      The difference between two population means

    4. D

      The relationship between a single dependent variable and one or more independent variables

    Correct answer
    D

    The relationship between a single dependent variable and one or more independent variables

    Explanation

    Regression analysis is a group of statistical techniques that use existing data to estimate the relationship between a single dependent variable and one or more independent variables.

  2. 2

    What does the 'P' in PACE stand for?

    1. A

      Predict

    2. B

      Plan

    3. C

      Parameter

    4. D

      Probability

    Correct answer
    B

    Plan

    Explanation

    PACE stands for Plan, Analyze, Construct, and Execute. The Plan stage involves understanding the data and problem context.

  3. 3

    In the Analyze stage of PACE for regression, what is typically done?

    1. A

      Build the regression model in Python

    2. B

      Interpret results for stakeholders

    3. C

      Perform exploratory data analysis and check model assumptions

    4. D

      Define the business problem and data requirements

    Correct answer
    C

    Perform exploratory data analysis and check model assumptions

    Explanation

    In the Analyze stage, you examine data more closely to choose an appropriate model, perform EDA, and check model assumptions.

  4. 4

    What is the dependent variable in simple linear regression?

    1. A

      The variable used to predict, denoted by X

    2. B

      The variable that the model estimates, denoted by Y

    3. C

      The variable that is manipulated in an experiment

    4. D

      The variable that is held constant

    Correct answer
    B

    The variable that the model estimates, denoted by Y

    Explanation

    The dependent variable is the outcome variable that the model estimates, commonly denoted by Y.

  5. 5

    In the equation Y=β0+β1XY = \beta_0 + \beta_1 XY=β0​+β1​X, what does β1\beta_1β1​ represent?

    1. A

      The error term

    2. B

      The correlation coefficient

    3. C

      The slope, or the change in Y per one-unit increase in X

    4. D

      The intercept, or the value of Y when X equals zero

    Correct answer
    C

    The slope, or the change in Y per one-unit increase in X

    Explanation

    Beta-one is the slope, which tells how much Y changes for a one-unit increase in X.

  6. 6

    Which statement best describes the relationship between correlation and causation?

    1. A

      Causation can be proven with a correlation coefficient

    2. B

      Correlation does not imply causation; additional evidence is needed to establish causation

    3. C

      Correlation always implies causation

    4. D

      Correlation and causation are the same concept

    Correct answer
    B

    Correlation does not imply causation; additional evidence is needed to establish causation

    Explanation

    Correlation indicates a relationship but not necessarily that one variable causes the other. Causation requires more rigorous methods.

  7. 7

    What is a residual in linear regression?

    1. A

      The difference between an observed value and the predicted value from the model

    2. B

      The sum of squared differences between observed and predicted values

    3. C

      The intercept of the regression line

    4. D

      The slope of the regression line

    Correct answer
    A

    The difference between an observed value and the predicted value from the model

    Explanation

    A residual is the difference between the observed value and the value predicted by the regression line.

  8. 8

    What method does ordinary least squares (OLS) use to find the best-fit line?

    1. A

      Minimizing the sum of absolute residuals

    2. B

      Maximizing the R-squared value

    3. C

      Minimizing the sum of squared residuals

    4. D

      Maximizing the likelihood of the data

    Correct answer
    C

    Minimizing the sum of squared residuals

    Explanation

    OLS minimizes the sum of squared residuals (SSR) to estimate the parameters of the linear regression model.

  9. 9

    Which assumption of simple linear regression states that the residuals should be normally distributed?

    1. A

      Homoscedasticity assumption

    2. B

      Independence assumption

    3. C

      Normality assumption

    4. D

      Linearity assumption

    Correct answer
    C

    Normality assumption

    Explanation

    The normality assumption requires that the residuals (errors) are normally distributed.

  10. 10

    How can the linearity assumption of simple linear regression be checked?

    1. A

      By performing a hypothesis test on the slope

    2. B

      By examining a scatter plot of the independent variable against the dependent variable

    3. C

      By looking at the Q-Q plot of residuals

    4. D

      By calculating the variance inflation factor (VIF)

    Correct answer
    B

    By examining a scatter plot of the independent variable against the dependent variable

    Explanation

    The linearity assumption is checked by plotting X vs. Y; the points should roughly follow a straight line.

  11. 11

    What does R-squared measure in a linear regression model?

    1. A

      The correlation between the independent and dependent variables

    2. B

      The proportion of variation in the dependent variable explained by the independent variable(s)

    3. C

      The probability that the model is correct

    4. D

      The average error between observed and predicted values

    Correct answer
    B

    The proportion of variation in the dependent variable explained by the independent variable(s)

    Explanation

    R-squared is the coefficient of determination, representing the proportion of variance in Y explained by X.

  12. 12

    Why is a holdout sample used in regression modeling?

    1. A

      To reduce multicollinearity

    2. B

      To increase the sample size for training

    3. C

      To ensure normality of residuals

    4. D

      To evaluate how well the model performs on data it has not seen before

    Correct answer
    D

    To evaluate how well the model performs on data it has not seen before

    Explanation

    A holdout sample is a random subset of data not used to fit the model, used to test model performance on unseen data.

  13. 13

    What does a confidence band represent in linear regression?

    1. A

      The confidence interval for the intercept

    2. B

      The standard deviation of the residuals

    3. C

      The range of possible values for the slope coefficient

    4. D

      The uncertainty around the predicted outcome at every value of X

    Correct answer
    D

    The uncertainty around the predicted outcome at every value of X

    Explanation

    A confidence band is the area around the regression line that shows the confidence interval for predicted values at each X.

  14. 14

    What is the key difference between simple and multiple linear regression?

    1. A

      Multiple regression has two or more independent variables; simple regression has one

    2. B

      Multiple regression does not require the linearity assumption

    3. C

      Multiple regression uses categorical dependent variables

    4. D

      Simple regression cannot handle categorical variables

    Correct answer
    A

    Multiple regression has two or more independent variables; simple regression has one

    Explanation

    Simple linear regression has one independent variable, while multiple linear regression has two or more.

  15. 15

    Why is one-hot encoding used in multiple linear regression?

    1. A

      To convert categorical variables into binary variables that the model can interpret

    2. B

      To handle missing data

    3. C

      To reduce the number of variables in the model

    4. D

      To transform continuous variables into categorical ones

    Correct answer
    A

    To convert categorical variables into binary variables that the model can interpret

    Explanation

    One-hot encoding transforms a categorical variable into several binary (0/1) variables so they can be used in regression.

  16. 16

    What does an interaction term represent in a multiple regression model?

    1. A

      How the relationship between two independent variables changes the dependent variable

    2. B

      The sum of two independent variables

    3. C

      A variable that is the average of two other variables

    4. D

      The product of the dependent variable and an independent variable

    Correct answer
    A

    How the relationship between two independent variables changes the dependent variable

    Explanation

    An interaction term captures the combined effect of two independent variables on the dependent variable, typically their product.

  17. 17

    What does the no multicollinearity assumption require?

    1. A

      That the residuals have constant variance

    2. B

      That the sample size is large

    3. C

      That the dependent variable is normally distributed

    4. D

      That independent variables are not highly correlated with each other

    Correct answer
    D

    That independent variables are not highly correlated with each other

    Explanation

    Multicollinearity occurs when independent variables are highly correlated, which violates this assumption of multiple regression.

  18. 18

    How can multicollinearity be detected?

    1. A

      By performing a t-test on coefficients

    2. B

      By plotting the residuals against fitted values

    3. C

      By examining a Q-Q plot

    4. D

      By calculating Variance Inflation Factor (VIF)

    Correct answer
    D

    By calculating Variance Inflation Factor (VIF)

    Explanation

    VIF quantifies how much the variance of a coefficient is inflated due to multicollinearity. High VIF indicates multicollinearity.

  19. 19

    What is overfitting in regression?

    1. A

      A model that achieves perfect R-squared on test data

    2. B

      A model that has too few variables and underfits

    3. C

      A model with high bias

    4. D

      A model that fits the training data too closely and performs poorly on new data

    Correct answer
    D

    A model that fits the training data too closely and performs poorly on new data

    Explanation

    Overfitting occurs when a model is too complex and captures noise, failing to generalize to unseen data.

  20. 20

    How does adjusted R-squared differ from R-squared?

    1. A

      Adjusted R-squared measures the same thing but for logistic regression

    2. B

      Adjusted R-squared is the square root of R-squared

    3. C

      Adjusted R-squared penalizes the inclusion of unnecessary variables

    4. D

      Adjusted R-squared is always higher than R-squared

    Correct answer
    C

    Adjusted R-squared penalizes the inclusion of unnecessary variables

    Explanation

    Adjusted R-squared accounts for the number of predictors and only increases if a new variable improves the model beyond chance.

  21. 21

    In forward selection for variable selection, how does the process start?

    1. A

      By selecting variables randomly

    2. B

      With no independent variables, then adding variables one by one

    3. C

      With all possible variables, then removing them one by one

    4. D

      By including all interaction terms first

    Correct answer
    B

    With no independent variables, then adding variables one by one

    Explanation

    Forward selection begins with a null model (no predictors) and adds variables that contribute the most explanatory power.

  22. 22

    What is the bias-variance tradeoff?

    1. A

      The tradeoff between bias in data collection and variance in estimates

    2. B

      Balancing model simplicity (bias) and flexibility (variance) to minimize total error

    3. C

      The tradeoff between Type I and Type II errors

    4. D

      The tradeoff between linear and logistic regression

    Correct answer
    B

    Balancing model simplicity (bias) and flexibility (variance) to minimize total error

    Explanation

    High bias underfits; high variance overfits. The tradeoff is to find a model that balances both to minimize overall error.

  23. 23

    What is the purpose of regularization in regression?

    1. A

      To increase the number of variables in the model

    2. B

      To shrink coefficient estimates and reduce overfitting by adding bias

    3. C

      To transform categorical variables into continuous ones

    4. D

      To ensure the linearity assumption is met

    Correct answer
    B

    To shrink coefficient estimates and reduce overfitting by adding bias

    Explanation

    Regularization adds bias to reduce variance, shrinking coefficients toward zero to prevent overfitting.

  24. 24

    Which regularization technique can completely remove variables from the model?

    1. A

      Ridge regression

    2. B

      Elastic-net regression

    3. C

      Lasso regression

    4. D

      OLS regression

    Correct answer
    C

    Lasso regression

    Explanation

    Lasso regression can shrink coefficients to exactly zero, effectively removing variables from the model.

  25. 25

    What does the chi-squared goodness-of-fit test determine?

    1. A

      Whether a continuous variable is normally distributed

    2. B

      Whether an observed categorical variable follows an expected distribution

    3. C

      Whether the means of three or more groups are equal

    4. D

      Whether two categorical variables are independent

    Correct answer
    B

    Whether an observed categorical variable follows an expected distribution

    Explanation

    The goodness-of-fit test compares observed frequencies to expected frequencies from a theoretical distribution.

  26. 26

    What is the null hypothesis in a chi-squared test of independence?

    1. A

      The two categorical variables are associated

    2. B

      The observed distribution matches the expected distribution

    3. C

      The means of the groups are equal

    4. D

      The two categorical variables are independent

    Correct answer
    D

    The two categorical variables are independent

    Explanation

    For the test of independence, the null hypothesis states that the variables are independent (no association).

  27. 27

    What is a one-way ANOVA used for?

    1. A

      Comparing the means of two groups

    2. B

      Comparing the means of a continuous variable across three or more groups

    3. C

      Testing association between two categorical variables

    4. D

      Modeling a binary outcome variable

    Correct answer
    B

    Comparing the means of a continuous variable across three or more groups

    Explanation

    One-way ANOVA tests whether the means of a continuous dependent variable differ across three or more groups defined by a categorical independent variable.

  28. 28

    What is the purpose of a post hoc test like Tukey's HSD after ANOVA?

    1. A

      To calculate the R-squared of the ANOVA model

    2. B

      To determine which specific groups have significantly different means

    3. C

      To check the normality assumption

    4. D

      To test for homoscedasticity

    Correct answer
    B

    To determine which specific groups have significantly different means

    Explanation

    Post hoc tests perform pairwise comparisons while controlling for multiple testing error, identifying which groups differ.

  29. 29

    What does ANCOVA allow that standard ANOVA does not?

    1. A

      Comparing more than three groups

    2. B

      Controlling for the effects of covariates (continuous variables)

    3. C

      Using categorical dependent variables

    4. D

      Testing interaction effects

    Correct answer
    B

    Controlling for the effects of covariates (continuous variables)

    Explanation

    ANCOVA extends ANOVA by including covariates to control for their influence, isolating the effect of the categorical variable.

  30. 30

    In binomial logistic regression, what does the logit function represent?

    1. A

      The natural logarithm of the odds of the event occurring

    2. B

      The odds ratio

    3. C

      The probability of the event occurring

    4. D

      The maximum likelihood estimate

    Correct answer
    A

    The natural logarithm of the odds of the event occurring

    Explanation

    The logit is the log-odds: ln⁡(p1−p)\ln\left(\frac{p}{1-p}\right)ln(1−pp​), and it is modeled as a linear function of the predictors.

  31. 31

    What method is commonly used to estimate parameters in logistic regression?

    1. A

      Ordinary least squares (OLS)

    2. B

      K-nearest neighbors (KNN)

    3. C

      Maximum likelihood estimation (MLE)

    4. D

      Principal component analysis (PCA)

    Correct answer
    C

    Maximum likelihood estimation (MLE)

    Explanation

    Logistic regression parameters are estimated by maximizing the likelihood of observing the data (MLE).

  32. 32

    Which assumption of logistic regression states that there should be a linear relationship between each predictor and the logit of the outcome?

    1. A

      Homoscedasticity assumption

    2. B

      Normality of residuals assumption

    3. C

      Linearity of the logit assumption

    4. D

      Independence of observations assumption

    Correct answer
    C

    Linearity of the logit assumption

    Explanation

    Logistic regression requires a linear relationship between each continuous predictor and the logit of the probability of the outcome.

  33. 33

    What does a confusion matrix display?

    1. A

      The distribution of predicted probabilities

    2. B

      The ROC curve

    3. C

      The counts of true positives, true negatives, false positives, and false negatives

    4. D

      The coefficients of the model

    Correct answer
    C

    The counts of true positives, true negatives, false positives, and false negatives

    Explanation

    A confusion matrix summarizes the performance of a classification model by showing correct and incorrect predictions.

  34. 34

    In the context of classification, what does precision measure?

    1. A

      The area under the ROC curve

    2. B

      Among positive predictions, the proportion that were correct

    3. C

      Among actual positives, the proportion that were correctly identified

    4. D

      The overall proportion of correct predictions

    Correct answer
    B

    Among positive predictions, the proportion that were correct

    Explanation

    Precision = True Positives / (True Positives + False Positives), indicating the accuracy of positive predictions.

  35. 35

    What does recall measure?

    1. A

      The proportion of correct negative predictions

    2. B

      The proportion of actual positives that were correctly identified

    3. C

      The F1 score

    4. D

      The proportion of positive predictions that were correct

    Correct answer
    B

    The proportion of actual positives that were correctly identified

    Explanation

    Recall = True Positives / (True Positives + False Negatives), measuring the model's ability to find all positive instances.

  36. 36

    How should a logistic regression coefficient be interpreted after exponentiating?

    1. A

      As the change in log-odds

    2. B

      As the multiplicative change in odds for a one-unit increase in the predictor

    3. C

      As the change in R-squared

    4. D

      As the additive change in probability

    Correct answer
    B

    As the multiplicative change in odds for a one-unit increase in the predictor

    Explanation

    Exponentiating the coefficient gives the odds ratio: a one-unit increase multiplies the odds by eβe^{\beta}eβ.

Question 1 of 36
Question 1 of 36

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent