Problem Description:

The following table shows the midterm and final exam grades obtained for students in a database course.
x (Midterm exam) y (Final exam)
72 84
50 63
81 77
74 78
94 90
86 75
59 49
83 79
65 77
33 52
88 74
81 90

Your tasks:

  1. Plot the data. Do x and y seem to have a linear relationship?
  2. Use linear regression (an error based learning method) to build a model that predicts a student's final exam grade based on the student's midterm grade in the course.
  3. Predict the final exam grade of a student who received an 86 on the midterm exam and studied the subject 2 hours per week.
  4. (Optional) Try the above steps again, if the training data set has an extra descriptive attribute (the number of study hours per week spent on the subject), and the data is shown in the following table:
x1 (Midterm exam) x2 (study hours per week) y (Final exam)
72384
502.663
810.677
742.178
940.890
861.975
591.749
831.379
65577
334.652
88174
813.490