Linear Regression and Correlation Coefficient Demo
Loading the math board and drawing, please wait…
This example demonstrates how to plot data points and calculate the linear regression line and correlation coefficient using GeoGebra. It involves core mathematical concepts such as linear regression, correlation coefficient, arithmetic mean, calculus, reflection, and pyramid. Key GeoGebra commands used in the construction include Mean, OrthogonalLine, Intersect, Segment, PMCC, Polygon, TableText, and FitLineY. It is suitable for high school students studying coordinate geometry and probability & statistics.
GeoGebra Commands & Parameters
Mean(B2:B13) → B16Mean(A2:A13) → A16OrthogonalLine(A, a) → bOrthogonalLine(B, a) → cOrthogonalLine(C, a) → dOrthogonalLine(D, a) → eOrthogonalLine(E, a) → fOrthogonalLine(F, a) → gOrthogonalLine(G, a) → hOrthogonalLine(H, a) → iOrthogonalLine(I, a) → jOrthogonalLine(J, a) → kOrthogonalLine(K, a) → lOrthogonalLine(L, a) → mIntersect(m, a) → NIntersect(k, a) → OIntersect(l, a) → PIntersect(j, a) → QIntersect(h, i) → RIntersect(a, h) → SIntersect(h, a) → TIntersect(g, a) → UIntersect(f, a) → VIntersect(e, a) → WIntersect(d, a) → ZIntersect(c, a) → A_1Intersect(b, a) → B_1Segment(L, N) → nSegment(J, O) → pSegment(K, P) → qSegment(I, Q) → rOrthogonalLine(H, a) → sIntersect(s, a) → C_1Segment(H, C_1) → tSegment(G, S) → a_1Segment(F, U) → b_1Segment(E, V) → c_1Segment(D, W) → d_1Segment(C, Z) → e_1Segment(B, A_1) → f_1Segment(A, B_1) → g_1OrthogonalLine(B, h_1) → i_1OrthogonalLine(C, h_1) → j_1OrthogonalLine(H, h_1) → k_1OrthogonalLine(D, h_1) → l_1OrthogonalLine(E, h_1) → m_1OrthogonalLine(F, h_1) → n_1OrthogonalLine(I, h_1) → p_1OrthogonalLine(A, h_1) → q_1OrthogonalLine(J, h_1) → r_1OrthogonalLine(G, h_1) → s_1OrthogonalLine(K, h_1) → t_1OrthogonalLine(L, h_1) → a_2Intersect(i_1, h_1) → D_1Intersect(j_1, h_1) → E_1Intersect(l_1, h_1) → F_1Intersect(m_1, h_1) → G_1Intersect(n_1, h_1) → H_1Intersect(k_1, h_1) → I_1Intersect(p_1, h_1) → J_1Intersect(q_1, h_1) → K_1Intersect(r_1, h_1) → L_1Intersect(s_1, h_1) → M_1Intersect(t_1, h_1) → N_1Intersect(a_2, h_1) → O_1Segment(D_1, B) → b_2Segment(C, E_1) → c_2Segment(F_1, D) → d_2Segment(E, G_1) → e_2Segment(H_1, F) → f_2Segment(I, J_1) → g_2Segment(H, I_1) → h_2Segment(A, K_1) → i_2Segment(J, L_1) → j_2Segment(G, M_1) → k_2Segment(N_1, K) → l_2Segment(L, O_1) → m_2PMCC({A, B, C, D, E, F, G, H, I, J, K, L, M}) → o_1Polygon(B, (x(B), 0), (0, 0), (0, y(B))) → poly2, b_3, r_2, s_2, t_2Polygon(C, (x(C), 0), (0, 0), (0, y(C))) → poly3, c_3, d_3, e_3, f_3Polygon(D, (x(D), 0), (0, 0), (0, y(D))) → poly4, d_4, g_3, h_3, i_3Polygon(E, (x(E), 0), (0, 0), (0, y(E))) → poly5, e_4, j_3, k_3, l_3Polygon(F, (x(F), 0), (0, 0), (0, y(F))) → poly6, f_4, m_3, n_3, p_3Polygon(G, (x(G), 0), (0, 0), (0, y(G))) → poly7, g_4, q_3, r_3, s_3Polygon(H, (x(H), 0), (0, 0), (0, y(H))) → poly8, h_4, t_3, b_4, c_4Polygon(I, (x(I), 0), (0, 0), (0, y(I))) → poly9, i_4, j_4, k_4, l_4Polygon(J, (x(J), 0), (0, 0), (0, y(J))) → poly10, j_5, m_4, n_4, p_4Polygon(K, (x(K), 0), (0, 0), (0, y(K))) → poly11, k_5, q_4, r_4, s_4Polygon(L, (x(L), 0), (0, 0), (0, y(L))) → poly12, l_5, t_4, b_5, c_5Polygon(M, (x(M), 0), (0, 0), (0, y(M))) → poly13, m_5, d_5, e_5, f_5TableText({{"x", "y", "x-\bar x", "y- \bar y", "(x-\bar x)(y-\bar y", "(x- \bar x)^2", "(y-\bar y)^2"}, {A2, B2, C2, D2, E2, F2, G2}, {A3, B3, C3, D3, E3, F3, G3}, {A4, B4, C4, D4, E4, F4, G4}, {A5, B5, C5, D5, E5, F5, G5}, {A6, B6, C6, D6, E6, F6, G6}, {A7, B7, C7, D7, E7, F7, G7}, {A8, B8, C8, D8, E8, F8, G8}, {A9, B9, C9, D9, E9, F9, G9}, {A10, B10, C10, D10, E10, F10, G10}, {A11, B11, C11, D11, E11, F11, G11}, {A12, B12, C12, D12, E12, F12, G12}, {A13, B13, C13, D13, E13, F13, G13}, {"Total", " ", " ", " ", E14, F14, G14}}, "|_") → text3TableText({{" ", A21, B21, C21, D21}, {" ", A22, B22, C22, D22}, {" ", A23, B23, C23, D23}, {" ", A24, B24, C24, D24}, {" ", A25, B25, C25, D25}, {" ", A26, B26, C26, D26}, {" ", A27, B27, C27, D27}, {" ", A28, B28, C28, D28}, {" ", A29, B29, C29, D29}, {" ", A30, B30, C30, D30}, {" ", A31, B31, C31, D31}, {" ", A32, B32, C32, D32}, {" ", A33, B33, C33, D33}, {"Total", A34, B34, C34, D34}}, "|_") → text14FitLineY({A, B, C, D, E, F, G, H, I, J, K, L}) → n_2