(Linear regression) Is there a relationship between final exam scores and the nu
ID: 3303810 • Letter: #
Question
(Linear regression) Is there a relationship between final exam scores and the number of hours spent studying per week? A study was conducted involving 8 students and the data is shown below.
Hours spent studying per week final score
4 75
9 82
10 92
14 100
4 68
7 88
12 95
3 77
Find a linear regression model by using the minimum absolute error method. Reformulate it as a linear programming and solve it using AMPL. Give a prediction of the IEOR 240 final score on a student who studied 2 hours a week.
Explanation / Answer
SO we will find the linear line regression Model
Line regression equation
y^ = a + bx
THe linear regression equation can be calculated by x, y, x2 ,xy
So here n = 8
a = [(y) (x2 ) - (x) (xy)]/ [ n (x2 ) - (x)2 ]
all the values are given above and putting all these values from the table, we get
a = [677 * 611 - 63 * 5617]/ [ 8 * 611 - 632 ]
a = 59776/ 919 = 65.044
b = [ n(xy) - (x)((y)]/ [ n (x2 ) - (x)2 ]
b = [8 * 5617 - 63 * 677]/ [8 * 611 - 632 ]
b = 2285/919 = 2.486
y^ = 65.044 + 2.486x
Final scocre on a student who studied 2 hours a week
y^(2) = 65.044 + 2.486 *2 = 70.02 Hours
Hours Spent (x) Final Score(y) x^2 xy 3 77 9 231 4 75 16 300 4 68 16 272 7 88 49 616 9 82 81 738 10 92 100 920 12 95 144 1140 14 100 196 1400 Sum 63 677 611 5617Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.