Ratio's between heights and weights of sports car tires are :
W |
72 |
73 |
72 |
70 |
70.5 |
70 |
70 |
68.5 |
70 |
71 |
82 |
H |
125 |
119 |
126 |
116 |
121 |
120 |
120 |
110 |
123 |
115 |
34 |
Use R to answer the following questions.
Estimate the height for tire with weight 74 lbs.
> h <- read.csv("C:/Users/pcc/Desktop/h.csv")
> View(h)
> dim(h)
[1] 11 2
> ## Linear regression ##
> fit=lm(H~W,data = h)
> fit
Call:
lm(formula = H ~ W, data = h)
Coefficients:
(Intercept) W
572.173 -6.419
> ## Estimted height for tire with weight 74 lbs ##
> pr=data.frame(W=74) > predict(fit,pr) 1 97.13773 ## So the estimated height for tire when weight is equal to 74 is 97.13771 ## |
Get Answers For Free
Most questions answered within 1 hours.