Fermions in a micro-canonical ensemble I've been reading statistical mechanics, and I read the following on Wikipedia, on the article on Fermi-Dirac Statistics derivation in the micro-canonical ensemble :

Suppose we have a number of energy levels, labeled by index $i$, each
level having energy $ε_i$  and containing a total of $n_i$  particles.
Suppose each level contains $g_i$  distinct sublevels, all of which have
the same energy, and which are distinguishable. For example, two
particles may have different momenta (i.e. their momenta may be along
different directions), in which case they are distinguishable from
each other, yet they can still have the same energy. The value of $g_i$
associated with level $i$ is called the "degeneracy" of that energy
level. The Pauli exclusion principle states that only one fermion can
occupy any such sublevel.

Then they have continued :

The number of ways of distributing $n_i$ indistinguishable particles
among the $g_i$ sublevels of an energy level, with a maximum of one
particle per sublevel is given by the binomial coefficient, using its
combinatorial interpretation :
$$ w(n_{i},g_{i})={\frac {g_{i}!}{n_{i}!(g_{i}-n_{i})!}}$$  For
example, distributing two particles in three sublevels will give
population numbers of $110$, $101$, or $011$ for a total of three ways which
equals $\frac{3!}{(2!1!)}$.

I'm unable to understand why are we only allowed to fill up each energy sub-level with a single particle. According to what I know, the Pauli Exclusion principle states that no two fermions can occupy the same quantum state, not energy level. For example, two electrons in the ground state of helium have the same energy, but due to opposite spins, they are in a different quantum state. Why are we not considering the spin while dealing with Fermi-Dirac Statistics.
If we ignore spin, then we can only use Energy levels ($n$) and angular momentum ($l\space$ and $m_l$), to define a quantum state, and then the formula is true, that no two fermions can occupy the same energy level ( quantum state ).
However, if we consider spin, the quantum state is no longer just defined by Energy value. It is also defined by the eigenvalue of the spin operator i.e. $m_s$. In that case, the number of particles that can be found in a particular sub-level of energy is $2s+1$. We can now find more than one fermions at a particular energy sublevel. If we consider this into Fermi Dirac statistics, how would our formula be modified?
Is my reasoning correct, or is there something obvious that I'm missing ?
 A: Consider a system of $N = \sum_i n_i$ identical fermions, with the discrete hydrogen spectrum. In this case the energy levels are, in Coulomb units, well known to be $E_n = - 1/2n^2$ or, since I used "i" to refer to the $i = 1,2,...$'th energy level:
$$E_{i} = - \frac{1}{2i^2},$$
so that the total energy is $E = \sum_i n_i E_i$ where there are $n_i$ particles in the $i$'th energy level. The degeneracy $g_i$ of the $i$'th level (ignoring spin) is $i^2 = \sum_{l=0}^{i-1} (2l+1)$ degenerate states (i.e. different wave functions with different values of $(m,l,n)$). If we include spin it's now just $g_i = 2i^2$. In other words, in the $i$'th energy level $E_i$ there are $g_i = 2i^2$ different sttes/wave-functions $\psi_{(n_i,l_i,m_i,s_i)}(r,\theta,\phi)$ that the $n_i$ particles, with $n_i \leq g_i$, could be in.
Assume that the $n_i$ particles in the $i$'th energy level are an independent subsystem of the total system. This vitally important statement means that even though there are a bunch of different energy levels $E_1, E_2, ...$ we just focus on one energy level $E_i$. For all intent and purposes, this is our whole system for the moment, we deal with other $E_j$'s after.
The question is: in how many ways can we put the $n_i$ particles with energy $E_i$ into the $g_i$ degenerate states each with energy $E_i$ such that only one particle can fit into a given state with energy $E_i$, noting the total energy of the particles in this energy level is $n_i E_i$. This 'combinatorial' number is denoted $w(n_i,g_i)$. Once we calculate this for $E_i$, then, since the levels are all independent, the total statistical weight where we factor in all independent energy levels $E_1,E_2,...$ is just the product of all the separate $w(n_i,g_i)$'s: $W = \Pi_i w(n_i,g_i)$.
There are $g_i$ choices for the first particle, $g_i - 1$ for the second since it can't occupy the same state the first particle occcupied, etc... giving $g_i (g_i -1) ...(g_i - n_i + 1) = \frac{g_i!}{(g_i - n_i)!}$ but this over-counts as each permutation of the $n_i$ particles is treated as independent but they are identicaal particles so we divide by $n_i!$ to get
$$w(n_i,g_i) = \frac{g_i!}{n_i!(g_i-n_i)!}$$ for all $j$'s.
This is the statistical weight for the $E_i$ energy level. We can now repeat this for all $E_j$'s immediately finding $w(n_j,g_j) = \frac{g_j!}{n_j!(g_j-n_j)!}$.
For example, say $i = 4$ and that there are $n_i = n_4 = 3$ particles with this energy $E_4 = - \frac{1}{2 \cdot 4^2} = - \frac{1}{32}$ so that $n_i E_i = 3 E_4 = - \frac{3}{32}$ is the total energy of the $i=4$'th (sub)system. There are $g_4 = (\frac{1}{2}2+1) \sum_{l=0}^{n-1} \sum_{m=-l}^l 1 = 2 \cdot 3^2 = 18$ different wave functions $\psi_{(i=4,l_4,m_4,s_4)}(r,\theta,\phi)$ where $s_4 = \pm \frac{1}{2}$, $m_4$ goes from $-l_4$ to $l_4$, and $l_4$ goes from $0$ to $4-1 = 3$. Since they all correspond to the same energy eigenvalue they are called degenerate states, and again notice we set $n_4 = 3 \leq g_4 = 18$. Thus $w(n_i = 4,g_i = 18) = \frac{18!}{4!(14)!}$.
We can repeat this for every energy level $E_1,E_2,...$ in the Hydrogen atom spectrum even for ones with $n_k = 0$ i.e. ones with no particles in them, $w(n_k,g_k)=\frac{0!}{0!0!} = 1$ will hold for them. Since the levels are all independent, the total statistical weight is then just the product of all the $w(n_i,g_i)$'s: $W = \Pi_i w(n_i,g_i)$.
You'll notice we're supposed to know the values of $n_1,n_2,...$ also. Of course we're really going to try to treat them as variables and then maximize $W$ in terms of them, i.e. find the choice of $n_1,n_2,...$ which maximizes $W$, but it's up to us to choose them/have them handed to us, unless we're maximizing so we can then select this 'best' choice.
Hopefully you see your issue with spin is factored into and affect the value that $g_i$ takes, where it was $n_i^2$ or $2n_i^2$. This assumes spin $1/2$, if you changed the spin to $2J+1$ it would just change the value of $g_i$. The point in this calculation is just that if they are fermions you assume they can't occupy the same state depending on how the state is defined, whether it includes the spin or not.
A: There's three concepts: quantum state, energy level, and the number of fermions in a particular energy level. In general, there can be many states which occupy the same energy level, as the first quote above explains.
All the Pauli Exclusion principle says is that each fermion must occupy a different sublevel. To state it another way, there is a one-to-one mapping between probability and energy level, but a many-to-one mapping between the quantum state and the energy level (and therefore the probability).
Each sublevel in a particular energy level contributes a count of one fermion to the total degeneracy of that  level. So there is a one-to-one mapping between sublevel and state. To close the loop on this, there can't be two fermions in the same state or sub-level.
