Docsity

regression analysis homework summaries, Exercises of Statistics

Toggle sidebar
bg1
Homework 2: Quiz format for Multiple Choice
Due Sep 28 at 11:59pm
Points 40
Questions 35
Available Sep 8 at 8am - Sep 28 at 11:59pm
Time Limit None
Instructions
This quiz was locked Sep 28 at 11:59pm.
Attempt History
Attempt Time Score
LATEST Attempt 1 5,348 minutes 34.9 out of 40
Score for this quiz: 34.9 out of 40
Submitted Sep 27 at 7:57pm
This attempt took 5,348 minutes.
Wrong answer
Question 1
0 / 1 pts
how well the predictors explain the response.
how well the model predicts the response variable for unseen data.
how well the data fit the assumptions of the model.
how well the regression line fits the observed data.
both a and d
how well the data fit the assumptions of the model.
2.8.6
Please note that these are not Goodness-of-fit measures. Goodness-of-fit refers to the goodness
of the fit of the data with the model structure and assumptions. The measures on this slide can be
used to evaluate the performance of how well the predicting variables explain the response under
the linearity assumption.
Attention: You only haveONE attempt to answer the questions.
In linear regression, goodness of fit describes:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16

Partial preview of the text

Download regression analysis homework summaries and more Exercises Statistics in PDF only on Docsity!

Homework 2: Quiz format for Multiple Choice

Due Sep 28 at 11:59pm Points 40 Questions 35 Available Sep 8 at 8am - Sep 28 at 11:59pm Time Limit None

Instructions

This quiz was locked Sep 28 at 11:59pm.

Attempt History

Attempt Time Score LATEST Attempt 1 5,348 minutes 34.9 out of 40

Score for this quiz: 34.9 out of 40 Submitted Sep 27 at 7:57pm This attempt took 5,348 minutes. Wrong answer

 Question 1 0 / 1 pts

how well the predictors explain the response. how well the model predicts the response variable for unseen data. how well the data fit the assumptions of the model. how well the regression line fits the observed data. both a and d

how well the data fit the assumptions of the model.

2.8.

Please note that these are not Goodness-of-fit measures. Goodness-of-fit refers to the goodness of the fit of the data with the model structure and assumptions. The measures on this slide can be used to evaluate the performance of how well the predicting variables explain the response under the linearity assumption.

Attention : You only have ONE attempt to answer the questions.

In linear regression, goodness of fit describes:

Correct answer

 Question 2 1 / 1 pts

the variable coefficients the intercept coefficient the variance of the errors (sigma squared)) a and b only a., b. and c.

a., b. and c.

2.1.3 Fundamentals, Objectives and Examples

"In the linear regression model, the parameters defining the regression line, the regression coefficients, β , β through β , are unknown parameters. We have an additional parameter, the variance of the errors, denoted with sigma squared. Model parameters are unknown regardless of how much data we observe. But we can derive some approximations or estimates of the parameters given the data and the model assumptions " Correct answer

 Question 3 1 / 1 pts

3 4 5 6 7

2.1. Fundamentals, Objectives and Examples

The model parameters are 𝜷 , 𝜷 , ..., 𝜷 , and. Thus, there are 7 parameters.

[2.1 Fundamentals, Objectives and Examples] In multiple linear regression, the parameters of the model are ___.

0 1 p

[2.1 Fundamentals, Objectives and Examples] If a multiple linear regression model contains 5 quantitative predicting variables and an intercept, then the number of parameters to estimate is ___.

0 1 5

mean zero

correlation

2.7.

Keep in mind that residual analysis cannot be used to check for the independence assumption. Recall, the assumption is independent errors, not uncorrelated errors. But all we can assess with the residual analysis is uncorrelated errors. If the data are from a randomized trial, the independence is implicit. But most data in regression analysis are from observational studies and thus the independence does not hold. In those cases, residual analysis is going to be used to assess uncorrelated errors, not independent errors. Wrong answer

 Question 6 0 / 1 pts

the predicting variables the response variable the Box Cox transformation does not address violations of these assumptions lambda both a and b

the response variable

2.7.

What if the normality or constant variance assumption does not hold? Often, we use a transformation that normalizes or variance-stabilizes the response variable. That common transformation is a power transformation of y. This is called the Box-Cox Transformation.

Correct answer

 Question 7 1 / 1 pts

chi-squared, normal normal, chi-squared

When the constant variance and normality (of errors) assumptions do not hold, we commonly use the Box Cox transformation to normalize or stabilize the variance of ___.

[2.2. Estimation & Interpretation] In Multiple Linear Regression, assuming that the error terms follow a ___ distribution, the estimated variance of the errors follows a ___ sampling distribution.

normal, normal chi-squared, chi-squared none of the above

normal, chi-squared

2.2.6 Estimation & Interpretation

Assuming that the error terms are normally distributed, the sampling distribution of the estimated variance, or so-called mean squared errors or MSE, is a chi-squared distribution with n-p- degrees of freedom.

Correct answer

 Question 8 1.5 / 1.5 pts

multicollinear standardized without outliers normally distributed linearly independent

False. The statement is not accurate. Let’s discuss why:

  1. Invertibility of X X : The matrix product (X X) (where (X) is the design matrix) is often encountered in linear regression. For (X X) to be invertible (i.e., have an inverse), it is crucial that the columns of (X) are linearly independent , not dependent.
  2. Linear Independence :

Linear independence means that no column of (X) can be expressed as a linear combination of the other columns. If the columns of (X) are linearly dependent (meaning there is a nontrivial linear combination that results in the zero vector), then (X X) will not be invertible.

Correct answer

 Question 9 1 / 1 pts

In fitting multiple linear regression, X TX is invertible if the columns of X are ___.

T

T

T

T

Question 11 1.5 / 1.5 pts

contains the response variable can be written as a column of 0s can be written as a column of 1s contains the pre-calculated values of the intercept for the regression model None of the above.

can be written as a column of 1s

In multiple regression, the column that allows for the estimation of the intercept in the design matrix is typically represented by a column of 1s. This practice ensures that the model accounts for the baseline value of the response variable when all predictor variables are zero. While other constant values can also be used, including a column of 1s for the intercept term is the most common approach. Correct answer

 Question 12 1 / 1 pts

normality independence constant variance linearity b and c

constant variance

2.13.

From this plot, we find that the constant variance assumption does not hold; the variability in the residuals increases as the fitted values increase also, the so-called megaphone effect. Moreover, the residuals, at low y values, seem to follow a straight-line pattern; this linear pattern may suggest that the response variable stays constant for a range of predictor values.

Correct answer

In multiple linear regression, the column that allows for the estimation of the intercept in the design matrix ___.

The megaphone effect describes a common pattern seen in visual Goodness-of-Fit analysis when the ___ assumption is violated.

Question 13 1 / 1 pts

confidence intervals for regression estimates prediction intervals for regression predictions hypothesis tests for overall regression all of the above none of the above

all of the above

2.1.

If the normality assumption is violated, hypothesis tests and confidence or prediction intervals can be misleading. Correct answer

 Question 14 1 / 1 pts

also the t-distribution. the z-distribution. the chi-squared distribution the F distribution. none of the above.

also the t-distribution.

2.4 Statistical Inference

It is the t -distribution with n - p -1 degrees of freedom.

Correct answer

In for multiple linear regression, in addition to conducting residual analysis for evaluating model assumptions, we test the assumption that the errors are normally distributed because a violation of this assumption may lead to misleading ___.

[2.4 Statistical Inference]

In simple linear regression, the sampling distribution used for estimating confidence intervals for the regression coefficients is the t-distribution. In multiple linear regression, the sampling distribution used for estimating confidence intervals for the regression coefficients is ___.

Wrong answer

 Question 17 0 / 1 pts

The first approach on this slide is by converting the qualitative variable into dummy variables. For example, for weather condition, we have 3 different labels thus 3 different dummy variables. If we do not include an intercept, as in the first model fit called ‘fit.1’, then we can include all 3 dummy variables as predicting variables.

Correct answer

 Question 18 1 / 1 pts

equal to smaller than greater than not equal to both a. and b.

greater than

2.4 Statistical Inference

"To perform this test using ANOVA, we can use the F -test just like in the ANOVA model. The F statistic is the ratio between the mean sum of squares for regression and mean sum of squares of

[2.13 Predicting Demand for Rental Bikes: Regression Analysis] If a multiple linear regression model excludes an intercept and only includes one qualitative variable with 4 categories, the number of dummy variables will be:

[2.4 Statistical Inference] When testing overall regression in multiple linear regression, if the F -test statistic is ___ the appropriate F -critical value, we reject the null hypothesis that none of the predictors explains the variability in the response.

errors or residuals. We reject the F -statistic if it's larger than the F critical point with p and n - p - degrees of freedom, with being the significance level of the test. " Correct answer

 Question 19 1 / 1 pts

Predicting new values of a response variable. Modeling the relationship between multiple predicting variables and a response. Developing a complex modeling solution, specifically designed to address challenges in a specialized field Determining a true representation of reality. Testing hypotheses regarding the relationships between predicting variables and a response.

Prediction new values of a response.

Modeling the relationship between multiple predicting variables and a response.

Testing hypotheses regarding the relationships between predicting variables and a response.

2.1.

Typically, a regression analysis is used for the following purposes:

Prediction of the response variable, Modeling the relationship of the associations between predicting variables and the response variable, Testing hypothesis of association relationships.

Why restrict ourselves to linear models? Well, they are simpler to understand, and they're simpler mathematically. But most importantly, they work well for a wide range of circumstances. It's a good idea when considering this kind of model, or in fact any statistical model, to remember the words of a famous statistician, George Box: "All models are wrong, but some are useful." We do not believe that a linear model will provide a true representation of reality, rather we think that it might provide a useful representation of reality.

Wrong answer

 Question 20 0 / 1 pts

Which of the following are common applications of regression analysis?

Adjusted R-squared can be used to compare models The value of adjusted R-squared will always be greater than or equal to that of R-squared R-squared generally increases as we add more predicting variables To measure the explainability of the variability in the response, we use adjusted R-squared Adjusted R-squared penalizes models with a greater number of predicting variables.

Adjusted R-squared can be used to compare models

R-squared generally increases as we add more predicting variables

Adjusted R-squared penalizes models with a greater number of predicting variables.

2.8. Model Evaluation and Multicollinearity

The coefficient of determination or R is another way to evaluate a linear model. However, R increases as we add more predicting variables. Thus, if we want to compare models with different numbers of predicting variables, we should use the adjusted R , because the adjusted R is adjusted for the number of predicting variables in the model. When to use R versus R adjusted? When we're interested in explaining the variability in the response, we use the R , when we want to compare models with different number of predicting variables, we're going to use the adjusted R. Correct answer

 Question 23 1.5 / 1.5 pts

the overall F-statistic being significant, yet each of the individual t-statistics are insignificant. the overall F-statistic being insignificant, yet each of the individual t-statistics are significant. causing an inflated R-squared causing an deflated R-squared none of the above

the overall F-statistic being significant, yet each of the individual t-statistics are insignificant.

[2.8. Model Evaluation and Multicollinearity]

[2.8. Model Evaluation and Multicollinearity] Select all responses from the following statements that correctly describe the differences between adjusted-R 2 and R 2 in multiple linear regression.

2 2

2 2 2 2 2

2

[2.8. Model Evaluation and Multicollinearity]

In multiple linear regression, multicollinearity can lead to problems such as ___.

From a practical point of view, multicollinearity can lead to many problems:

  1. If one value of one of the predicting variables is changed only slightly, the fitted regression coefficients can change dramatically. In statistical modeling, we say that the model is sensitive to small changes in the input.
  2. It can happen that the overall F statistic is significant, yet each of the individual t statistics is not significant. That is, we will not be able to detect statistical significance because the variance of the estimated coefficients would be artificially large. Another indication of this problem is that the p-value for the F-test is considerably smaller than those of any of the individual coefficient t-tests.

...

One problem that multicollinearity does not cause to any serious degree is inflation or deflation of the R since adding unneeded variables cannot reduce R (it can only leave it roughly the same). Correct answer

 Question 24 1 / 1 pts

the correlation between a predictor and the linear combination of the remaining predictors. the correlation between a predicting variable and another predicting predicting variable. the correlation between a predicting variable and the response variable. the correlation between a linear combination of the predicting variables and the response variable. the correlation of a predictor with each of the other predictors, evaluated one pair at a time.

the correlation between a predicting variable and the linear combination of the remaining predicting variables.

2.8 Model Evaluation and Multicollinearity

Please note that collinearity does not simply mean that the j-th variable is correlated with one other predicting variable. It means that it is a linear combination of the rest of the predicting variables. Thus, this approach goes beyond simply evaluating the correlation of pairs of predicting variables. It evaluates the correlation between a predicting variable and linear combinations of the other predicting variables.

Correct answer

 Question 25 1 / 1 pts

2 2

[2.8 Model Evaluation and Multicollinearity] VIF evaluates ___.

the regression coefficients is not equal to zero, meaning that at least one of the predictors included in the model has predictive power. Correct answer

 Question 27 1.5 / 1.5 pts

F(40,3) F(3,36) F(36,4) F(4,36)

When performing a one-way ANOVA test with 4 groups and 40 samples , let’s calculate the degrees of freedom for the F-test:

  1. Between Groups (Treatment) Degrees of Freedom :

The number of groups minus 1: DFbetween=k−1=4−1=

  1. Within Groups (Error) Degrees of Freedom : Total sample size minus the number of groups: DFwithin=n−k=40−4=

Therefore, the degrees of freedom for the F-test in this case are:

Between Groups : 3 Within Groups : 36 Hence, we use F(3,36)

Correct answer

 Question 28 1.5 / 1.5 pts

If you want to perform a one-way ANOVA test on a dataset that contains 4 groups and 40 samples, what is the degree of freedom of the F-test you should use?

[2.4 Statistical Inference]

In multiple linear regression, using hypothesis testing, if we want to test for a positive relationship (i.e. coefficient is statistically positive) then:

the p-value is the probability of both tails from the t-value of the t-distribution the p-value is the probability of the left tail from the t-value of the t-distribution the p-value is the probability of the right tail from the t-value of the t-distribution we cannot make make statistical inferences with the p-value and t-value

[2.4 Statistical Inference Slide 8]

How does the hypothesis testing procedure change if we test whether the coefficient is statistically positive or statistically negative? If we want to test for a positive relationship, then the p-value is the probability of the upper or right tail from the t-value of the t-distribution with n-p-1. If we want to test for a negative relationship, the p-value is the probability of the lower or left tail of the t-distribution. Correct answer

 Question 29 2 / 2 pts

the t-test can be used to test the overall significance of the entire model. It assesses whether at least one of the predictors has a non-zero effect on the response variable

we can use R^2 (instead of adjusted R^2) if we are only interested in explaining the variability in the response

when we have correlation among the predictors, the confidence intervals for the estimated regression line will be narrow

the pearson correlation coefficient is a statistic that summarizes how well one of the variables is linearly related to another

standardized residuals equals the residuals divided by the mean

False. The F-test (not t-test) can be used to test the overall significance of the entire model. It assesses whether at least one of the predictors has a non-zero effect on the response variable.

True. It is possible to use R^2 (instead of adjusted R^2) if we are only interested in explaining the variability in the response. When we're interested in explaining the variability in the response, we use the R^2, when we want to compare models with different number of predicting variables, we're going to use the adjusted R^2. If the primary interest is explaining the variability in the response variable (dependent variable), you can use the regular coefficient of determination,

In multiple linear regression, which of the following are true:

[select all that apply]

Correct answer

 Question 31 1 / 1 pts

All One Two Three

2.5. Statistical Inference: Data Examples

regression.line = lm(SYSBP ~ ., data) which(summary(regression.line)$coeff[,4]< 0.01)

We can see that the regression coefficients associated to the intercept, age and BMI are statistically significant at 0.01 level as their respective p -values are smaller than 0.01.

Correct answer

 Question 32 1 / 1 pts

The data is in the file " fram_v1.csv" (https://gatech.instructure.com/courses/491670/files/63984281?wrap=1) (https://gatech.instructure.com/courses/491670/files/63984281/download?download_frd=1). You can read the data using the R function read.csv().

data <- read.csv("fram_v1.csv", header=TRUE)

Perform a multiple linear regression analysis where the response variable of interest is the systolic blood pressure. Use the "as.factor" function in R for SEX and CURSMOKE so R will treat these as categorical variables, as shown below:

data$SEX <- as.factor(data$SEX) data$CURSMOKE <- as.factor(data$CURSMOKE)

Answer Questions 31-35 using this information.

How many regression coefficients including the intercept are statistically significant at the significance level 0.01?

What is the residual associated with the last observation in the data set?

-20. -18. 0 -30.

Extracting residual for last observation

regression.line$residuals[nrow(data)]

-30. Correct answer

 Question 33 1 / 1 pts

Systolic blood pressure increases by approximately 1.4889 mmHg with a one unit increase in BMI.

Systolic blood pressure increases by approximately 1.4889 mmHg with a one unit increase in BMI while holding sex, age, and smoking habit fixed.

Systolic blood pressure increases by approximately 3.504 mmHg with a one unit increase in BMI.

Systolic blood pressure increases by approximately 3.504 mmHg with a one unit increase in BMI while holding sex, age, and smoking habit fixed.

See 3.4. Model Interpretation

regression.line$coefficients[5]

From above R output, we can see that the estimated regression coefficient for BMI is 1.. Systolic blood pressure increases by approximately 1.4889 mmHg with a one unit increase in BMI holding sex, age, and smoking habit fixed.

Correct answer

 Question 34 1 / 1 pts

What is the interpretation of the estimated regression coefficient corresponding to the BMI predicting variable?

If you only include the obese population (BMI >= 30) in the sample of data and perform the regression analysis again, how many of the regression coefficients (including intercept) are statistically significant at the significance level 0.01?