Equation/mathematical model to a fitted line

  • Thread starter Thread starter microbiek
  • Start date Start date
  • Tags Tags
    Line Model
AI Thread Summary
To create a mathematical model for fitting a line to data, non-linear regression is essential for accurately representing curves that may start linear and then change to exponential or other forms. The process involves selecting a guess function and using data points to minimize the sum of squared residuals. Recommended resources include precalculus or college algebra textbooks, as well as software like MATLAB or R for practical implementation. Understanding the underlying mathematics can be complex, so it's advisable to seek out materials specifically covering non-linear regression. Ultimately, having a solid grasp of the curve's general form is crucial for effective modeling.
microbiek
Messages
12
Reaction score
0
Hi I hope someone can either help me directly and give me an overview of what needs to be done and also direct me to a textbook or some source which will allow me to learn this in depth.

Basically If I have data and I graph it, I fit a line to it (it can be curved) how then do I determine an equation to represent that line and allow me to extrapolate.

For example if the line is sinusoidal or straight and then beginning to curve etc how can I make a mathematical model to represent these different types of curves.

Thanks very much,

R
 
Mathematics news on Phys.org
Sounds like precalculus, or maybe even algebra two. You can take points from the line and decipher its equation using various formulas.. Hmm try rea's problem solvers "algebra and trig" it's a pretty good book. Or any precalculus/college algebra book.. We used Larson but I never liked the textbook layout much.
 
Last edited:
But would that be able to make a model for data which starts of linear and then turns exponential? if so great!
 
I think you'd do a best fit line for the data.
 
If you have the data, and you know the general form of the curve you want to fit, then you can use non-linear regression to find the exact form of the function which best fits your data.

I just had a quick look at the wikipedia page and it's fairly awful, and my knowledge of stats books isn't great / I don't know what level you're used to reading. Do you have a particular computer software package that you have the data in? eg. if it's in MATLAB, their documentation gives a very concise explanation of it.

In short... non-linear regression is the word you want to be searching for.

You give a guess function f(x,[parameters]) and the data [(x1,y1), ... (xn,yn)] and it will find the parameters that minimises the sum of the residuals squared, [y1 - f(x1)]^2 + ... + [yn - f(xn)]^2. Sometimes it takes a while and if the function is tricky then it might not work.
 
Yeah, whichever line fits the data best with the smallest SSE.

Ahah yeah definitely not algebra 2. Finite mathematics, discrete math or a calc book might help you. I cannot!

The bottom example is two different lines but I get the joist of what you're saying. Maybe post the question in the statistic fourm?
 
Last edited:
I was going to use 'R' to put the data in (exporting from excel). Ok that's helpful so non linear regression! I was just worried that it wasn't going to be a simple curve and so I knew I'd need some other way to make a formula. I still havnt finished collecting my data so I have plently of time to read up on it. I kind of want to know how to do it by hand so il peruse amazon.

I did engineering in college and so I am no mathematician!

Cheers!
 
R should be fine. If you buy a book, check it's got a chapter on nonlinear regression, but what you mainly need to do is pick the right guess function. The maths of fitting it to the data is pretty hard work, and best left to a computer!
 
Back
Top