  We develop the theory and practical expressions for the full
quantum-mechanical distribution of the intrinsic macroscopic polarization of an
insulator in terms of the ground state wavefunction. The central quantity is a
cumulant generating function which yields, upon successive differentiation, all
the cumulants and moments of the probability distribution of the center of mass
X/N of the electrons, defined appropriately to remain valid for extended
systems obeying twisted boundary conditions. The first moment is the average
polarization, where we recover the well-known Berry phase expression. The
second cumulant gives the mean-square fluctuation of the polarization, which
defines an electronic localization length xi_i along each direction i. It
follows from the fluctuation-dissipation theorem that in the thermodynamic
limit xi_i diverges for metals and is a finite, measurable quantity for
insulators. It is possible to define for insulators maximally-localized
``many-body Wannier functions'', which for large N become localized in
disconnected regions of the high-dimensional configuration space, establishing
a direct connection with Kohn's theory of the insulating state. Interestingly,
the expression for xi_i^2, which involves the second derivative of the
wavefunction with respect to the boundary conditions, is directly analogous to
Kohn's formula for the ``Drude weight'' as the second derivative of the energy.
