Least Squares Approximation

Least Squares Approximation
Loading the math board and drawing, please wait…
2017-07-14 14:03
This example demonstrates linear regression via least squares method to fit a line through scattered data points. Core math concepts include least squares, statistical characteristics, normal distribution, similarity transformation, and 2D vectors. Construction highlights involve using GeoGebra commands/objects like Sequence, Sum, Textfield, TableText, and buttons to control function coefficient calculations (Legendre, Chebyshev). Suitable for high school and above learners exploring data fitting and optimization techniques.

GeoGebra Commands & Parameters

  1. Sequence(Integral[(Element[Legendre, i] * f0(x)), -1, 1] / Integral[Element[Legendre, i]^(2), -1, 1], i, 1, 11) → LeCoeff
  2. Sequence(Integral[((w(x) * Element[Chebyshev, i]) * f0(x)), -0.999999999, 0.999999999] / Integral[(w(x) * Element[Chebyshev, i]^(2)), -0.999999999, 0.999999999], i, 1, 11) → ChCoeff
  3. Sum(L, n + 1) → LL
  4. Sum(C, n + 1) → CC
  5. Textfield(f0) → InputBox1
  6. Sequence(Element[LeCoeff, i], i, 1, n + 1) → list1
  7. Sequence(Element[ChCoeff, i], i, 1, n + 1) → list2
  8. Sequence(Element[list3, i], i, 1, n + 1) → list4
  9. TableText({list4, list1}, "v") → text1
  10. TableText({list4, list2}, "v") → text2