Results 1 to 4 of 4

Math Help - How to solve this best least squares fit problem

  1. #1
    Newbie
    Joined
    Dec 2009
    Posts
    3

    How to solve this best least squares fit problem

    Hello,

    I find myself needing to solve a number of best least squares fit problems, and honestly I don't remember the specifics of how it's done. Therefore I'm trying to nail the solution to a single problem before moving on with the rest - and I'd really like some help with that. Here's the description:

    It is assumed that there is a coherence between the variables x and y of the form y=c0+c1*x. Given the following data (table)
    x -1 1 2 4
    y 0 1 3 4
    we wish to find the best possible values for the coefficients
    c0 and c1.

    Task 1: Construct an overdetermined system of equations of the form A*c=y determining the vector c=(c0,c1)^T ( ^T meaning transposed).

    I immediately imagine the answer to this is simply the following table:
    -1   0
    1 1
    (   2   3   ) * (   x   y   )^T = (   c0   c1   )^T -- the first part here is a 4x2 matrix, but my formatting is awful - sorry!
    4 4
    But that doesn't seem to match the required form. What is the correct answer - and why?

    Furthermore, I'm most uncertain as to how the following tasks are solved...

    Task 2: Calculate the normal equations A^T*A*c=A^T*y.

    Task 3: Find c0 and c1.

    Could someone explain how it's done? I could really use some help as I pretty much don't have a clue here.

    Lots of thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Dec 2009
    Posts
    3
    No help to find?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Apr 2009
    Posts
    43
    ok umm that looks really confusing but I'll take a shot since I'm doing least squares.

    you have to find the form ax=b right.

    the A form would be like

    1 -1
    1 1
    1 2
    1 4

    x would be c0 and c1

    b would be

    0
    1
    3
    4

    so part 1 done. Then it wants you to find Atransposed times A, which I assume you know how to do. Then it wants you to calculate y (the least squares solution) for c0 and c1, which you just need to find the inverse of AtA times Aty
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Dec 2009
    Posts
    3
    I actually think I figured it out now... Somewhat:
    Calculus.pdf
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Word Problem/About squares
    Posted in the Algebra Forum
    Replies: 4
    Last Post: June 28th 2010, 09:19 AM
  2. Another squares problem
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: February 15th 2010, 01:30 AM
  3. sum of squares and congruence problem
    Posted in the Number Theory Forum
    Replies: 3
    Last Post: March 12th 2009, 02:15 PM
  4. Problem of Squares
    Posted in the Geometry Forum
    Replies: 0
    Last Post: February 18th 2009, 08:56 AM
  5. Least squares problem
    Posted in the Calculus Forum
    Replies: 0
    Last Post: June 5th 2008, 02:39 PM

Search Tags


/mathhelpforum @mathhelpforum