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...
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).
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?
A monopolist faces a market demand curve given by P(y)=100-y. Its cost function is C(y)=y2+20. a)...
A monopolist faces a market demand curve given by P(y)=100-y. Its cost function is C(y)=y2+20. a) Find its profit-maximizing output level and market price. b) Calculate its total revenue, total cost and profit at that output. c) Calculate CS, PS and DWL? d) What is the efficient amount of output? e) Plot the graph for this monopolist indicating P(y), MR, MC, y*, p(y*), CS, PS, and DWL.
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).
If the share price is $21.50 and the exercise price and premium of a call option...
If the share price is $21.50 and the exercise price and premium of a call option written on that share are $19.90 and $2.00, respectively, what is the time value of the option? Select one: $2.00 $0.40 $0.00 $17.90 $1.60
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT