P_1 = (-8, -8)
P_2 = (-6, -6)
P_3 = (-4, -4)
P_4 = (-2, -2)
P_5 = (2, 2)
P_6 = (4, 4)
P_7 = (6, 6)
P_8 = (0, 0)
P: {P_1, P_2, P_3, P_4, P_5, P_6, P_7, P_8}
y_8: y(P_8)
X: x(P)
Y: y(P)
XX: (X * X)
XY: (X * Y)
ΣXY = Sum(XY)
ΣX = Sum(X)
ΣY = Sum(Y)
ΣXX = Sum(XX)
n = Length(P)
m: ((n * ΣXY) - (ΣX * ΣY)) / ((n * ΣXX) - ΣX^(2))
q: ((ΣY * ΣXX) - (ΣX * ΣXY)) / ((n * ΣXX) - ΣX^(2))
r: y - (m * x) - q = 0
YY: (Y * Y)
ΣYY = Sum(YY)
m': ((n * ΣXY) - (ΣX * ΣY)) / ((n * ΣYY) - ΣY^(2))
q': ((ΣX * ΣYY) - (ΣY * ΣXY)) / ((n * ΣYY) - ΣY^(2))
r': x - (m' * y) - q' = 0
B: ((1 / n * ΣX), (1 / n * ΣY))