I have an estimator $\tilde{f}(x)$ whose error is at most $\epsilon$, i.e., $\frac{|f(x)-\tilde{f}(x)|}{|f(x)|} \leq \epsilon$.
I want to estimate $\sum_{i=1:n}i.f(i)$ with a small error. But if I sum up the $\tilde{f}$ the error would be really high $n\epsilon$ which is not acceptable. Is there any solution for that?
Is this information enough or I should provide more information?
(*) Edit: What if the error is not fixed, i.e., $\Pr[\frac{|f(x)-\tilde{f}(x)|}{f(x)}>\epsilon] \leq \alpha$, what is the resulting probability of error? Is it $Pr[\frac{|\sum{xf(x)}-\sum{x\tilde{f}(x)}|}{\sum{xf(x)}}>\epsilon] \leq n\alpha$?
No. Actually, using the fact that every $x$ is nonnegative, one gets: $$(1-\varepsilon)f(\ )\leqslant\bar f(\ )\leqslant(1+\varepsilon)f(\ )\implies\frac1{1+\varepsilon}\sum_xx\bar f(x)\leqslant\sum_xxf(x)\leqslant\frac1{1-\varepsilon}\sum_xx\bar f(x)$$