In: Statistics and Probability
The director of admissions of a small college selected 120 students at random from the new freshman class in a study to determine whether a student's grade point average (gpa) at the end of freshman year can be predicted from the ACT test score.
(a) Read in the dataset (it is in the le named ACT.txt ).
(b) Obtain the least-squares estimates of intercept and slope, and state the estimated regression function.
(c) Plot the data and the estimated regression function (make sure to label the axes and give the plot a title.) Does the estimated regression function appear to t the data well?
(d) Obtain 95% and 90% confidence intervals for both b0 and b1
(e) Obtain the predicted freshman GPA for a student with ACT test score X = 28. Obtain a 95% confidence interval for the mean response.
(f) Compute a 95% prediction interval for the freshman student
whose ACT test
score is X = 25.
(g) What is the estimate of the difference in the mean GPA when the
ACT score
differs by five points?
Data: ACT.txt
GPA ACT.Scores
3.897 21
3.885 14
3.778 28
2.540 22
3.028 21
3.865 31
2.962 32
3.961 27
0.500 29
3.178 26
3.310 24
3.538 30
3.083 24
3.013 24
3.245 33
2.963 27
3.522 25
3.013 31
2.947 25
2.118 20
2.563 24
3.357 21
3.731 28
3.925 27
3.556 28
3.101 26
2.420 28
2.579 22
3.871 26
3.060 21
3.927 25
2.375 16
2.929 28
3.375 26
2.857 22
3.072 24
3.381 21
3.290 30
3.549 27
3.646 26
2.978 26
2.654 30
2.540 24
2.250 26
2.069 29
2.617 24
2.183 31
2.000 15
2.952 19
3.806 18
2.871 27
3.352 16
3.305 27
2.952 26
3.547 24
3.691 30
3.160 21
2.194 20
3.323 30
3.936 29
2.922 25
2.716 23
3.370 25
3.606 23
2.642 30
2.452 21
2.655 24
3.714 32
1.806 18
3.516 23
3.039 20
2.966 23
2.482 18
2.700 18
3.920 29
2.834 20
3.222 23
3.084 26
4.000 28
3.511 34
3.323 20
3.072 20
2.079 26
3.875 32
3.208 25
2.920 27
3.345 27
3.956 29
3.808 19
2.506 21
3.886 24
2.183 27
3.429 25
3.024 18
3.750 29
3.833 24
3.113 27
2.875 21
2.747 19
2.311 18
1.841 25
1.583 18
2.879 20
3.591 32
2.914 24
3.716 35
2.800 25
3.621 28
3.792 28
2.867 25
3.419 22
3.600 30
2.394 20
2.286 20
1.486 31
3.885 20
3.800 29
3.914 28
1.860 16
2.948 28
Solution1a:
Rcode is
Rcode is
Freshman_year <-
read.delim("C:/Users/M1045151/Downloads/college.txt")
View(Freshman_year)
dim(Freshman_year)
tail(Freshman_year)
print(head(Freshman_year))
Solutionb:
R code to get the reression eq is
reg=m(GPA~ACT,data=Freshman_year)
coefficients(reg)
(Intercept) ACT
2.11404929 0.03882713
Regression equation is
GPA=2.11404929 +0.03882713 *ACT
slope=0.03882713
y intercept=2.11404929
Solutiond:
confint(reg, 'ACT', level=0.95)
confint(reg, 'ACT', level=0.90)
Lower 95% | Upper 95% | Lower 90.0% | Upper 90.0% | |
slope | 0.0135 | 0.0641 | 0.0177 | 0.0600 |
Solutione:
Rcode :
newdata=data.frame(ACT=28)
predict(reg,newdata,interval="confidence")
predicted value | Lower 95% | Upper 95% |
3.2012 | 3.0614 | 3.3410 |
Solutionf:
newdata1=data.frame(ACT=25)
predict(reg,newdata1,interval="predict")
output:
fit lwr upr
1 3.084727 1.84562 4.323835
Fit | Lower 95% | Upper 95% | |
3.08473 | 1.84562 | 4.32384 |
Solutiong:
Regression equation is
GPA1=2.11404929 +0.03882713 *ACT1
GPA2==2.11404929 +0.03882713 *ACT2
Subtrtact
GPA2-GPA1=0.03882713*(ACT2-ACT1)
BUT DIFFERNCE IS 5
=0.03882713*(5)
= 0.1941356
difference in mean GPA= 0.1941356