Using RStudio, complete the following problem using the father-son heights data
ID: 3359062 • Letter: U
Question
Using RStudio, complete the following problem using the father-son heights data set http://personal.psu.edu/acq/401/Data/FatherSonHeights.txt
a.) An old friend, whom you have not seen since fourth grade, contacts you through Facebook. Some time after that you decide to meet in person but you have no idea how tall he turned out to be. Using the sons’ heights data construct an 80% PI for your friend’s height.
b.) Fit the simple linear regression model for predicting a son’s height from his father’s height, and construct 90% CIs for the slope and the average height of sons corresponding to 6ft tall fathers.
c.) You remember that the father of your fourth grade friend, whom you are going to meet, was 6ft tall. Give an updated 80% PI for your friend’s height.
RStudio must be used because it is a lab and it won't be graded without it.
Explanation / Answer
> Chegg=read.csv("Chegg_CSV.csv", header=T)
>
> model=lm(S_H~F_H, data=Chegg)
> summary( model)
Call:
lm(formula = S_H ~ F_H, data = Chegg)
Residuals:
Min 1Q Median 3Q Max
-3.098 -1.355 -0.328 1.378 3.331
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 17.75080 4.52405 3.924 0.000515 ***
F_H 0.75469 0.06422 11.752 2.44e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.77 on 28 degrees of freedom
Multiple R-squared: 0.8314, Adjusted R-squared: 0.8254
F-statistic: 138.1 on 1 and 28 DF, p-value: 2.436e-12
> confint(model, level=0.80)
10 % 90 %
(Intercept) 11.8128641 23.6887327
F_H 0.6703953 0.8389748
a) The sons’ heights data, an 80% PI for your friend’s height is
(11.8128641+ 0.6703953 , 23.6887327+0.8389748)= (12.48, 24.52)
b) Ans:
90% CIs for the slope and the average height of sons corresponding to 6ft tall fathers
> confint(model, level=0.90)
5 % 95 %
(Intercept) 10.0548002 25.4467966
F_H 0.6454393 0.8639308
=(10.0548002 +0.6454393*6, 25.4467966+ 0.8639308*6)=(13.95, 30.61)
c) 80% PI for your friend’s height is
(11.8128641+ 0.6703953*6 , 23.6887327+0.8389748*6)= (15.83, 28.73)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.