# Uncertanty in a non-linear regression with least squares method

1. Mar 17, 2014

### VictorH

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.

2. Mar 17, 2014

### maajdl

3. Mar 17, 2014

### BvU

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?

4. Mar 18, 2014

### VictorH

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 $\chi^2$ 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?