# Any mathematicians here? Looking for interpolation help



## MoneyGal (Apr 24, 2009)

If there are actual mathematicians in the house, and you have a few moments to spare, I"d appreciate your input on an interpolation problem I'm grappling with. My skillz are not up to par for what I need here.


----------



## marina628 (Dec 14, 2010)

Don't feel bad moneygal I have no clue what interpolation is


----------



## Potato (Apr 3, 2009)

How "acutal" a mathematician do you need? I'm a scientist, and interpolation doesn't sound that bad...


----------



## carverman (Nov 8, 2010)

marina628 said:


> Don't feel bad moneygal I have no clue what interpolation is


Tsk! Tsk! Marina...everybody knows what interpolation means..

_In the mathematical field of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points._

I took that in electrical engineering class for some computer assignments, using Fortran77 (scientific
computer program), to extract data on electronic circuit analysis..many years ago..but in essence, never used it after that. 

but here is a handy"plug in" formula..
http://www.shodor.org/os411/courses/_master/tools/calculators/interpolation/index.html

now we just need some data based on real life situations....

Note: I am not a mathematician..but would like to play on tv someday.


----------



## MoneyGal (Apr 24, 2009)

Well, I'm not a mathematician either, but unfortunately sometimes I am compelled to pretend I have math skillz. 

Carverman, I am working with multiple dimensions. I think I found some free downloadable excel add-ins that will allow me to check the method I used (nearest-neighbour interpolation) against some other methods to see if I can gain in accuracy by using a more complex method. 

Thanks all!


----------



## m3s (Apr 3, 2010)

Interpolation was taught in high school

You know your portfolio was worth $3 Monday, $5 Weds and $7 Friday. You could interpolate that it was worth $4 Tues and $6 Thurs

You do an average on the x and y axis of a graph to interpolate how many points you need


----------



## hboy43 (May 10, 2009)

Hi:

You need to do a least squares curve fit no? I only recall doing this with an assumed equation of y=mx+b, but I don't imagine it is conceptually any more difficult for other equation forms. Probably horrendous computationally, so would want the assistance of a computer or calculator no doubt.

Hunt down a math book and see what it says?

hboy43


----------



## andrewf (Mar 1, 2010)

It says mathematics on my degree. Sounds like you sorted out your question, but I can take a look if you want.


----------



## andrewf (Mar 1, 2010)

Linear regression in higher dimensions is actually very elegant mathematically. It gave me chills when I first saw how to derive the coefficients.


----------



## carverman (Nov 8, 2010)

andrewf said:


> Linear regression in higher dimensions is actually very elegant mathematically. It gave me chills when I first saw how to derive the coefficients.


It's so simple even a caveman..er carverman can do it...
http://easycalculation.com/statistics/learn-regression.php

http://en.wikipedia.org/wiki/Greek_letters_used_in_mathematics,_science,_and_engineering

Here's the formula....sigma delta phi....now there was a female fraternity
house I would have loved to sink my teeth into..

So Andrew..in the future, should I address you as Dr. Andrew?
(as in the Dr. Sheldon Cooper character on the Big Bang Theory?
He's always working on some new formula or other..and he invented
3 way chess too! 

Now my next question..is there a doctor in the house?


----------



## carverman (Nov 8, 2010)

MoneyGal said:


> Well, I'm not a mathematician either, but unfortunately sometimes I am compelled to pretend I have math skillz.


Ah, I see ,so M.G. you are the "great pretender"?



> Carverman, I am working with multiple dimensions. I think I found some free downloadable excel add-ins that *will allow me to check the method I used (nearest-neighbour interpolation) against some other methods *to see if I can gain in accuracy by using a more complex method.
> 
> Thanks all!


Sounds good to me. I like a lady with looks, brains..and money too, of course!...


----------



## andrewf (Mar 1, 2010)

carverman said:


> It's so simple even a caveman..er carverman can do it...
> http://easycalculation.com/statistics/learn-regression.php
> 
> http://en.wikipedia.org/wiki/Greek_letters_used_in_mathematics,_science,_and_engineering
> ...


Nope. I'm not a doctor. I wouldn't even say I'm a mathematician per se, even though I studied the subject. The closest analogue might be from that show Numbers. I know enough about math to burst out laughing at most of those episodes. I guess I know how doctors/lawyers/forensic investigators must feel.

I'm referring to the estimation of the regression coefficients (beta) being inv(X'X)X'y. For some reason I find that elegant.


----------



## andrewf (Mar 1, 2010)

I just read up on nearest neighbour interpolation--interesting, though I'm not convinced of its utility. All kinds of interesting properties, though.


----------



## houska (Feb 6, 2010)

I used to be a mathematician, though a theoretical rather than applied one. It's been a while.

Be aware that there are 2 rather different types of problems that are sometimes referred to as "interpolation" - just be sure you know which one you're after...

*Problem 1.* You have a lattice of data points x_1, ... x_n (in any number of dimensions). For each of these you know the value of a function f(x_i). Now you have a new point z, not one of the x_i, and you need to come up with a reasonable value for f(z). The heuristic is somehow find the closest x_i to z and approximate f(z) with f(x_i). The simplest way to do this is with a Voronoi tesselation / nearest-neighbour interpolation, and it sounds this is what you're doing. But be aware that f(z) will not be a continuous function. As z moves around, different x_i become closer and f(z) will jump between these discrete values. However, if you can live with this, you can do this approach without having to make any assumption as to how the value of f *should* depend on the x_i. It is whatever it is.

*Problem 2.* x_i and f(x_i) as above. However, you don't want the f(z) to jump around, you want some sort of smooth interpolation so that if z is "halfway" between x_1 and x_2, then f(z) is roughly "halfway" between f(x_1) and f(x_2). Then typically you need to make some assumptions on the formula that defines the function f. Is it linear? exponential? etc. You can then use a variety of algorithms to find the best-fitting series of parameters for a formula for f that fits the pattern you chose and the points you know. Then you plug in z to the formula to get f(z). (Multi)linear regression is one example of this approach; another is the "cubic spline" functionality that drawing programs use to draw smooth curves between points on a line. This type of interpolation is what most people replying to this thread are referring to.

Since lots of people do fancy math, I'm sure there are ways to get a hybrid of the 2, but I don't think that's as standard. Hope it's one of these 2!


----------



## MoneyGal (Apr 24, 2009)

It's problem one. I don't need smoothing. I think I have what I need to get where I need to go...interesting discussion.


----------

