# Increase the number of samples when the PDF is invariant

Background:

$$\frac{\partial C}{\partial t} = D \frac{\partial^2 C}{\partial x^2}$$ is given by Fick's second law, in which $$D$$ is the diffusion coefficient. The solution to this equation (given the initial condition) $$C(x, t)$$ is the probability density of finding a particle at $$(x, t)$$.

This equation describes how a collection of independent Brownian particles diffuse.

In molecular dynamics (MD) simulation, one way to calculate the diffusion coefficient $$D$$ is to calculate the expectation $$\Bbb E(x^2)_t = \int_{-\infty}^{+\infty}x^2C(x, t)dx = \frac{1}{N}\sum_{i = 1}^N(x_i(t_0 + t) - x_i(t_0 ))^2$$

$$N$$ is the number of independent diffusive particles that is modeled. {$$x_i(t_0)$$} and {$$x_i(t_0 + t)$$} are positions of the $$N$$ particles at $$t_0$$ and $$t_0 + t$$ respectively. So, {$$x_i(t_0 + t) - x_i(t_0)$$} can be treated as $$N$$ samples drawn from $$C(x, t)$$.

However, in some MD simulations, the number of independent particles $$N$$ is limited to be less than $$20$$, so it will be insufficient to evaluate the expectation.

I wonder whether I could 'augment' the samples in such a way:

Since the diffusion of the particles are independent, and the particles are doing Brownian motion, the PDF $$C(x, t)$$ is invariant w.r.t $$t_0$$. So, I can start with say $$M$$ {$$x_i^m(t_0)$$}, then the expectation will be $$\Bbb E(x^2)_t = \frac{1}{N}\sum_{i = 1}^N \frac{1}{M}\sum_{m = 1}^M(x_i^m(t_0 + t) - x_i^m(t_0 ))^2$$

In MD simulation, the total simulation time is $$t_{tot}$$, following the spirit of multiple starting points, I want to randomly sample several time intervals $$[t_0, t_0 + t]$$ from $$[0, t_{tot}]$$ to calculate the expectation.

However, in a real MD simulation, the particles can only be approximated to be doing Brownie motion. And the motions of the particles are correlated to some extent. Can I still do such a 'resampling' for calculating the expectation? Above all, can the time intervals $$[t_0, t_0 + t]$$ sampled from $$[0, t_{tot}]$$ overlap?