Is there a formal definition of a macroscopic variable in statistical mechanics? Intuitively it's easy to accept that the usual variables like temperature, internal energy, etc. are 'macroscopic', but does there exist a formal definition of a macroscopic variable? 
In other words, is there a clear way to separate the set of all observables (and functions of observables) on a system into ones we would describe as 'macroscopic' and ones we would not?
EDIT: Since apparently the answer is not completely straightforward, I'm interested in hearing any definitions which have appeared in literature, even if they are only conventions. I'm also interested in any necessary or sufficient conditions.
 A: Let me focus on the context of rigorous equilibrium statistical physics (see, e.g., Georgii's book "Gibbs Measures and Phase Transitions"). There, one works with probability measures on infinite systems, often on a lattice; let me assume it's $\mathbb{Z}^d$. In this context, a macroscopic observable is defined as a function $O:\Omega\to\mathbb{R}$ (where $\Omega$ is the set of all configurations $(\omega_i)_{i\in\mathbb{Z}^d}$) which does not depend on the values of any finite sets of spins $\omega_i$ (technically, one says that such an observable is measurable with respect to the tail $\sigma$-field).
Let me give you some examples of such observables, in the simple case of Ising-type systems, i.e., with $\Omega=\{-1,1\}^{\mathbb{Z}^d}$. Let $\sigma_i$ denote the spin at $i$, $\sigma_i(\omega)=\omega_i$.
$\circ$ Averages of local observables, e.g.,
$$
\lim_{\Lambda\uparrow\mathbb{Z}^d} \frac1{|\Lambda|}\sum_{i\in\Lambda} \sigma_i\;.
$$
$\circ$ Events such as "There are no infinite connected components of $-1$-spins".
In both cases, changing a finite number of spins does not modify the value of the observable $O$.
One nice thing about this definition is that one can prove very generally that such observables take deterministic values (i.e., are almost surely constant) with respect to any pure phase (extremal Gibbs measure). In other words, they do not fluctuate (remember one deals here with infinite systems).
A: It's hard to give a precise definition because to some extent these terms are a matter of convention. A good-but-not-quite-correct starting point is to think of a macroscopic variable as being such that, if you know its value (i.e. you've measured it), the entropy of the system can still be non-zero. For quantum systems this is the von Neumann entropy, whereas for classical systems it is the usual Gibbs-Shannon entropy. A microscopic variable is one for which this is not the case - knowing its value completely determines the system's state in the classical case, or puts the system into a pure state in the quantum case.
This seems like a good definition because statistical mechanics is all about the cases where the microscopic details are unknown and have to be represented with a probability distribution or density matrix, and this definition seems to capture exactly those cases.
Note that this definition of "macroscopic" includes the expectation values of microscopic variables, since just knowing the expectation over an ensemble still leaves some uncertainty about the microscopic variable's precise value. The "extensive" macroscopic variables in thermodynamics ($U$, $V$ etc.) are of this kind.
However, the reason this isn't quite right is that in the case where there is some degeneracy in the energy levels, knowing the precise value of the energy can still leave a non-zero von Neumann entropy. But energy is generally considered a microscopic variable even in this case. An improvement to this definition might involve saying that a spanning set (my term) of microscopic variables is one such (a) they can be measured simultaneously (i.e. they're measured by orthogonal projection operators), and (b) knowing the values of all of them leaves zero von Neumann entropy. So, for example, knowing both the energy and the angular momentum of an orbiting electron might completely determine the wavefunction, and thus they would be a spanning set, even though each alone might not be. The question then would not be whether a single variable is a microscopic or macroscopic one, but whether a given set of variables is a spanning set or not. This seems like the right approach to me, but I don't know whether anyone has formally described it. (I would be interested to know if anyone has.)
