fitting a Straight line and a Parabola

Comprehensive study notes, diagrams, and exam preparation for fitting a Straight line and a Parabola.

Fitting a Straight Line and a Parabola

Definition

Curve fitting is the mathematical process of constructing a curve (a mathematical function) that has the best fit to a series of data points. When we fit a straight line ($y = a + bx$) or a parabola ($y = a + bx + cx^2$), we use the Method of Least Squares to minimize the sum of the squares of the vertical deviations between the observed data points and the fitted curve.


Main Content

1. Fitting a Straight Line (Linear Regression)

  • A straight line represents a linear relationship where a constant change in $x$ leads to a constant change in $y$.
  • It is defined by the equation $y = a + bx$, where '$a$' is the y-intercept and '$b$' is the slope of the line.

2. Fitting a Parabola (Quadratic Regression)

  • A parabola represents a non-linear relationship where the rate of change is not constant, typically used when data shows a "U" shape or a curvature.
  • It is defined by the equation $y = a + bx + cx^2$, involving three constants ($a, b, c$) that determine the shape and position of the curve.

3. The Method of Least Squares

  • This principle states that the line or curve of best fit is the one where the sum of the squares of the residuals (the difference between actual $y$ and predicted $y$) is minimized.
  • It translates into "Normal Equations" which allow us to solve for the unknown constants ($a, b, c$) algebraically.

Working / Process

1. Identify Normal Equations

  • For a straight line ($y = a + bx$): 1) $\sum y = na + b \sum x$ 2) $\sum xy = a \sum x + b \sum x^2$

  • For a parabola ($y = a + bx + cx^2$): 1) $\sum y = na + b \sum x + c \sum x^2$ 2) $\sum xy = a \sum x + b \sum x^2 + c \sum x^3$ 3) $\sum x^2y = a \sum x^2 + b \sum x^3 + c \sum x^4$

2. Tabulation of Data

  • Create a table to calculate the required summations ($\sum x, \sum y, \sum xy, \sum x^2$, etc.) based on your data points $(x, y)$.
  • Ensure the number of data points $n$ is clearly identified to substitute into the equations.

3. Solve for Constants

  • Substitute the summation values from the table into the Normal Equations.
  • Use substitution or elimination methods to solve the system of linear equations to find the values of $a, b$, and $c$.
Visual representation of a Linear vs Parabolic fit:

      |      / (Linear)       |     \     / (Parabolic)
      |     /                 |      \   /
      |    /                  |       \ /
      |   /                   |        -
      ------------------      ------------------

Advantages / Applications

  • Predictive Analysis: Allows researchers to forecast future trends based on existing historical data points.
  • Scientific Modeling: Helps in understanding physical laws, such as projectile motion (parabolic) or velocity-time relationships (linear).
  • Data Smoothing: Eliminates "noise" or random fluctuations in data to reveal the underlying trend.

Summary

Curve fitting is a technique used to find the best-fitting mathematical model for a set of observations. By minimizing the sum of the squares of the errors, we can determine the specific parameters of a straight line or a parabola that represent a data set.

  • Key terms: Residual (error), Normal Equations, Least Squares Method, y-intercept, Slope.