Line of Best Fit (proposed)

Data Points (5)

EXPLORING THE LINE OF BEST FIT

Line of Best Fit (actual)

sum of squared residuals

Residuals

Move M and N to “adjust” line of best fit.

A = (6, 6)
B = (8, 8)
C = (10, 8)
D = (12, 10)
E = (14, 12)
M = (4.441955968048148, 2.492534794449214)
N = (17.83650346664748, 10.602158790199814)
a = Line(M, N)
b = OrthogonalLine(A, xAxis)
c = OrthogonalLine(B, xAxis)
d = OrthogonalLine(C, xAxis)
e = OrthogonalLine(D, xAxis)
f = OrthogonalLine(E, xAxis)
A' = Intersect(a, b)
B' = Intersect(a, c)
C' = Intersect(a, d)
D' = Intersect(a, e)
E' = Intersect(a, f)
distanceAA' = Distance(A, A')
TextAA': Name[A] + (Name[A']) + " = " + distanceAA'
distanceBB' = Distance(B, B')
TextBB': Name[B] + (Name[B']) + " = " + distanceBB'
distanceCC' = Distance(C, C')
TextCC': Name[C] + (Name[C']) + " = " + distanceCC'
distanceDD' = Distance(D, D')
TextDD': Name[D] + (Name[D']) + " = " + distanceDD'
distanceEE' = Distance(E, E')
TextEE': Name[E] + (Name[E']) + " = " + distanceEE'
s: distanceAA'^(2) + distanceBB'^(2) + distanceCC'^(2) + distanceDD'^(2) + distanceEE'^(2)
r_c: sqrt(s / π)
g = Segment(A, A')
h = Segment(B, B')
i = Segment(C, C')
j = Segment(D, D')
k = Segment(E, E')
F = (22, 10)
text3: "PREDICTED
A'=" + A' + "
B'=" + B' + "
C'=" + C' + "
D'=" + D' + "
E'=" + E' + ""
m = false
n = false
text4: "" + s + ""
c' = PMCC({A, B, C, D, E})
text2: "OBSERVED
A = " + A + "     
B=" + B + "
C=" + C + "
D=" + D + "
E=" + E + "
CORRELATION COEFFICIENT: " + c' + ""
q = FitLineY({A, B, C, D, E})
o = false
r_s: sqrt(s)
G = (22, 6)
H = (28, 6)
p = Line(G, H)
r = OrthogonalLine(G, p)
t = Circle(G, r_s)
I = Intersect(t, r, 2)
J = Intersect(t, p, 2)
a_1 = OrthogonalLine(J, p)
b_1 = OrthogonalLine(I, r)
K = Intersect(a_1, b_1)
poly1, g_1, i_1, k_1, j_1 = Polygon(G, I, K, J)
poly2, c_1, d_1, e_1, f_1, L, O = Polygon(A, A', 4)
poly3, h_1, l_1, m_1, n_1, P, Q = Polygon(B', B, 4)
poly4, p_1, q_1, r_1, s_1, R, S = Polygon(C, C', 4)
poly5, t_1, a_2, b_2, c_2, T, U = Polygon(D', D, 4)
poly6, d_2, e_2, f_2, g_2, V, W = Polygon(E, E', 4)
text1: "" + poly2 + "+" + poly3 + "+" + poly4 + "+" + poly5 + "+" + poly6 + "=" + poly1 + ""
l = false