6. The following data were obtained from a sample of 12 respondents. With respon
ID: 3311807 • Letter: 6
Question
6. The following data were obtained from a sample of 12 respondents. With respondents' highest grade of schooling completed as your dependent variable and fathers' highest grade of schooling completed as your independent variable, calculate the Y-intercept and the slope and write down the linear regression equation which summarizes the relationship between these two variables Highest Grade of School Highest Grade of School Highest Grade of School Completed (Respondent) 12 14 14 10 14 16 15 12 16 14 15 14 Completed (Father) 12 10 14 8 12 12 10 Completed (Mother) 12 12 12 8 12 12 16 13 14 14 20 13 12 14 Mean St. Dev Variance 13.83 1.75 3.06 11.75 2.90 8.02 11.50 3.90 15.18Explanation / Answer
We solve above equation in R software
we put the programm in r
Y=c(12,14,14,10,14,16,15,12,16,14,15,14) ### dependent variable
X=c(12,10,14,8,12,12,10,6,16,13,14,14) ### independent variable
fit=lm(Y~X) ### fitting regression model
fit
summary(fit) ### summary of regression equation
We get the out put of above programm is,
> Y=c(12,14,14,10,14,16,15,12,16,14,15,14) ### dependent variable
> X=c(12,10,14,8,12,12,10,6,16,13,14,14) ### independent variable
> fit=lm(Y~X) ### fitting regression model
> fit
Call:
lm(formula = Y ~ X)
Coefficients:
(Intercept) X
9.1067 0.4023
> summary(fit) ### summary of regression equation
Call:
lm(formula = Y ~ X)
Residuals:
Min 1Q Median 3Q Max
-2.3248 -0.7384 0.1638 0.5774 2.0661
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.1067 1.7873 5.095 0.000467 ***
X 0.4023 0.1482 2.714 0.021780 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.392 on 10 degrees of freedom
Multiple R-squared: 0.4242, Adjusted R-squared: 0.3666
F-statistic: 7.366 on 1 and 10 DF, p-value: 0.02178
here Y- intercept is 9.1067
and Slope is 0.4023
linear euation is,
Y=9.1067+0.4023X
_______________________________________________________-***________________________------------------
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.