Find the regression equation, letting the diameter be the predictor (x) variable. Find the best predicted circumference of a marble marble with a diameter of 1.4 cm. How does the result compare to the actual circumference of 4.4 cm? Use a significance level of 0.05.
_ Diameter Circumference
Baseball 7.4 23.2
Basketball 24.3 76.3
Golf 4.2 13.2
Soccer 21.8 68.5
Tennis 6.9 21.7
Ping-Pong 4.0 12.6
Volleyball 21.2 66.6
Sol:
in R studio create a table with the given data and asisgn to df1
with lm function fit a model of Diameter on circumference
Diameter--y
circumference-x
df1 =read.table(header = TRUE, text ="
Diameter Circumference
Baseball 7.4 23.2
Basketball 24.3 76.3
Golf 4.2 13.2
Soccer 21.8 68.5
Tennis 6.9 21.7
Ping-Pong 4.0 12.6
Volleyball 21.2 66.6
"
)
df1
plot(Circumference~Diameter,pch=16,data=df1)
linmod <- lm(Circumference~Diameter,data=df1)
coefficients(linmod)
Output:
(Intercept) Diameter
0.01281831 3.14042619
Circumference= 0.01281831 +3.14042619 *Diameter
For diamteter=1.4
predicted circumference
= 0.01281831 +3.14042619 *1.4
= 4.409415
predicted circumference=4.409415
Residual=observed circumference-predicted circumference
=4.4-4.409415
=-0.009415
predicted value is more than obseved value
Get Answers For Free
Most questions answered within 1 hours.