Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A used car dealer wants to develop a regression equation that determines mileage

ID: 3228700 • Letter: A

Question

A used car dealer wants to develop a regression equation that determines mileage as a function of the age of a car in years. He collects the data shown below for the 12 cars he has on his lot.



a) What is the slope of the regression equation? Give your answer to two decimal places.  

b) What is the value of the correlation coefficient? Give your answer to two decimal places.  

c) A 4 year old car is delivered to his lot with 160000 miles. Manually enter these values in the data table above and rerun the regression analysis. What is the value of the slope? Give your answer to two decimal places.  

d) Including the additional car, what is the value of the correlation coefficient? Give your answer to two decimal places.  
e) Did the additional car strengthen or weaken the linear relationship between age and mileage?

It strengthened the linear relationship.

It weakened the linear relationship.    

Can not be determined.

Explanation / Answer

a) I am using R software to solve this problem.

First we need to load the data into R. I have copied the observations into a txt file. We can import this file into R environment using below command:

Data <- read.csv("Data.txt", header = T)

Fit a linear model:

#Fit linear model
fit <- lm(Mileage ~ Age, data = Data)
#Print summary
summary(fit)

Call:
lm(formula = Mileage ~ Age, data = Data)

Residuals:
Min 1Q Median 3Q Max
-19919 -4793 -2998 4006 22073

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -21567 15590 -1.383 0.197
Age 11743 1478 7.945 1.25e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 12740 on 10 degrees of freedom
Multiple R-squared: 0.8632,   Adjusted R-squared: 0.8496
F-statistic: 63.12 on 1 and 10 DF, p-value: 1.251e-05

So the slope of the regression equation is 11743

b) The value of correlation coefficient can be found out using the cor() function in R as below:

cor(Data$Age,Data$Mileage)

= 0.9291096 = 0.93 approx

c)

#Adding new observations to the old dataset

NewData <- data.frame(Age = 4, Mileage = 160000)
Data <- rbind(Data,NewData)

#Fit linear model again
fit1 <- lm(Mileage ~ Age, data = Data)
#Print summary
summary(fit1)

Call:
lm(formula = Mileage ~ Age, data = Data)

Residuals:
Min 1Q Median 3Q Max
-48559 -21609 573 8750 83629

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 57557 33211 1.733 0.111
Age 4704 3258 1.444 0.177

Residual standard error: 34220 on 11 degrees of freedom
Multiple R-squared: 0.1593,   Adjusted R-squared: 0.08288
F-statistic: 2.084 on 1 and 11 DF, p-value: 0.1767

So the value of slope now is 4704.

d) Including the additional car, the correlation coefficent is now:

cor(Data$Age,Data$Mileage)

= 0.3991339 = 0.40

e) The additional car has weakened the linear relationship. We can say this beacause the value of correlation coefficient has decreases from 0.93 to 0.40. Also the p value for Age variable is not significant. Adjusted R square has also decreased from 0.8496 to 0.08288

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote