• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Math question

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
I think you can get a demo copy of Graphical Analysis from Vernier.
It's pretty intuitive to use. Once your data is in, it's just a simple click or two to fit your data to a curve. It has a lot of curves more advanced than simple polynomials as well. So, within a few minutes, you could try a variety of different types of equations and see which one seems most satisfying.

I have my physics students use this software for graphing lab data - I chose this because it doesn't waste a lot of time. I also, just for the sake of giving a small handful the experience of using Excel, have them graph their data in Excel & find best fit curves. It takes about 10 times as long for students to master this simple task on Excel - most rely on a handout of instructions. Graphical Analysis: "Okay, here's how you use it." 2 minutes later, they can use it.
 
Thanks drinkmorejava and Dr. Pizza, I am very curious what excel and the graphical analysis program can do and will check them out. This has been a very interesting learning experience so far, and here's what I've come up with to this point.

I created an equation based on the datapoints and analysis I listed in a previous post:

1.1045
1.1100, difference +.0055,
1.1146, difference .0046, change in diff: -.0009 (avg. change in diff was: -.0007)

The goal was simply to take the starting point (1.1045), have the next datapoint increase .0055, and then have subsequent datapoints increase by .0007 less than .0055, and so on.

After writing out the exact datapoints that would result, I realized I needed to incorporate a function that adds all integers '<X' (ie, if X=5, add 4+3+2+1), and this will properly add how many '-.0007's' to subract for each time period (X) that I'm trying to forecast. The formula for this (thanks to yahoo answers, lol) is .5(X*(X+1)). That's how I came up with the following:

1.1045 + .0055 - .5X&#178;+.5X*-.0007.

but that essentially decreases the second datapoint by .0007, one step too early, so it's actually

.5(x-1)(x), or .5x&#178;-.5x

and the full equation is:

a+b-(.5x&#178;-.5x)*c
a+b-.5x&#178;c+.5xc

(if simplified properly that is...I tried for posterity here but its not as simplified in my program 😛)

a= origination 1.1045
b= increase, .0055
c= change in increase, -.0007

The equation works fairly well and yields the following blue curve, intended to be a forecast of the green curve.

X=11 periods, and I've smoothed C by making it a weighted moving avg of the last 30 periods.)

sample_intersect2.png


It becomes much less useful the larger X is.
 
Last edited:
drinkmorejava...your link doesn't work and you caught me between updates...did you answer my question already??



UPDATE 7/21:

For now I'm going with the following equation for each line (explained how I got to it later in the thread.)

curve 1: a+b-.5cx&#178;+.5cx
curve 2: d+e-.5fx&#178;+.5fx (same as curve 1 but different variable letters except X.)

Here's a graph of curve 1 (green...thick line is original, thin is forecasted curve), and curve 2 (Red...thick is original, thin is 'forecasted' curve.

sample_intersect3.png


And now I'm hoping someone can help me solve for X. In the pic, X=11, but I want to solve for X to determine when in the future these 'forecasted' curves will meet. They clearly aren't perfect because visually they appear to meet approx. 6 periods before the original curves meet, instead of 11.

So the equation to solve for x would be:

a+b-.5cx&#178;+.5cx = d+e-.5fx&#178;+.5fx

Mathway.com's answer is:

sample_intersect_mathway1.gif


Is this is correct? I tried plugging it in but didn't get a good result. I'd also love to know the steps that someone goes thru to solve for X here, which at this point is a bit beyond me. (Btw, since X is always time looking into the future, it will always be >0)
 
Ehh, link works fine in FF and Opera. The JPG is caps because that's what the snipping tool does by default

http://www.drinkmorejava.com/solution.JPG

steps to solve are get everything on one side by adding or subtract the like terms to get something in the form of ax^2+bx+c=0. Then you use the quadratic formula.

I got the pic now, for some reason was getting 404's.

Thanks for taking the time to do that. A bit more elegant answer than mine, muchless a bit more accurate perhaps? 😛 I haven't had a chance to check out excel yet but it's impressive already.

>As shown by the r^2 values, the curves exactly model second order polynomials.

I'm lost on "r^2" values...are they a byproduct of finding the result, or part of the result...how do they relate? (If there isn't a short answer, I don't want to waste your time trying to get a long answer...I've obviously got a lot to cover.)
 
r means the residual. That is just the difference between the model value at a given x location and the actual data point at that location. r^2 is a way a quantitatively showing how well a model fits the data set. It has a number of issues, and a model should never be chosen just because the r^2~1, however it's generally a good, easy indicator.

http://en.wikipedia.org/wiki/Squared_deviations
 
I think where you're going is pretty hopeless. You can't get close to where the two lines intersect unless you know points after they intersect. If you know these points, then you can find an approximate answer using interpolation. Otherwise, there are a billion different ways the lines can path. You can't say anything about them without more information.
 
r means the residual. That is just the difference between the model value at a given x location and the actual data point at that location. r^2 is a way a quantitatively showing how well a model fits the data set. It has a number of issues, and a model should never be chosen just because the r^2~1, however it's generally a good, easy indicator.

http://en.wikipedia.org/wiki/Squared_deviations

Thanks.

I think where you're going is pretty hopeless. You can't get close to where the two lines intersect unless you know points after they intersect. If you know these points, then you can find an approximate answer using interpolation. Otherwise, there are a billion different ways the lines can path. You can't say anything about them without more information.

'Close' is a relative term...I think I can get 'close enough', within a limited time frame, to add usefulness much of the time.
 
Back
Top