PDA

View Full Version : calculating slope



blumfeld0
11-27-2007, 09:26 AM
I am trying to calculate the slope and y intercept. i know its just slope(known y's, known x's)
but i am trying to do something more sophisticated.
basically i have a large data set (actually several) and i dont want to calculate the slope/intercept for the entire range. of course i can do this by hand if i had a few data sets but not by hand for thousands of data sets, which is my situation.

please see attached file for details
thank you!

RonMcK
11-27-2007, 10:24 AM
On your worksheet, I used cell A15 to enter my 'new' value; I wrote the following formula in cell B15:

=IF(AND(A15>=810,A15<=890),10+0.1*(A15-810),"out of range")

Try this and see if it does what you want.

Ron
Orlando, FL

blumfeld0
11-27-2007, 10:54 AM
hi thank you that makes sense. and after it is organized like that i could easily calculate the slope and y intercept.
but i would still have to manually type in my "x" values
in this case 830, 840, 850, 860, 870?
that would tkae forever to do for thousands of data sets like this
i want to be able to type in just 830 and 870 and have something that looksup the corresponding y values and puts them somewhere, then i could calculate the slope easily.

thank you

RonMcK
11-27-2007, 11:19 AM
hi thank you that makes sense. and after it is organized like that i could easily calculate the slope and y intercept.
but i would still have to manually type in my "x" values
in this case 830, 840, 850, 860, 870?
that would tkae forever to do for thousands of data sets like this
i want to be able to type in just 830 and 870 and have something that looksup the corresponding y values and puts them somewhere, then i could calculate the slope easily.

thank you

blumfeld0,

I'm puzzled. Tell me more about these thousands of datasets.

Seems to me that either you have start and end values for x <b>and y</b> and you want a program to calculate incremental steps in x between the start and end, and to calculate the y for each new x.

Or, you have a table of pre-determined values of x with start and end values for y; here, the program would calculate the intermediate values of y between the start and end.

Or, (since you mentioned lookup) do you have one base dataset that has the full range that x can fall in (your 830 to 870) with the related values of y for each x in the base data set. You then want to run the x values from a another dataset against the base, looking up X in the base dataset and returning the related y value.

For all your datasets, is the relationship between x and y always the same?

So, are the X falues always in a column on the worksheet? Is Y always in the column to the right of x's column?

Or, am I missing the point entirely? ;-)

Ron
Orlando, FL