A lot depends of what you mean by "fair accuracy" and on what exactly you are going to do with your formula. If a 30% upside error in each $d_n$ is tolerable, you can do the following.
We look at the recursion $d_{n+1}=qd_n(1-d_n)$ with $0<q=2p<1$ starting with some $d_1in[0,1]$. It'll be convenient to do the first step separately, so we have $d_2=q d_1(1-d_1)$. The reason is that $q^{-1}d_2in[0,1/4]$. Now, denote $b_n=q^{-(n-1)}d_n$ and rewrite the recurrence as $b_{n+1}^{-1}=b_n^{-1}+q^{n-1}frac{b_n}{b_{n+1}}$. Note now that the ratio of each term to the next is between $1$ and $4/3$ and tends to $1$, so, replacing it by $1$, we get $b_n^{-1}approx b_2^{-1}+frac{q-q^{n-1}}{1-q}$ with accuracy 30% and being sure that it is an underestimate. Putting all this stuff together, we get
$$
d_napprox q^{n-1}left[frac 1{d_1(1-d_1)}+frac{q-q^{n-1}}{1-q}right]^{-1}
$$
for $nge 2$.
Note also that 30% is a very rough estimate for the accuracy. In practice, I've never seen it being worse that 6% (though I haven't done too many simulations).
P.S. The estimate
$$
d_napprox q^{n-1}left[frac 1{d_1(1-d_1)}+frac{q-q^{n-1}}{1-q}
+logleft(1+d_1(1-d_1)frac{q^2-q^{2(n-1)}}{1-q^2}right)right]^{-1}
$$
is even better (3% accuracy for small $n$ and about 0.5% accuracy for large $n$) but noticeably uglier. As several people have already mentioned, there is no exact formula, so the higher precision you want, the longer and uglier the approximation gets.
P.P.S. The main idea behind the second approximation is that if $B_n=b_{n}^{-1}$, then we make an error $q^{n-1}frac{B_{n+1}-B_n}{B_n}approx frac{q^{2(n-1)}}{B_n}$ during each step that led us to the first approximation. To compensate, we would like to take the partial sums of that series. We also know that $B_napprox frac 1{d(1-d)}+q+q^2+dots+q^{n-2}$. Unfortunately, we cannot sum the resulting series nicely. But if we double all the exponents in the approximate formula for $B_n$ (which will lead only to a small error when $qapprox 1$), then we'll get the Riemann sum type expression, which we can replace by the corresponding integral. Clearly, it may overshoot on the long run but to my own surprise, it not only corrects the first few terms nicely, but also corrects the asymptotics giving an error below 0.5% for large $n$ in the entire range of parameters (well, at least that is so for all values I looked at and I tried quite a few). Why it works this way remains a mystery, but it does. It can be shown rigorously that the total relative overshot coming from all steps after $n$ is at most $n^{-1}$ and I've never seen the overshots of more than 0.1% up to $n=300$.
No comments:
Post a Comment