C) Predict the value of y for x= 315 a. 50, b. 45, c. 26, d. not meaningful. D)
ID: 2909906 • Letter: C
Question
C) Predict the value of y for x= 315
a. 50, b. 45, c. 26, d. not meaningful.
D) Predict the value of y for x= 729
a. 37, b. 50, c. 26, d. not meaningful.
Find the equation of the regression line for the given data. Then construct a scatter plot of the data and draw the regression line. (The pair of variables have a significant correlation.) Then use the regression equation to predict the value of y for each of the given x-values, if meaningful. The table below shows the heights (in feet) and the number of stories of six notable buildings in a city 772628 518 508 496 483 51 (a) x 501 feet (c) x- 315 feet b) x 643 feet (d) x-729 feet tories 48 52 26 39 32 Find the regression equation. (Round the slope to three decimal places as needed. Round the y-intercept to two decimal places as needed.) Choose the correct graph below 800 800 800 Height (feet) Height (feet) Height (feet) Height (feet) (a) Predict the value of y for x = 501 . Choose the correct answer below. OA. 37 OB, 50 ° C. 45 O D. not meaningful (b) Predict the value of y forx 643. Choose the correct answer belowExplanation / Answer
Solution:
in regression there is lm function to fit a linear regression
with coefficients function you get slope and y intercept
with predict function you can predict new data
entire R code:
height_x <- c(772,628,518,508,496,483)
stories_y <- c(51,48,52,26,39,32)
regmod=lm(stories_y~height_x)
coefficients(regmod)
newdata1=data.frame(height_x=501)
predict(regmod,newdata1,interval="predict")
newdata2=data.frame(height_x=643)
predict(regmod,newdata2,interval="predict")
newdata3=data.frame(height_x=315)
predict(regmod,newdata3,interval="predict")
newdata4=data.frame(height_x=729)
predict(regmod,newdata4,interval="predict")
Output:
> coefficients(regmod)
(Intercept) height_x
8.20426792 0.05837721
> newdata1=data.frame(height_x=501)
> predict(regmod,newdata1,interval="predict")
fit lwr upr
1 37.45125 8.079087 66.82341
> newdata2=data.frame(height_x=643)
> predict(regmod,newdata2,interval="predict")
fit lwr upr
1 45.74081 16.13133 75.3503
> newdata3=data.frame(height_x=315)
> predict(regmod,newdata3,interval="predict")
fit lwr upr
1 26.59309 -12.29915 65.48533
> newdata4=data.frame(height_x=729)
> predict(regmod,newdata4,interval="predict")
fit lwr upr
1 50.76125 17.59553 83.92697
Coming to answers
regressio eq is
y=8.20+0.058x
for scatterplot
OPTION D
SolutinA;
for x=501
y^=37.45125
y^=37
answer:37
Solutionb:
for x=643
y^=45.74081
y^=45
answer:45
Solutionc:
for x=315
y^=26.59309
y^=26
answer:26
Solutiond:
x=729
y^=50.76125
ANSWER:50
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.