A conceptual question related to statistical mechanics Statistical mechanics allows us to consider an ensemble of systems, each of which consisting of only a single particle. Once we write the partition function for the system of one particle, we can easily derive all the thermodynamic quantities. One can accept that the internal energy computed from the partition function is the average energy of the system. But how to interpret pressure? What does pressure mean in the case of a system of one particle.
 A: Pressure is defined as the rate of increase in internal energy to rate of decrease in volume, i.e.
$$P=-\frac{\partial U}{\partial V}$$
Assume a particle in a box, for example the classic infinite quantum potential well of width $L$. The quantized energy is
$$E_n=\frac{n^2h^2}{8mL^2}$$
In a 3D box this becomes
$$E_{n_x,n_y,n_z}=\frac{(n_x^2+n_y^2+n_z^2)h^2}{8mL^2} = \frac{(n_x^2+n_y^2+n_z^2)h^2}{8mV^{2/3}}$$
where $V$ is the volume.
The ground state energy for this system is
$$E_0 = \frac{3h^2}{8mV^{2/3}}$$ therefore the pressure is
$$P=-\frac{\partial E_0}{\partial V}=\frac{h^2}{4mV^{5/2}}$$
So you can see even a single particle can excert pressure on the boundaries of its bounding box! 
A: A canonical ensemble is a collection of weakly interacting systems, in thermal equilibrium with each other. The individual systems can be a single particle/molecule if the energy of interaction between the particles is negligible in comparison with their own (kinetic) energy. The energy of ensemble is then just the sum of energies of individual particles, each particle considered as a 'system'. In such situations, one can consider a molecular partition function $q = \sum\exp(-\beta E_i)$, where $\beta = -1/(kT)$ and $E_i$ are the energy levels of the molecule. We can then write the total partition function as $Z = q^N/N!$. (We divide by $N!$ to account for indistinguishability of molecules.) Since the energy of interaction is negligible, all macroscopic effects are a sum of effects due to individual particles. For example, if we have just a thousand molecules in a container of $1$ $m^3$ then the pressure of the gas will be $1000$ times the 'pressure due to one molecule'.
An ideal gas is one example of an ensemble of 'loosely coupled systems'. Another one could be where we can write total energy as a sum of translational, vibrational and rotational energies when there is no coupling between them. One can then write the total pressure as being due to each of these components.
In general, if the partition function of an ensemble can be written as a product of partition functions of subsystems then all thermodynamic functions can be written as sums of contributions from the individual subsystems. (This is because of the logarithmic relation between Helmholtz free energy and partition function.)
