Professional Documents
Culture Documents
Curve Fitting
Curve Fitting
CURVE FITTING
================
Introduction
Curve fitting is the process of finding the ‘best-fit’ curve for a given set of data. It is the representation
of the relation between two variables by means of an algebraic equation.
∑ y = na + b ∑ x
∑ xy = a ∑ x + b ∑ x2
These equations can be solved simultaneously to give the best values of a and b. The best fitting
straight line is obtained by substituting the values of a and b in the equation y = a + bx.
Examples
1. Fit a straight line to the following data:
x 1 2 3 4 6 8
y 2.4 3 3.6 4 5 6
2. Fit a straight line to the following data. Also, estimate the value of y at x = 2.5.
x 0 1 2 3 4
y 1 1.8 3.3 4.5 6.3
3. Fit a straight line to the following data. Also, estimate the value of y at x = 70.
x 71 68 73 69 67 65 66 67
y 69 72 70 70 68 67 68 64
∑ y = na + b ∑ x + c ∑ x2
∑ xy = a ∑ x + b ∑ x2 + ∑ x3
∑ x2 y = a ∑ x2 + b ∑ x3 + ∑ x4
These equations can be solved simultaneously to give the best values of a, b and c. The best fitting
parabola is obtained by substituting the values of a, b and c in the equation y = a + bx + cx2 .
Examples
1. Fit a least square quadratic curve to the following data. Also estimate y(2.4).
x 1 2 3 4
y 1.7 1.8 2.3 3.2
Putting loge y = Y, loge a = A and loge b = B, we get Y = A + Bx. This is a linear equation in x and Y
and the normal equations are:
∑ Y = nA + B ∑ x
∑ xY = A ∑ x + B ∑ x2
Solving these equations, A and B, and hence a and b can be found. The best fitting exponential curve
is obtained by substituting the values of a and b in the equation y = abx .
Putting loge y = Y, loge a = A and loge x = X, we get Y = A + bX. This is a linear equation in x and Y
and the normal equations are:
∑ Y = nA + b ∑ X
∑ XY = A ∑ X + b ∑ X 2
Solving these equations, A and b, and hence a and b can be found. The best fitting exponential curve
is obtained by substituting the values of a and b in the equation y = axb .
Putting loge y = Y and loge a = A, we get Y = A + bx. This is a linear equation in x and Y and the
normal equations are:
∑ Y = nA + b ∑ x
∑ xY = A ∑ x + b ∑ x2
Solving these equations, A and b, and hence a and b can be found. The best fitting exponential curve
is obtained by substituting the values of a and b in the equation y = aebx .
Examples
1. Fit a curve of the form y = abx to the following data.
x 1 2 3 4 5 6 7 8
y 1 1.2 1.8 2.5 3.6 4.7 6.6 9.1
⋆∼⋆∼⋆∼⋆∼⋆∼⋆∼⋆∼⋆∼⋆