Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.Linear regression model with one dependent variable mpg (miles per gallon). This variable describes how many miles a car runs on one gallon of gas.

1.Linear regression model with one dependent variable mpg (miles per gallon). This variable describes how many miles a car runs on one gallon of gas. Higher mpg means the car consumes less gas.

The independent variable is "cyl" (number of cylinders in the car's engine). More cylinders means that the car is has more powerful engine.

2. In the second model I add one more independent variable "hp" (horsepower).

QUESTION:

1. Write the estimated equations for both models (the equation of the line for model1 and model2. (50 points)

2. Does the variable "cyl" explain well the variability in "mpg"? explain why. (25 points)

3. Does the variable "hp" explain well the variability in "mpg"? explain why. (25 points)

Linear Regression 1

Call:

lm(formula = mpg ~ cyl, data = mtcars)

Residuals:

Min 1Q Median 3Q Max -4.9814 -2.1185 0.2217 1.0717 7.5186

Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) 37.8846 2.0738 18.27 < 2e-16 cyl -2.8758 0.3224 -8.92 6.11e-10 ---

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.206 on 30 degrees of freedom

Multiple R-squared: 0.7262, Adjusted R-squared: 0.7171

F-statistic: 79.56 on 1 and 30 DF, p-value: 6.113e-10

Linear Regression 2

lm(formula = mpg ~ cyl + hp, data = mtcars)

Residuals:

Min 1Q Median 3Q Max -4.4948 -2.4901 -0.1828 1.9777 7.2934

Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) 36.90833 2.19080 16.847 < 2e-16 cyl -2.26469 0.57589 -3.933 0.00048 hp -0.01912 0.01500 -1.275 0.21253 ---

Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.173 on 29 degrees of freedom

Multiple R-squared: 0.7407, Adjusted R-squared: 0.7228

F-statistic: 41.42 on 2 and 29 DF, p-value: 3.162e-09

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Slavery And American Economic Development

Authors: Gavin Wright

1st Edition

0807152285, 9780807152287

More Books

Students also viewed these Economics questions

Question

Review secondary sources to get an overview of your topic.

Answered: 1 week ago

Question

Did you print a proof to view color and image consistency?

Answered: 1 week ago