View Full Version : Math time
Mr Buckshot
August 2nd, 2008, 09:20 PM
Anyone know where I can find an applet or program that will let me enter in a bunch of data points and then acquire a parabolic equation from those points? I know how to do linear regression, but in this case, I want a defined curve function that will pass through all (or almost all) of my data points, not a straight best-fit line.
Help is greatly appreciated. I’ve been experimenting with google keywords and all I get are tutorials for linear regression, and I already know how to do that. If it is any help, the type of equation I am trying to acquire will form an upside-down parabola when graphed.
Limited
August 2nd, 2008, 09:26 PM
Maple.
Its a piece of software that is very good for calculations, extremely powerful. I think theres a demo out, I got the full version if you want anything done, although I'm not 100% sure it does the parabolic equation your talking about, but it does a bunch of stuff.
Phopojijo
August 2nd, 2008, 09:30 PM
How much is "A bunch"
I can tell you even how to do it by hand (matrix least-squares fit )... but the more datapoints you have, the more insane you'll go. (6 or 7 datapoints probably would be a 15 minute job)
If all the points can fit in a line or parabola -- it'll give you the parabola that applies (with 0x^2 + ... for lines)... if they don't fit a line or parabola... it'll give you the one that minimizes the error of each point squared.
If it's a BIG set of Data... you can do it in Excel... but I'm not sure if it'll give you the actual equation. Matlab, Maple, or Origin would be ideal.
Mr Buckshot
August 2nd, 2008, 09:32 PM
I have 2 graphs, each with 45 data points. I’m doing this for my IB extended essay. So figuring out the equation by hand is a no-no.
Plus, the matrix least-squares fit is for a straight best-fit-line, NOT a curve equation like I’m asking for. I know about that because I studied the least-squares fit for AP statistics.
n00b1n8R
August 2nd, 2008, 09:34 PM
Autograph.
Mr Buckshot
August 2nd, 2008, 09:47 PM
Maple helped, thanks guys.
Case closed. I'm saved.
Phopojijo
August 2nd, 2008, 10:15 PM
I have 2 graphs, each with 45 data points. I’m doing this for my IB extended essay. So figuring out the equation by hand is a no-no.
Plus, the matrix least-squares fit is for a straight best-fit-line, NOT a curve equation like I’m asking for. I know about that because I studied the least-squares fit for AP statistics.No it can be for any polynomial... or if you manipulate your data... some non-linear graphs.
It generalizes... believe me. I did that course last year. ... They won't teach it to you until 2nd year Abstract Algebra... but it does generalize.
Basically you know how you create the "A" matrix of all 1's in one column, then the x-values in the second column? Well if you put the x^2 values in the third column and do the same equation... something like (A'A)^(-1)A'y... ... you'll get the quadratic least squares... at a fourth column with x^3... you'll get the cubic... etc.
Problem is, that'll take an hour because you'd need to invert a 3x3 or 4x4 matrix... by hand.
CN3089
August 2nd, 2008, 10:48 PM
I want a defined curve function that will pass through all (or almost all) of my data points, not a straight best-fit line.The Lagrange polynomial (http://en.wikipedia.org/wiki/Lagrange_polynomial)? http://i29.photobucket.com/albums/c251/CN3089/Emoticons/confused.gif
e: whoops you got it never mind then
Phopojijo
August 2nd, 2008, 11:19 PM
The Lagrange polynomial (http://en.wikipedia.org/wiki/Lagrange_polynomial)? http://i29.photobucket.com/albums/c251/CN3089/Emoticons/confused.gif
e: whoops you got it never mind thenThe lagrange polynomial is the least-squares fit where there's less data in your points than required to make a polynomial of said dimension.
Least squares fit --> When given too much information... condense it and average out the error.
Lagrange Polynomial --> When given too little or just enough information... find the exact fit.
The method of solving is SLIGHTLY similar... but not quite.
Limited
August 2nd, 2008, 11:19 PM
Maple can invert matrixes easily. Give me a shout if you wana know how to enter them.
Phopojijo
August 2nd, 2008, 11:20 PM
Oh yea that's simple... just right click on the matrix, select like -- matrix operators or something... then click invert.
Unless you're running 9.0 or lower. At that point you'd need to use the invert() function I believe... maybe set it to the power of -1? It's been 4 months :p
Limited
August 2nd, 2008, 11:22 PM
Yeah I got 9 :(
A = MatrixInverse(Matrix([[2, -1, 3], [0, -1, 1], [2, 0, 1]]));
Gamerkd16
August 3rd, 2008, 02:15 PM
A TI-83/84 Calculator has those abilities.
It's not a program. But you might have one lying around.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.