What is the underlying function?

1.6k Views Asked by At

I have some value pairs. They are inversely proportional. I want to have a formula to get the second value from the first value.

Speed Delay
10    0.142
15    0.087
20    0.064
25    0.049
30    0.036
37    0.03
45    0.017
68    0.016

I guess there have to be an offset and a factor. Is it necessary to have min and max values?

2

There are 2 best solutions below

5
On

To say that speed and delay are inversely proportional is to say that there's a constant $c$ such that speed is $c$ divided by delay. If that were the case, then you'd have speed times delay always equal to this constant, $c$. But you don't have that, e.g., $20\times.064=1.28$ while $30\times.036=1.08$. So I would say they aren't inversely proportional.

But from your mention of an "offset", I take it you are using some different meaning for the phrase, "inversely proportional." Perhaps you mean, $${\rm speed\ }={{\rm factor}\over{\rm delay\ }-{\rm\ offset}}$$ Let me write that as $$s={f\over d-p}$$ where I'm using $p$ for offset because using $o$ for a variable is too creepy. Do some algebra to get $$s(d-p)=f,\qquad sd-sp=f,\qquad sp+f=sd$$ Now if you put in your four known pairs of $s$ and $d$ values, you get four equations for the two unknowns $p$ and $f$. If you're lucky, these four equations will have a single solution, and you win. If they don't, then there are ways of finding values of $p$ and $f$ that won't work exactly but won't be off by very much. But I don't propose to go into that until/unless you agree that $s=f/(d-p)$ is what you want, and you find the four equations have no solution, and you express some interest in knowing about approximate solutions.

0
On

Based on plugging the data points into Logger Pro, a graphing software, I used a curve fit for an natural exponent function and got:

$$y = A\cdot exp(-Cx) + B \rightarrow y = .3195\cdot exp(-.09558x) + .01664 $$where $x$ is the speed and $y$ is the delay and $exp$ is shorthand for $e^\text{something}$.

However, as you can see below, obviously not all of your data points fit the given curve. Perhaps your calculation for a formula in the comment above may suit you better depending on your needs. Note that I did play around with other functions within the pre-loaded ones (there's a lot!) in Logger Pro in hopes of finding a better curve fit, to no avail.

enter image description here