Page 280 - Artificial Intellegence_v2.0_Class_11
P. 280
2
Step 2: Sum x, y, x and xy:
N = No. of samples = 10
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
2
∑x=48 ∑y=711 ∑x =291 ∑xy=3562
Step 3: Calculate Slope m:
m = N Σ(xy) − Σx Σy
N Σ(x ) − (Σx) 2
2
= 10(3562) – (48) (711)
10 (291) – (48) 2
= 35620 – 34128
2910 – 2304
= 1492 = 2.46
606
Step 4: Calculate Intercept b:
b = Σy − m Σx
N
= 711 – 2.46 (48)
1 0
= 711 – 118.08
10
=592.92 = 59.29 = 59.3
10
Step 5: Assemble the equation of a line:
y = mx + b
y = 2.46x + 59.3
Using this equation, we can calculate predicted values of y using any values of x. Let us plot this line on the graph.
278 Touchpad Artificial Intelligence (Ver. 2.0)-XI

