Question

In: Statistics and Probability

y=c(18.90, 17, 20, 18.25, 20.07, 11.2, 22.12, 21.47, 34.70, 30.40, 16.50, 36.50, 21.50, 19.70, 20.30, 17.80,...

y=c(18.90, 17, 20, 18.25, 20.07, 11.2, 22.12, 21.47, 34.70, 30.40, 16.50, 36.50, 21.50, 19.70, 20.30, 17.80, 14.39, 14.89, 17.80, 16.41, 23.54, 21.47, 16.59, 31.90, 29.40, 13.27, 23.90, 19.73, 13.90, 13.27, 13.77, 16.50)

x1=c(350, 350, 250, 351, 225, 440, 231, 262, 89.7, 96.9, 350, 85.3, 171, 258, 140, 302, 500, 440, 350, 318, 231, 360, 400, 96.9, 140, 460, 133.6, 318, 351, 351, 360, 350)

x2=c(4, 4, 1, 2, 1, 4, 2, 2, 2, 2, 4, 2, 2, 1, 2, 2, 4, 4, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 4, 4)

The le hmw7 prob4.R contains data on the gasoline mileage performance of 32 dierent au-
tomobiles.
(a) Fit a simple linear regression model relating gasoline mileage (y) to engine displace-
ment (x1) and carburetor (x2).
(b) Construct and interpret the partial regression plots for each predictor.
(c) Compute the studentized residuals and the R-student residuals for this model. What
information is conveyed by these scaled residuals?

Solutions

Expert Solution

R Studio: Program

y=c(18.90, 17, 20, 18.25, 20.07, 11.2, 22.12, 21.47, 34.70, 30.40, 16.50, 36.50, 21.50, 19.70, 20.30, 17.80, 14.39, 14.89, 17.80, 16.41, 23.54, 21.47, 16.59, 31.90, 29.40, 13.27, 23.90, 19.73, 13.90, 13.27, 13.77, 16.50)

x1=c(350, 350, 250, 351, 225, 440, 231, 262, 89.7, 96.9, 350, 85.3, 171, 258, 140, 302, 500, 440, 350, 318, 231, 360, 400, 96.9, 140, 460, 133.6, 318, 351, 351, 360, 350)

x2=c(4, 4, 1, 2, 1, 4, 2, 2, 2, 2, 4, 2, 2, 1, 2, 2, 4, 4, 4, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 4, 4)
#Linear Regression
linearreg <- lm(y~x1+x2)
summary(linearreg)

#Partial Residual plot for each predictor
library(car)
crPlots(linearreg)


#Studentized residuals
linearstudies <- studres(linearreg)
plot(x1+x2, linearstudies, ylab = "Studnardised Residuals", xlab = "Predictors", main = "Residuals")
abline(0,0)

a)Linear regression model:

Using above P-value, we can conclude that the input variables are significant to output variable. But X2 is not significant to an output variable.

b) Residual plots:

There predictors X1 seems to be significant to an output variable but not X2. Because data distribution is not stationary. There is a overlap between Y and X1 but not with X2.

c)

Residuals must be independent to each other and should not follow any trend or pattern. As per above graph we can see that the residuals not following any trend or pattern and are totally independent.


Related Solutions

y ' ' ' − y ' ' − 17 y ' − 15 y =...
y ' ' ' − y ' ' − 17 y ' − 15 y = 0 y ( 0 ) = − 2 , y ' ( 0 ) = − 14 , y ' ' ( 0 ) = − 82 y(t)= ?
Given the following values of income and consumption x 20 11 15 10 17 19 y...
Given the following values of income and consumption x 20 11 15 10 17 19 y 5 15 14 17 8 9 a) Find the covariance b) Find and explain the correlation c) Determine the equation of least squares line d) Find predicted values of Y for X = 16 & 25
1) What is the value of b1? X: 12, 21, 28, 8, 20. Y: 17, 15,...
1) What is the value of b1? X: 12, 21, 28, 8, 20. Y: 17, 15, 22, 19, 24 2) What is the value of b0? X: 12, 21, 28, 8, 20. Y: 17, 15, 22, 19, 24 3) What is the equation of the y-hat estimator line? X: 12, 21, 28, 8, 20. Y: 17, 15, 22, 19, 24. a. Y=0.162-16.51x b. y=0.162+16.51x c. Y=16.51-0.162x d. Y=16.51+0.162x 4) If x is increased by 10 units, how much does y-hat...
Determine the empirical formula of a compound that is 53.3% C, 11.2% H, and 35.5% O...
Determine the empirical formula of a compound that is 53.3% C, 11.2% H, and 35.5% O by mass. What is the molecular formula of the compound, if its molar mass is approximately 90 g/mol?
Let x and y be integers such that 17 | (3x +5y). Prove that 17 |...
Let x and y be integers such that 17 | (3x +5y). Prove that 17 | (8x + 19y).
An expandable cube, initially 17 cm on each side contains 3.9 g of helium at 20∘C....
An expandable cube, initially 17 cm on each side contains 3.9 g of helium at 20∘C. 1400 J of heat energy are transferred to this gas. a. What is the final pressure if the process is at constant volume? b. What is the final volume if the process is at constant pressure?
Group 1: Control - 20, 14, 18, 16, 17, 17 Group 2: Psychodynamic - 20, 9,...
Group 1: Control - 20, 14, 18, 16, 17, 17 Group 2: Psychodynamic - 20, 9, 10, 15, 15, 15 Group 3: Rational-Emotive - 18, 7, 15, 9, 11, 12 Group 4: Behavior Modification - 15, 5, 6, 13, 12, 9 Use Tukey's HSD to compare the individual means. What is q critical (from Table L)? (1 point) What is MS within (a.k.a. MS error in some output)? (1 point) What is n? (1 point) Compute HSD. (1 point) Are...
Use the following rates for Questions 17-20.
Use the following rates for Questions 17-20.Calculate ?3Calculate ???1,2Time0y1y 1y1y 2y1y 3y1y 4y1yRate3.00% 5.01% 7.03% 9.06% 11.10%Consider an investment that will pay a cash flow of $1000 at t = 1. What is the value of this investment today (e.g., at t = 0)?Now consider an investment that will pay a cash flow of $1000 at t = 4. What is the expected value of this investment in exactly 1 year (e.g., at t = 1).
1. If y=C+I where C= 50+.75 Y and I = 50 What is Y, C, and...
1. If y=C+I where C= 50+.75 Y and I = 50 What is Y, C, and the multiplier? What if instead I = 50+.05Y? 2. If Y=C+I+G where C=C - aTo + Y(a - at) and I= lo + by solve for Y, C, I, and the multiplier. Given a = MPC= .75, MPT = .2, MPI = .15, C = 45, To = 40 Io = 60 and G=90 3. What is the present value of $1,000 paid at...
A 20 year loan is repaid by a decreasing annuity of 20, 19, 18, 17, ....,...
A 20 year loan is repaid by a decreasing annuity of 20, 19, 18, 17, ...., 3, 2, 1, and payments are made at the end of each year. The annual effectuve interest rate is 7%. Determine the row of an amortization table associated with the 11th payment.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT