Function needed to fit data I ran some computations and there seems to be some neat relationship between my variable $t$ and the corresponding result. What function should I try first to fit my data?
It is given that:


*

*$t$ is a non-negative integer (0, 1, 2, ..)

*$0 \le f(t) \le 1$, for any $t$

*$f(0) = 1$


It would be nice if the function would have two parameters:


*

*First one - let's call it $a$ - should control how steeply the function falls in the beginning. In extreme cases the function may stay flat at value 1, or it could fall to 0 immediately (at $t=1$).

*Another parameter $b$ should control what value function approaches asymptotically as $t$ grows to infinity.

Update
Based on Mr. Leibovici's advise and my own toying around, I excluded the exponent. It just doesn't fit the data.
For now I came up with the following function.
$f(t)=(1-b)(a_1 t+1)^{-a_2}+b$
It fits the data very well, but it's quite ugly. And it has three parameters instead of two ($a_1$ and $a_2$ together do, what my original $a$ parameter was supposed to do). Are there any mathematical trickery which could improve on these shortcomings?
For now I'll try to gather some more data. Maybe fitting the parameters will suggest some relationship.
 A: You could try something like 
$$f(t) = b+Ae^{-at}$$ where from your graph it looks like $b\simeq0.35$. $A$ could be found from the condition that $f(0)=1$, so here $A=1-b$.
One way to check, once you have found $b$ would be to plot $\ln (f-b)$ against $t$ which should be a straight line...
A: What danimal answered is almost what I was typing when the phone rang !
You want to fit $$f(t)=b+A e^{-at}$$ and, since $f(0)=1$, the model becomes $$f(t)=b+(1-b)e^{-at}$$ and you have an idea of the value of $b$ (given by the asymptote). So, in a preliminary step, define $$g(t)=-\log\Big(\frac{f(t)-b}{1-b}\Big)=a t$$ So, using all data points $$a=\frac{\sum_{i=1}^n t_i g_i}{\sum_{i=1}^n t_i^2}$$ But, these values are only estimates (you measure $f$ but not any of its possible transforms) butt you now have in hands everything required for a rigorous nonlinear fit minimizing $$SSQ(a,b)=\sum_{i=1}^n \Big(f_i-\big(b+(1-b)e^{-at_i}\big)\Big)^2$$ and, because of good and consistent estimates, it will converge in very few iterations.
Edit
You could even skip the first part and go directly to the nonlinear regression using the slope at the origin since $f'(0)=-a(1-b)$, so $a$.
