PRESENTED BY


 OSAMA TAHIR
   09-EE-88
  SECTION (A)
LEAST SQUARE

 The least squares technique is the simplest and
  most commonly applied form and provides a
  solution to the problem through a set of points.
The term least squares describes a frequently
used approach to solving overdeter-mined or
inexactly specied systems of equations in an
approximate sense. Instead of solving the
equations exactly, we seek only to minimize the
sum of the squares of the residuals
LEAST SQUARE

 least square method is widely used to find
  or estimate the numerical values of the
  parameters to fit a function to a set of data
  and to characterize the statistical
  properties of estimates.
GRAPH
 A cubic fitting is defined as the smoothest
  curve that exactly fits a set of data points.
 Generalizing from a straight line the ith
  fitting function for a cubic fitting can be
  written as:



                                   2            3
si x      ai     bi x       ci x        di x
2            3
     yx       a0     a1 x   a2 x          a3 x

 The residual of above equation is
     n
R2         [ y (a0    a1 x a 2 x 2       a3 x 3 )] 2   0
     i 1
 Now we take its partial derivatives
   The partial derivatives are
                    n
  2
R / a0      2           [y    (a 0    a1 x      .....      a 3 x 3 )]    0
                i 1
                n
  2
R / a1     2            [y   ( a0    a1 x     .....      a 3 x 3 )] x    0
               i 1
                n
R 2 / a2   2            [y   (a0     a1 x    .....      a 3 x 3 )] x 2   0
               i 1

                n
 2
R / a3     2            [y   (a0     a1 x    .....      a 3 x 3 )] x 3   0
               i 1
n                             n                 n
           a 0 n a1         xi      ......     a3        xi3                 y
                      i 1                            i                 i 1


     n                n                                  n                       n
                                2                                  3
a0         xi   a1          x   i     ......        a3         x   i                 xi y
     i 1              i 1                                i                   i 1
Cont...

 Now to write this least square equation
In matrix form
    y0          1 x0 x0 x0 2   3       a0
    y1          1 x1 x12 x13           a1
    y2          1 x2 x2 x2 2   3
                                       a2
    y3          1 x x2 x3              a
                      3   3    3         3
In Matrix notation the equation for a Polynomial is
given by
Y=XA
,

          Cont ...


    This can be solved by premultiplying by the transpose



                          xt y       x t xa

                                 t     1   t
                        a ( x x) x y
EXAMPLES
Example…
A bioengineer is studying the growth of a genetically
engineered bacteria culture and suspects that is it
approximately follows a cubic model. He collects six data
points listed below

Time in Days   1      2      3       4      5        6
Grams          2.1    3.5    4.2     3.1    4.4      6.8



 Let we solve it by cubic fitting method
     ax3 + bx2 + cx + d = y
Cont …

 This gives six equations with four
  unknowns
      a + b + c + d = 2.1
     8a + 4b + 2c + d = 3.5
    27a + 9b + 3c + d = 4.2
    64a + 16b + 4c + d = 3.1
   125a + 25b + 5c + d = 4.4
    216a + 36b + 6c + d = 6.8
Cont...

 The corresponding matrix equation is

                                         2 .1
                    a                    3 .5
                    b                    4 .2
                    c                    3 .1
                    d                    4 .4
                                         6 .8
Cont ...
                                          0 .2
 a
 b               t     1    t
                                           2 .0
              ( x x)       x y
 c                                        6 .1
 d                                         2 .3

     So that the best fitting cubic is

         y = 0.2x3 - 2.0x2 + 6.1x - 2.3
 cubic fittings are preferred over other
  methods because they provide the simplest
  representation that exhibits the desired
  appearance of smoothness

 Cubic fittings provide a great deal of
  flexibility in creating a continuous smooth
  curve both between and at tenor points.
 If we have damped curves or very humped
  curves then we can not obtain usefull results
  from Cubic Fitting Method..because they are
  used for smooth curves
Applications in
“The Real World”???

 The cubic fitting method (CFM) is probably
  the most popular technique in statistics.
 In mathematics it is used to solve different
  curved spaces.
 It is used in the manufacturing of plumbing
  materials.
 It is much important in mechanical and
  Electrical and Civil Engineering
REFERENCES...

 Wikipedia.com
 Advanced Engineering Mathematics
 Nocedal J. & Wright, S. (1999). Numerical
  optimization. New youk
 NUMARICAL ANALYSIS
THANKYOU

FOR YOUR ATTENTION

numarial analysis presentation

  • 2.
    PRESENTED BY OSAMATAHIR 09-EE-88 SECTION (A)
  • 4.
    LEAST SQUARE  Theleast squares technique is the simplest and most commonly applied form and provides a solution to the problem through a set of points. The term least squares describes a frequently used approach to solving overdeter-mined or inexactly specied systems of equations in an approximate sense. Instead of solving the equations exactly, we seek only to minimize the sum of the squares of the residuals
  • 5.
    LEAST SQUARE  leastsquare method is widely used to find or estimate the numerical values of the parameters to fit a function to a set of data and to characterize the statistical properties of estimates.
  • 6.
  • 7.
     A cubicfitting is defined as the smoothest curve that exactly fits a set of data points.
  • 9.
     Generalizing froma straight line the ith fitting function for a cubic fitting can be written as: 2 3 si x ai bi x ci x di x
  • 10.
    2 3 yx a0 a1 x a2 x a3 x The residual of above equation is n R2 [ y (a0 a1 x a 2 x 2 a3 x 3 )] 2 0 i 1
  • 11.
     Now wetake its partial derivatives  The partial derivatives are n 2 R / a0 2 [y (a 0 a1 x ..... a 3 x 3 )] 0 i 1 n 2 R / a1 2 [y ( a0 a1 x ..... a 3 x 3 )] x 0 i 1 n R 2 / a2 2 [y (a0 a1 x ..... a 3 x 3 )] x 2 0 i 1 n 2 R / a3 2 [y (a0 a1 x ..... a 3 x 3 )] x 3 0 i 1
  • 12.
    n n n a 0 n a1 xi ...... a3 xi3 y i 1 i i 1 n n n n 2 3 a0 xi a1 x i ...... a3 x i xi y i 1 i 1 i i 1
  • 13.
    Cont...  Now towrite this least square equation In matrix form y0 1 x0 x0 x0 2 3 a0 y1 1 x1 x12 x13 a1 y2 1 x2 x2 x2 2 3 a2 y3 1 x x2 x3 a 3 3 3 3 In Matrix notation the equation for a Polynomial is given by Y=XA
  • 14.
    , Cont ... This can be solved by premultiplying by the transpose xt y x t xa t 1 t a ( x x) x y
  • 15.
  • 16.
    Example… A bioengineer isstudying the growth of a genetically engineered bacteria culture and suspects that is it approximately follows a cubic model. He collects six data points listed below Time in Days 1 2 3 4 5 6 Grams 2.1 3.5 4.2 3.1 4.4 6.8 Let we solve it by cubic fitting method ax3 + bx2 + cx + d = y
  • 17.
    Cont …  Thisgives six equations with four unknowns a + b + c + d = 2.1 8a + 4b + 2c + d = 3.5 27a + 9b + 3c + d = 4.2 64a + 16b + 4c + d = 3.1 125a + 25b + 5c + d = 4.4 216a + 36b + 6c + d = 6.8
  • 18.
    Cont...  The correspondingmatrix equation is 2 .1 a 3 .5 b 4 .2 c 3 .1 d 4 .4 6 .8
  • 19.
    Cont ... 0 .2 a b t 1 t 2 .0 ( x x) x y c 6 .1 d 2 .3 So that the best fitting cubic is y = 0.2x3 - 2.0x2 + 6.1x - 2.3
  • 21.
     cubic fittingsare preferred over other methods because they provide the simplest representation that exhibits the desired appearance of smoothness  Cubic fittings provide a great deal of flexibility in creating a continuous smooth curve both between and at tenor points.
  • 22.
     If wehave damped curves or very humped curves then we can not obtain usefull results from Cubic Fitting Method..because they are used for smooth curves
  • 23.
    Applications in “The RealWorld”???  The cubic fitting method (CFM) is probably the most popular technique in statistics.  In mathematics it is used to solve different curved spaces.  It is used in the manufacturing of plumbing materials.  It is much important in mechanical and Electrical and Civil Engineering
  • 24.
    REFERENCES...  Wikipedia.com  AdvancedEngineering Mathematics  Nocedal J. & Wright, S. (1999). Numerical optimization. New youk  NUMARICAL ANALYSIS
  • 26.