Suppose I've a random variable $X$ and a sample of it with size $N$. I count how many element of the sample fall in a specific range $a<x<b$ and I found $n$ entries, so if I use Poisson statistics I can say that the error on $n$ is $\sqrt{n}$.
Now suppose I've a function $f$, quite close to the unit function, and I define a new random variable $X'=f(X)$. Now the number of entries in $a<x<b$ is $n'=n+\delta n$.
I don't have an analitical from of $f$. I only now $n$ and $n'$.
What is the error on $n'-n$? How to take into account the correlation between them?
More difficult: suppose $f$ depends on a parameter $\lambda$ with error $\delta\lambda$.