1. Fitting straight line - Curve fitting example ( Enter your problem )
  1. Formula & Example-1
  2. Example-2
Other related methods
  1. Straight line (y = a + bx)
  2. Second degree parabola `(y = a + bx + cx^2)`
  3. Cubic equation `(y = a + bx + cx^2 + dx^3)`
  4. Exponential equation `(y=ae^(bx))`
  5. Exponential equation `(y=ab^x)`
  6. Exponential equation `(y=ax^b)`

2. Example-2
(Next example)

1. Formula & Example-1





Formula
Straight line equation is `y = a + bx`.
The normal equations are
`sum y = an + b sum x`
`sum xy = a sum x + b sum x^2`

Examples
Calculate Fitting straight line - Curve fitting using Least square method
XY
51
42
33
24
15


Solution:
Method-1 of solution :
Straight line equation is `y = a + bx`.

The normal equations are
`sum y = an + b sum x`

`sum xy = a sum x + b sum x^2`


The values are calculated using the following table
`x``y``x^2``x*y`
51255
42168
3399
2448
1515
------------
`sum x=15``sum y=15``sum x^2=55``sum x*y=35`


Substituting these values in the normal equations
`5a+15b=15`

`15a+55b=35`


Solving these two equations using Elimination method,
`5a+15b=15`

`5(a+3b)=5 * 3`

`a+3b=3`

and `15a+55b=35`

`5(3a+11b)=5 * 7`

`3a+11b=7`

`a+3b=3 ->(1)`

`3a+11b=7 ->(2)`

equation`(1) xx 3 =>3a+9b=9`

equation`(2) xx 1 =>3a+11b=7`

Substracting `=>-2b=2`

`=>2b=-2`

`=>b=-2/2`

`=>b=-1/1`

`=>b=-1`

Putting `b=-1` in equation `(1)`, we have

`a+3(-1)=3`

`=>a=3+3`

`=>a=6`

`:.a=6" and "b=-1`

Now substituting this values in the equation is `y = a + bx`, we get

`y = 6 -x`



Method-2 of solution :

Equation of straight line is `y=mx+b`, where Slope is m and Intercept is b

`m=(n sum xy - sum x sum y) / (n sum(x^2) - (sum x)^2)`

`b=(sum y - m sum x)/n`

The values are calculated using the following table
`x``y``x^2``x*y`
51255
42168
3399
2448
1515
------------
`sum x=15``sum y=15``sum x^2=55``sum x*y=35`


Find the value of Slope `m`

`m=(n sum xy - sum x sum y) / (n sum(x^2) - (sum x)^2)`

`:.m=(5 * 35 - 15*15) / (5* 55 - (15)^2)`

`:.m=(175 - 225) / (275 - 225)`

`:.m=(-50) / (50)`

`:.m=-1`

Find the value of Intercept `b`

`b=(sum y - m sum x)/n`

`:.b=(15 - (-1) * 15)/5`

`:.b=(15 +15)/5`

`:.b=(30)/5`

`:.b=6`

So the required equation is `y=mx+b`

`y=-1x+6`




The (x,y) points and line `y = 6 -x` on a graph





This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



2. Example-2
(Next example)





Share this solution or page with your friends.


 
Copyright © 2023. All rights reserved. Terms, Privacy
 
 

.