It is well known that for a simple random walk on a 2D square lattice extending to infinity the mean square displacement of the walk $\langle \mathbf r^2\rangle \propto N \, :(\*)$ with $N$ the number of steps taken. There are various ways of showing this, e.g., by writing the end to end vector of the walk as a sum of the displacement vectors taken at each step:
$$
\mathbf R = \sum\limits\_{i=1}^N \mathbf R\_i \tag{1}
$$ 
Squaring it:
$$
R^2 = \sum\limits\_{i=1}^N R\_i^2 + \sum\limits\_{i=1}^N \sum\limits\_{j=1}^N (\mathbf R\_i,\mathbf R\_j) \tag{2}
$$ 
with $(\mathbf R\_i,\mathbf R\_j)$ the dot product between the two vectors, then taking the average of $(2)$ one then arrives at $(\*).$


* If we consider the same problem, but for a finite lattice of side $L,$ (in units of the lattice spacing $b$ that we set to $1$ for simplicity), how can we determine the mean square displacement in order to obtain a scaling similar to that in $(\*)?$ In other words, is the proportionality in $N$ preserved and how does the finite size of the lattice enter the expression of $\langle \mathbf r^2\rangle?$



Mean square displacement for a random walker in a finite system
as requested, an explicit calculation: we seek the mean square displacement in the long-time limit for a random walker on an $L\times L$ square; the position of the walker for $N\gg L^2$ is uniformly distributed in that area, hence


$$\langle \delta {r}^2\rangle=\frac{1}{L^2}\int\_{-L/2}^{L/2}dx\int\_{-L/2}^{L/2}dy \left[(x-x\_0)^2+(y-y\_0)^2\right]=\tfrac{1}{6}L^2+x\_0^2+y\_0^2,$$


where $(x\_0,y\_0)$ is the initial position of the walker.


