Regression, Fehlerquadratsumme f(m,k)
Author: Prof. Dr. Dörte Haftendorn
Date: 16.10.2004

Bei C steht die Fahlerquadratsumme

S ist SChwerpunkt

P1 = (2, 1)
P2 = (3, 2)
P3 = (5, 4)
P4 = (6, 3)
m = 0.5000000000000002
k = 0.9999999999999999
g(x) = m x + k
xquer: (x(P1) + x(P2) + x(P3) + x(P4)) / 4
yquer: (y(P1) + y(P2) + y(P3) + y(P4)) / 4
S: (xquer, yquer)
fmk: (y(P1) - m x(P1) - k)² + (y(P2) - m x(P2) - k)² + (y(P3) - m x(P3) - k)² + (y(P4) - m x(P4) - k)²
R1: (x(P1), g(x(P1)))
R2: (x(P2), g(x(P2)))
R3: (x(P3), g(x(P3)))
R4: (x(P4), g(x(P4)))
r1 = Segment(R1, P1)
r2 = Segment(R2, P2)
r3 = Segment(R3, P3)
r4 = Segment(R4, P4)
P, p1, c, r1 + (r1, 0), p1 + (r1, 0), d = Polygon(P1, R1, R1 + (r1, 0), P1 + (r1, 0), P1)
Q, p2, e, r2 + (r2, 0), p2 + (r2, 0), f = Polygon(P2, R2, R2 + (r2, 0), P2 + (r2, 0), P2)
R, p3, h, r3 + (r3, 0), p3 + (r3, 0), i = Polygon(P3, R3, R3 + (r3, 0), P3 + (r3, 0), P3)
T, p4, j, r4 + (r4, 0), p4 + (r4, 0), l = Polygon(P4, R4, R4 + (r4, 0), P4 + (r4, 0), P4)
C = Point(xAxis)
U, n, c + (1, 0), c + (1, fmk), c + (0, fmk) = Polygon(C, C + (1, 0), C + (1, fmk), C + (0, fmk))