1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Uncertanty in a non-linear regression with least squares method

  1. Mar 17, 2014 #1
    1. The problem statement, all variables and given/known data

    Ok, so i'm trying to fit a set of data (21000 points to be exact) to a sine function.

    2. Relevant equations

    Y = A*sin(ωt)

    3. The attempt at a solution

    I used NumPy to get the parameters A and ω with the least squares method. So far, so good. However, i appear to have reached an impass, this values don't have an uncertanty that accompanies them.

    My question is: how do i propagate the error in the amplitude and the frecuency? In a quick web search I have not found any helpful inside in anything different of uncertanty of slopes in linear regressions. Can you recommend literature or websites that cover this topic? Bear in mind a freshman undergrad level of computer expertise and experimentation skill.

    Thanks in advance
  2. jcsd
  3. Mar 17, 2014 #2


    User Avatar
    Gold Member

  4. Mar 17, 2014 #3


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Don't give a list of 21000 points, but:
    Tell us a bit more about what was measured, and how.
    Approximate frequency, sampling frequency,
    Then write out what you did with numpy.
    Did you get a ##\chi^2## out?
  5. Mar 18, 2014 #4
    Alright. So, i measured the movement of a vibrating table with a LVDT sensor, the approximate frecuency is around 30 Hz and a sampling frecuency of 1000 samples per second. Hopefully i can show it behaves like a harmonic oscillator. I looked at tha data, the graph is pretty nice and definitive to a sine function, so [itex]\chi^2[/itex] is a given, plus Python says so. I did least squares with Numpy (don't have the exact code at hand) and got some values for amplitude and frecuency.
    Now, this numbers come very close of what i can see and measured in the lab. But, as in any experiment, this numbers mean nothing without uncertanties. My question is: how do i do error propagation in a non-linear regression using least squares?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted