1

I have the following data set:

Hz        duration of ease-in
324       1.139
390       1.134
403       1.167
410       1.1
423.4     1.1
693.5     0.766
1040      0.567
1134      0.567
1480      0.434

I know how to find linear regression: Intercept (a): 1.3739956457219 Slope (b): -0.0006973690931099.

So, Y = a + bX

But as I've gathered more data points it appears to be on a curve. Is there a simple formula to solve for a correlation on a polynomial curve?

dongle
  • 143
  • you can try to use a polynomial model i.e. add a $x^2$ term. If this is a real world problem you have to be careful of over-fitting so you can look into regularisation techniques. – Chinny84 Jun 04 '16 at 23:02

1 Answers1

1

Put $\text{Hz}$ in one column, $\text{Hz}^2$ in the next, then regress $y$ on $\text{Hz}$ and $\text{Hz}^2$. Just linear regression on two predictors rather than one. If you know how to do multiple linear regression, that's it.

If you put a column of $1$s as the first column of the design matrix $D$, and $\text{Hz}$ as the next column, and $\text{Hz}^2$ as the next, getting an $n\times 3$ matrix with three linearly independent columns, then the least-squares estimators of the three coefficients in the model are the elements of the $3\times 1$ column vector $(D^T D)^{-1}D^T Y$, where $Y$ is the $n\times 1$ column that you labeled "duration of ease-in". So if you know matrix algebra, then that's it.

In this case, it appears that the second- and higher-degree terms do not differ from $0$ in a statistically significant way.

  • I don't know matrix algebra... could you explain perhaps a bit more in laymans terms? Sorry :( D is 1 in the above? What is T? – dongle Jun 05 '16 at 13:54
  • I've created the following spreadsheet to compare different methods... https://docs.google.com/spreadsheets/d/15lWCe6lrT_mCEgIawcjiQtAT5V4yPdn8JR4aTDTbesk/edit?usp=sharing – dongle Jun 05 '16 at 14:14
  • @dongle : $D^T$ is the transpose of the matrix $D$. $\qquad$ – Michael Hardy Jun 05 '16 at 15:57
  • I'm not sure what you mean by "hyperbolic regression" in the page you linked to. You use the term "linear regression" in contrast to "hyperbolic regression". But your question refers to "polynomial regression". Note that polynomial regression is a form of linear regression: http://math.stackexchange.com/questions/75959/why-is-polynomial-regression-considered-a-kind-of-linear-regression/75966#75966 $\qquad$ – Michael Hardy Jun 05 '16 at 16:09
  • This is from a different question about the same problem: http://math.stackexchange.com/a/1814119/344466 – dongle Jun 05 '16 at 16:27