Results 1 to 6 of 6

Math Help - Linear Regression?

  1. #1
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,855
    Thanks
    321
    Awards
    1

    Linear Regression?

    So I'm working on this Physics problem, which (alas!) turns into an unsolvable Math problem. I have the equation (as a function of t):
    e^{at} = a^{\prime} t + b^{\prime};~~0 \leq t \leq T
    where a is presumed known.

    The question boils down to how to find reasonable values for a' and b' that best model the above equation. (I can't simply do a Taylor Expansion on the left hand side because T could be large.) Now, being the Physicist I am I would know how find an estimate if the equation were
    e^{at} = b^{\prime};~~0 \leq t \leq T
    The "best fit" in this case would be to find the average of the exponential function as t goes from 0 to T.

    Is there a way to think of this equation as a "best fit" problem by using the exponential function as if it were "data?"

    -Dan
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by topsquark View Post
    So I'm working on this Physics problem, which (alas!) turns into an unsolvable Math problem. I have the equation (as a function of t):
    e^{at} = a^{\prime} t + b^{\prime};~~0 \leq t \leq T
    where a is presumed known.

    The question boils down to how to find reasonable values for a' and b' that best model the above equation. (I can't simply do a Taylor Expansion on the left hand side because T could be large.) Now, being the Physicist I am I would know how find an estimate if the equation were
    e^{at} = b^{\prime};~~0 \leq t \leq T
    The "best fit" in this case would be to find the average of the exponential function as t goes from 0 to T.

    Is there a way to think of this equation as a "best fit" problem by using the exponential function as if it were "data?"

    -Dan
    There are at least two answers to this (assuming a is a known numeric value)

    1. Set up a model in Excel and use the solver to minimise:

    \int_{t=0}^T [e^{at}-(a't+b')]^2 dt

    of course this will be discretised so you will have to find (a', b') that minimises:

    \sum_{t_i} [e^{at_i}-(a't_i+b')]^2

    2. Expand e^{at} in orthogonal polynomials on (0,T) stopping at the linear term.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by CaptainBlack View Post
    There are at least two answers to this (assuming a is a known numeric value)

    1. Set up a model in Excel and use the solver to minimise:

    \int_{t=0}^T [e^{at}-(a't+b')]^2 dt

    of course this will be discretised so you will have to find (a', b') that minimises:

    \sum_{t_i} [e^{at_i}-(a't_i+b')]^2

    2. Expand e^{at} in orthogonal polynomials on (0,T) stopping at the linear term.

    CB
    I have run method 2 through Maxima and the results are shown in the attachment (I ought to condense this down to a function definition since this is at least the second time I have done this).

    (this is just using Gram-Schmidt to find the first few orthogonormal basis polynomials then using the first couple of terms of the generalised Fourier series corresponding to the orthonormal basis - note I am using the inner product of real functions not that for complex)

    CB
    Last edited by CaptainBlack; June 27th 2009 at 01:57 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by CaptainBlack View Post
    I have run method 2 through Maxima and the results are shown in the attachment (I ought to condense this down to a function definition since this is at least the second time I have done this).

    (this is just using Gram-Schmidt to find the first few orthogonormal basis polynomials then using the first couple of terms of the generalised Fourier series corresponding to the orthonormal basis - note I am using the inner product of real functions not that for complex)

    CB
    IIRC there is also a trick that will allow the minimisation of the square relative error by defining the weight to be one over the square of the function you are trying to fit.

    CB
    Last edited by CaptainBlack; June 27th 2009 at 08:30 AM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Senior Member Sampras's Avatar
    Joined
    May 2009
    Posts
    301
    Wouldn't it depend whether  a <0 or  a \geq 0 ?
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Forum Admin topsquark's Avatar
    Joined
    Jan 2006
    From
    Wellsville, NY
    Posts
    9,855
    Thanks
    321
    Awards
    1
    Quote Originally Posted by Sampras View Post
    Wouldn't it depend whether  a <0 or  a \geq 0 ?
    This is from a rocket motion equation. a will be positive for any case I'm considering.

    -Dan
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. perpendicular linear span (linear regression)
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: October 22nd 2011, 03:56 PM
  2. Linear Regression
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: August 25th 2010, 06:49 AM
  3. Regression fundamentals (linear, non linear, simple, multiple)
    Posted in the Advanced Statistics Forum
    Replies: 13
    Last Post: November 12th 2009, 06:47 AM
  4. Regression SS in multiple linear regression
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: June 20th 2009, 12:23 PM
  5. linear regression
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: May 16th 2008, 04:36 AM

Search Tags


/mathhelpforum @mathhelpforum