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:
- Plot the data. Do x and y seem to have a linear relationship?
- 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.
- Predict the final exam grade of a student who received an 86 on the
midterm exam and studied the subject 2 hours per week.
- (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) |
| 72 | 3 | 84 |
| 50 | 2.6 | 63 |
| 81 | 0.6 | 77 |
| 74 | 2.1 | 78 |
| 94 | 0.8 | 90 |
| 86 | 1.9 | 75 |
| 59 | 1.7 | 49 |
| 83 | 1.3 | 79 |
| 65 | 5 | 77 |
| 33 | 4.6 | 52 |
| 88 | 1 | 74 |
| 81 | 3.4 | 90 |