What is the general statistical definition of temperature? Temperature in an isolated system is defined as:
$$\frac{1}{T} = -\frac{\partial{S(E,V,N)}}{\partial{E}} $$
But I wonder how one can generalize this to a random system. 
Or for instance to a point in a system. Because in these books about statistical 
physics they talk often about "temperature gradients in a system", but for these to exist, temperature has
first to be defined in every point (although I can't find a general definition).
I hope someone can help me out. 
 A: Length scales are not accounted for properly in your question. When you have a system at local equilibrium where a temperature gradient can be defined then each "point" in this description contains say $10^{10}$ molecules and can be seen as a thermostatistical system at equilibrium. We call that "local" equilibrium because intensive quantities such as temperature and chemical potential might not be uniform throughout the whole system i.e. they may vary from one "point" to another.
There are evolution equations of these mesoscopic quantities that deal with such local equilibrium situations. The simplest are the Fourier (for temperature) and the Fick (for particle density) equations but they can be derived from more general equations with a collision kernel such as e.g. the Boltzmann equation.
A: A "point" in a macroscopic system is not a geometrical point. It is a volume element that is small on a macroscopic scale and yet has a large number of molecules for entropy and internal energy to be defined. Your temperature probe does not measure its value at a geometrical point but for a small volume of the system in whose contact it is put.
The local thermal equilibrium pointed in the previous answer (by @gatsu) means that $S$ and $E$ are uniform in a volume element but may vary from one element to another leading to a gradient.
The definition of $T$ in terms of $S$ and $E$ is applicable to any macroscopic system for which $S$ and $E$ are defined.
A: The maximum entropy probability distribution for a system of fixed expected total energy is the Boltzmann distribution. This means that Boltzmann distribution is appropriate for systems where we know the total energy but little else. The distribution is given by $p(E) = Z^{-1} e^{-E/kT}$, where $Z$ is the normalization constant (making sure probabilities add to 1), $k$ is Boltzmann's constant and $T$ is another parameter that we name temperature. 
When you talk about localized temperature at a specific location and time then at that time we assume that we have a fixed and well defined expected energy distribution. This assumption allows you to conclude that Boltzmann distribution is valid at every point of the system of interest and therefore you can define a location dependent temperature (ie a particle at location $\vec{r}$ has the probability of having energy $E$ of $p(E, \vec{r}) = Z(\vec{r}) e^{-E/kT(\vec{r})}$). 
If you have detailed information about the particles in your system then temperature may still be a useful concept (it can be extended somewhat by adding chemical potentials), but some information is in general likely to be lost through its use. 
