How can we assess Bias when estimating step functions? I am currently conducting a simulation study in which there is a known true function $F(t)$ which is strictly decreasing and continuous over time. I want to know if a particular estimator $\hat{F}(t)$ is unbiased over some time interval $0$ to $\tau$. The estimator $\hat{F}(t)$ produces step functions over the interval of interest.
My question is: How do I figure out if the estimator $\hat{F}(t)$ produces unbiased estimates of the true function $F(t)$ in the range of $0$ to $\tau$ using a simulation study?
My first Idea was to simply calculate the integral of the difference between the true function and the estimated function for a big number of simulation runs. That quantity would be $Bias = \int^{\tau}_{0} (F(t) - \hat{F}(t))$. In the case of a truly unbiased estimator, this quantity clearly converges to 0 over many simulation runs. The Mean-Squared-Error could be estinated in a similar fashion using $MSE = \int^{\tau}_{0} (F(t) - \hat{F}(t))^2$. I soon realized however that there are situations in which the first quantity converges to 0 even when the estimator is biased. The (very badly drawn) graph below shows what I am talking about.

Case A shows an unbiased estimate. The step function wiggles around the true curve. Case B shows a biased estimate. The step function is always below the true curve. Now the problem comes with Case C. Here the integral would be approximately 0, since the positive bias in the first half of the time interval cancels out the negative bias in the second half of the interval.
I would be very thankfull for any ideas.

To compare a biased with an unbiased estimate of $F(\cdot)$, consider the case of a complement cdf,$$F(t)=\mathbb P(X\ge t)$$
which is strictly decreasing in $t\in(0,\tau)$ when $X$ is a continuous random variable with support $(0,\tau)$. Then, given a sample $X_1,\ldots,X_n$ associated with the cdf $1-F(\cdot)$ the step function
$$\hat F(t) =\frac{1}{n}\sum_{i=1}^n \mathbb I_{x_i\ge t}$$
is unbiased, since
$$\mathbb E_F[\mathbb I_{X_i\ge t}]=\mathbb P(X_i\ge t)=F(t)$$
Here is an illustration with

*

*$n=10$ points in the sample

*$\tau=1$

*$F$ the complement cdf for the standard normal

*$M=10^5$ repetitions

*$100$ plots of $\hat F$

*the graph of the average of the $M$ $\hat F$'s (red)

*the graph of the true $F$ (blue)


showing they are indistinguishable, i.e. the expectation of $\hat F$ is $F$. In the opposite, if using the biased step function
$$\hat F(t) =\frac{1}{n}\sum_{i=1}^n \varphi(x_i)\mathbb I_{x_i\ge t}$$
instead, the bias is clear:

