Page 279 - Artificial Intellegence_v2.0_Class_11
P. 279
Assuming No. of Hours Studied as x and Marks as y, let us plot the above data on a scatter plot.
120
100
80
Marks (Y) 60
40
20
0
0 1 2 3 4 5 6 7 8 9 10
No. of Hours Studied (X)
We will now try to find the line that best fits the data i.e. the line that passes close to most of the data points. This line
is called the ‘Line of Best Fit’ or ‘Regression Line’.
Let us find the m (slope) and b (y-intercept) that suits that data
y = mx + b
2
Step 1: For each (x,y) calculate x and xy:
x y x 2 xy
2 44 4 88
9 98 81 882
5 80 25 400
3 75 9 225
7 70 49 490
1 63 1 63
8 53 64 424
6 92 36 552
2.5 71 6.25 177.5
4 65 16 260
Regression 277

