Occupation of quantum states at room temperature I'm reading up on the physics of degenerate matter (in "An Introduction to Modern Astrophysics" by Carroll & Ostlie, section 16.3), and the impact of electron degeneracy pressure.  I came across the quote:

In an everyday gas at standard temperature and pressure, only one of every $10^7$ quantum states is occupied by a gas particle, and the limitations imposed by the Pauli exclusion principle become insignificant.

I was wondering how to actually do the calculation of the percent of quantum states occupied at a given temperature.  I imagine it's an elementary application of stat mech distribution functions (either Maxwell-Boltzmann or Fermi-Dirac), but I'm not sure of the details.
 A: Let's think of the problem this way...it's a bit rough but should give you an idea:
We know that the energy levels of a particle in a 1D box of length $L$ are given by the formula
$$E_n = \frac{\pi^2 \hbar^2}{2 m L^2} n^2$$
where $n=1,2,3,\dots$. We also know that the average kinetic energy of a particle $\langle E\rangle$ is related to the temperature by the relation
$$\langle E \rangle = \frac 3 2 k_B T$$
Let's assume that the maximum kinetic energy for a particle at temperature $T$ is something of the order of $ 2 \langle E \rangle =3 k_B T$ (the actual number is not important since we are after a rough estimate).
So the question is: how many energy levels are possible if the maximum energy is $3 k_B T$?
To answer this question, we have to take the following equation
$$\frac{\pi^2 \hbar^2}{2 m L^2} n^2 = 3 k_B T$$
and solve for $n$:
$$ n = \sqrt{\frac{6 k_B T m L^2}{\pi^2 \hbar^2}}$$
Let's put some numbers in that formula:


*

*$T=300$K ($\simeq$ ambient temperature)

*$L=1$cm

*$m = 10^{-27}$ kg ($\simeq$  Hydrogen's mass)


We obtain
$$n \simeq 10^8$$
Our particle will of course occupy only one of those $10^8$ possible energy levels. I know, it's not $10^7$, but we went pretty close!
If we have $N$ independent particles (like in an ideal gas), the total hamiltonian will be separable and its eigenvalues will be the sum of the eigenvalues of the single particle hamiltonians, so the argument above is not going to change much. 
Even if we consider a 3D box not much will change, since the energy levels will be
$$E_{n_x n_y n_z} = \frac{\pi^2 \hbar^2}{2 m L^2} (n_x^2+n_y^2+n_z^2)$$
and the rough argument I gave above will remain more or less the same. Actually, I can be more explicit: the eigenvalues for $N$ non interacting particle in a 3D box are
$$\frac{\pi^2 \hbar^2}{2 m L^2}\sum_{i=1}^N (n_{x,i}^2+n_{y,i}^2+n_{z,i}^2)$$
I leave it to you to show that we will get more ore less the same result for the number of energy levels.
A: The Fermi-Dirac distribution for a particle to be in the $n_i$ state with energy $E_i$ and $\mu$ the chemical potential equal to the Fermi energy as $T~\rightarrow~0$ is
$$
\bar n_i = \frac{1}{e^{(E_i-\mu)\beta} + 1}
$$
For the temperature $T~>>~0$ then $\beta~=~1/kT$ is small and for $E_i$ not large we have $(E_i-\mu)\beta << 0$. This means that $e^{(E_i-\mu)\beta}~\rightarrow~1$. Now write this as
$$
\bar n_i = \frac{e^{-(E_i-\mu)\beta}}{(1 + e^{-(E_i-\mu)\beta}}).
$$
The term $e^x = 1 + x + x^2/2 + \dots$ for $x = {-(E_i-\mu)\beta}$, which we linearly so that
$$
\bar n_i \simeq e^{-(E_i-\mu)\beta}\left(1 - (E_i-\mu)\beta\right),
$$
where binomial theorem has been used. This leads to the approximate Boltzmann distribution.
For a density of states, number of states per unit energy range per unit volume $g(E)$, the occupation number is computed as
$$
N(E) = \frac{g(E)}{e^{(E_i-\mu)\beta} + 1}
$$
