散点图与残差
几何画板及绘图内容加载中,请稍等……
该范例演示了如何绘制散点图,并通过最小化平方误差来拟合线性回归。核心数学概念包括线性回归、残差分析。使用了GeoGebra中的多项构造命令,如Textfield、Line、Intersect等。适合高中数学教学和学习。
GeoGebra 命令及参数
Textfield(n) → inputBox1Textfield(P1) → inputBox2Textfield(P2) → inputBox3Textfield(P3) → inputBox4Max(listX) → xMaxMin(listX) → xMinMax(listY) → yMaxMin(listY) → yMinTextfield(P4) → inputBox5Textfield(P5) → inputBox6Textfield(P6) → inputBox7Textfield(P7) → inputBox8Textfield(P8) → inputBox9Textfield(P9) → inputBox10Textfield(P10) → inputBox11Line(A, B) → aIntersect(a, yAxis) → yIntOrthogonalLine(P1, xAxis) → v1OrthogonalLine(P2, xAxis) → v3OrthogonalLine(P3, xAxis) → v2OrthogonalLine(P4, xAxis) → v4OrthogonalLine(P5, xAxis) → v5OrthogonalLine(P6, xAxis) → v6OrthogonalLine(P7, xAxis) → v7Intersect(a, v1) → CIntersect(a, v3) → DIntersect(a, v2) → EIntersect(a, v4) → FIntersect(a, v5) → GIntersect(a, v6) → HIntersect(a, v7) → IOrthogonalLine(P8, xAxis) → v8OrthogonalLine(P9, xAxis) → v9OrthogonalLine(P10, xAxis) → v10Intersect(a, v8) → JIntersect(a, v9) → KIntersect(a, v10) → LSegment(C, P1) → qSegment(D, P2) → rSegment(E, P3) → sSegment(F, P4) → tSegment(G, P5) → a_1Segment(H, P6) → b_1Segment(I, P7) → c_1Segment(J, P8) → d_1Segment(K, P9) → e_1Segment(L, P10) → f_1Sum(B1:B2) → C2Min(listYS) → yMinSMax(listYS) → yMaxSCorner(1, 5) → corner5Polygon(E, P3, (x(P3) - (y(P3) - y(E)) / xycratio / xysratio, y(P3)), (x(P3) - (y(P3) - y(E)) / xycratio / xysratio, y(E))) → poly3T, e_2, p3, k_1, l_1Polygon(D, P2, (x(P2) - (y(P2) - y(D)) / xycratio / xysratio, y(P2)), (x(P2) - (y(P2) - y(D)) / xycratio / xysratio, y(D))) → poly2T, d_2, p2, m_1, n_1Polygon(C, P1, (x(P1) - (y(P1) - y(C)) / xycratio / xysratio, y(P1)), (x(P1) - (y(P1) - y(C)) / xycratio / xysratio, y(C))) → poly1T, c_2, p1, p_1, q_1Polygon(F, P4, (x(P4) - (y(P4) - y(F)) / xycratio / xysratio, y(P4)), (x(P4) - (y(P4) - y(F)) / xycratio / xysratio, y(F))) → poly4T, f_2, p4, r_1, s_1Polygon(G, P5, (x(P5) - (y(P5) - y(G)) / xycratio / xysratio, y(P5)), (x(P5) - (y(P5) - y(G)) / xycratio / xysratio, y(G))) → poly5T, g_2, p5, t_1, a_2Polygon(H, P6, (x(P6) - (y(P6) - y(H)) / xycratio / xysratio, y(P6)), (x(P6) - (y(P6) - y(H)) / xycratio / xysratio, y(H))) → poly6T, h_2, p6, b_2, i_2Polygon(I, P7, (x(P7) - (y(P7) - y(I)) / xycratio / xysratio, y(P7)), (x(P7) - (y(P7) - y(I)) / xycratio / xysratio, y(I))) → poly7T, i_3, p7, j_2, k_2Polygon(J, P8, (x(P8) - (y(P8) - y(J)) / xycratio / xysratio, y(P8)), (x(P8) - (y(P8) - y(J)) / xycratio / xysratio, y(J))) → poly8T, j_3, p8, l_2, m_2Polygon(K, P9, (x(P9) - (y(P9) - y(K)) / xycratio / xysratio, y(P9)), (x(P9) - (y(P9) - y(K)) / xycratio / xysratio, y(K))) → poly9T, k_3, p9, n_2, p_2Polygon(L, P10, (x(P10) - (y(P10) - y(L)) / xycratio / xysratio, y(P10)), (x(P10) - (y(P10) - y(L)) / xycratio / xysratio, y(L))) → poly10T, l_3, p10, q_2, r_2FitLineY(listP) → bfIntersect(bf, v1) → BF1Intersect(bf, v3) → BF2Intersect(bf, v2) → BF3Intersect(v4, bf) → BF4Intersect(bf, v5) → BF5Intersect(v6, bf) → BF6Intersect(v7, bf) → BF7Intersect(v8, bf) → BF8Intersect(v9, bf) → BF9Intersect(v10, bf) → BF10Polygon(BF1, P1, (x(P1) - (y(P1) - y(BF1)) / xycratio / xysratio, y(P1)), (x(P1) - (y(P1) - y(BF1)) / xycratio / xysratio, y(BF1))) → poly1B, bf1, p1_1, h_1, i_1Polygon(BF2, P2, (x(P2) - (y(P2) - y(BF2)) / xycratio / xysratio, y(P2)), (x(P2) - (y(P2) - y(BF2)) / xycratio / xysratio, y(BF2))) → poly2B, bf2, p2_1, j_1, s_2Polygon(BF3, P3, (x(P3) - (y(P3) - y(BF3)) / xycratio / xysratio, y(P3)), (x(P3) - (y(P3) - y(BF3)) / xycratio / xysratio, y(BF3))) → poly3B, bf3, p3_1, t_2, a_3Polygon(BF4, P4, (x(P4) - (y(P4) - y(BF4)) / xycratio / xysratio, y(P4)), (x(P4) - (y(P4) - y(BF4)) / xycratio / xysratio, y(BF4))) → poly4B, bf4, p4_1, b_3, c_3Polygon(BF5, P5, (x(P5) - (y(P5) - y(BF5)) / xycratio / xysratio, y(P5)), (x(P5) - (y(P5) - y(BF5)) / xycratio / xysratio, y(BF5))) → poly5B, bf5, p5_1, d_3, e_3Polygon(BF6, P6, (x(P6) - (y(P6) - y(BF6)) / xycratio / xysratio, y(P6)), (x(P6) - (y(P6) - y(BF6)) / xycratio / xysratio, y(BF6))) → poly6B, bf6, p6_1, f_3, g_3Polygon(BF7, P7, (x(P7) - (y(P7) - y(BF7)) / xycratio / xysratio, y(P7)), (x(P7) - (y(P7) - y(BF7)) / xycratio / xysratio, y(BF7))) → poly7B, bf7, p7_1, h_3, m_3Polygon(BF8, P8, (x(P8) - (y(P8) - y(BF8)) / xycratio / xysratio, y(P8)), (x(P8) - (y(P8) - y(BF8)) / xycratio / xysratio, y(BF8))) → poly8B, bf8, p8_1, n_3, p_3Polygon(BF9, P9, (x(P9) - (y(P9) - y(BF9)) / xycratio / xysratio, y(P9)), (x(P9) - (y(P9) - y(BF9)) / xycratio / xysratio, y(BF9))) → poly9B, bf9, p9_1, q_3, r_3Polygon(BF10, P10, (x(P10) - (y(P10) - y(BF10)) / xycratio / xysratio, y(P10)), (x(P10) - (y(P10) - y(BF10)) / xycratio / xysratio, y(BF10))) → poly10B, bf10, p10_1, s_3, t_3