Math help: create a formula from input data

I’ve been trying to search google for help on this, but I feel I’m not using the correct search terminology.

My coworkers often come up with absurd topics, then graph it and come up with a formula. The topic today was scoring situational hotness vs. actual hotness, cause like, a girl at a bookstore is ‘hotter’ than outside. Or conversely, an unattractive girl is more attractive in an all guys school. So what I’d like is a formula that converts ‘hotness’ to the result of the situational hotness based off of the input data:
H S H
0 H+.25
1 H+.25
2 H+0.5
3 H+0.5
4 H+0.5
5 H+1
6 H+1
7 H+1
8 H+2
9 H+1
10 H+0

I remember in my physics lab in college there’s a way to come up with an approximate formula using logs (maybe?) So what I’m looking for is an approximate answer to the question, but if it is too complex because of the randomly assigned bias, then a website pointing to instructions on how to accomplish this for future endeavors. Oh uhhh, totally work related too, I swear.

Have you tried putting your values into Excel, with your independent variables being 0-10 and your dependents being 0.25 - 10? Plot that graph, then see if the linear, log, exponential or other approximations available match the data closely enough for your purposes. I don’t have Excel, and OpenOffice doesn’t seem to have that function, so I can’t try it for you.

I don’t get it?

I do have access to excel, and looked around for options like that, but couldn’t find anything…

There’s no universal way to do it. In sciences, you usually have some idea of what the function looks like, and you fiddle with the parameters to make it fit the data. For example, if you think it the data should be on a straight line, you use y=a x + b, and find the values of a and b that fit the data. Look up “least squares fitting” if you want the actual method.

If you have no idea what function to use, you have to pick one that has the right shape. You end up with an “empirical formula” - i.e. a formula that describes observations without explaining why it’s that way. If it’s a smooth curve, a polynomial is a common choice. (I.e. use “y = a + b x + c x[sup]2[/sup]…”, as many as you need/want.)

I found out how to do it in excel, it involved using scattergraphs in stead of line graphs, and messing around with some of the options to create the formula using ‘Add Trendline’. SCR provided a good starting point to learn how to do it on my own.

So what’s the independent variable if the dependent is hotness?

In general, we try to discourage cubic and higher-order least squares models because the coefficients become hard to interpret, and they don’t behave well between the points they were fitted to. Based on the data in the OP, I’d say a quadratic model would probably fit well without being too complicated.

Right, given any N data points, you can always find a polynomial of degree N-1 which will fit them exactly (and an infinite number of polynomials of higher order). But even though that polynomial will go exactly through all of the data points, it’ll go wild and crazy in between them, and even wilder and crazier outside of the fitted region. Plus, it’ll be just as easy to just give someone the list of original data points as to give them the function, so you’re not making things any simpler. You always want to fit things using a function with much fewer parameters than you have data points.

However, if you want a perfect fit, and to hell with the consequences, it’s hard to beat the Lagrange Interpolating Polynomial.

If all you care about is the fit, just draw the line segments between adjacent points. Doesn’t get much simpler than that.

steadierfooting wants a formula.