Mean depth is calculated by assigning a depth value to each space according to how many spaces it is away from the original space, summing these values and dividing by the number of spaces in the system less one (the original space).
Hillier, B. & Hanson, J. (1984), The Social Logic of Space, Cambridge University Press: Cambridge. pp. 108