Introduction to Boltzmann Statistics
The grand canonical ensemble is a probability space which models physical systems with a variable number of particles and variable energy at a fixed temperature.
Here we imagine our physical system is in contact with a heat reservoir and a particle reservoir. That is, it can exchange energy and particles with some outside system. Much like inverse temperature $\beta$ controls the rate of flow of energy between systems, another parameter the chemical potential $\chi$ controls how easily a particle moves between our system and the reservoir. We think of this as the cost of each particle.
Our state space naturally decomposes into a disjoint union $$\Omega = \bigsqcup_N \Omega_N$$ where $\Omega_N$ is the set of all states with $N$ particles. For each $N$ there is an energy functional $E_N : \Omega_N \rightarrow [0, \infty)$, and the grand canonical energy functional $\mathbf x \in \Omega_N$ is given by $$E(\mathbf x) = E_N(\mathbf x) + \chi N$$.
The Boltzmann factor is then $e^{-\beta E}$ but to report the joint density of states completely we need to provide the conditional density of states on each $\Omega_N$. Note that the Boltzmann factor when restricted to $\Omega_N$ is $$e^{-\beta \chi}$$ times the Boltzmann factor for the canonical ensemble with $N$ particles. That is, with $f_N(\beta, \mathbf x)$ the joint probability density of particles in the canonical ensemble, then we may define a probability measure $P(\beta, \chi)$ on $\Omega$ by specifying that if $A \subset \Omega_N$ then $$P(\beta, \chi; A) = \frac{Z(N,\beta)}{Z(\chi, \beta)} P_N(\beta; A),$$ where $Z(\chi, \beta)$ is the grand canonical partition function $$Z(\chi, \beta) = \sum_{N=0}^{\infty} \frac{e^{-\beta \chi}}{N!} \int_{\Omega_N} e^{-\beta E_N(\mathbf x)} \, d\lambda_N(\mathbf x).$$ Note that the probability of seeing $N$ particles in the grand canonical ensemble is $Z(N, \beta)/Z(\chi, \beta).$
It is useful to set $t = e^{-\beta \chi}$ and write the grand canonical partition function as $$Z(t, \beta) := \sum_{N=0}^{\infty} \frac{t^N}{N!} Z(N, \beta).$$ This is a useful substitution because it allows us to see the grand canonical partition function as the generating function for the canonical partition functions. Note the $N!$ has made its appearance to account for the particles being indistinguishable. When using the generating function expression for computing physical quantities it is important to view $t$ as a function of $\chi$ and $\beta$. However, we can study the generating function for its own sake, and so in general we think of $t$ as being an indeterminant that controls the distribution of $N$.