If the number of parts in the system is allowed to vary among the systems in the ensemble (as in a grand ensemble where the number of particles is a random quantity), then it is a probability distribution over an extended phase space that includes further variables such as particle numbers N 1 (first kind of particle), N 2 (second kind of particle), and so on up to N s (the last kind of particle; s is how many different kinds of particles there are). The ensemble is then represented by a joint probability density function ρ (N 1,... N s, p 1,... p n, q 1,... q n). The number of coordinates n varies with the numbers of particles.