  Beyond Bose and Fermi statistics, there still exist various kinds of
generalized quantum statistics. Two ways to approach generalized quantum
statistics: (1) in quantum mechanics, generalize the permutation symmetry of
the wave function and (2) in statistical mechanics, generalize the maximum
occupation number of quantum statistics. The connection between these two
approaches, however, is obscure. In this paper, we suggest a unified framework
to describe various kinds of generalized quantum statistics. We first provide a
general formula of canonical partition functions of ideal $N$-particle gases
obeying various kinds of generalized quantum statistics. Then we reveal the
connection between the permutation phase of the wave function and the maximum
occupation number, through constructing a method to obtain the permutation
phase and the maximum occupation number from the canonical partition function.
In our scheme, the permutation phase of wave functions is generalized to a
matrix phase, rather than a number. It is commonly accepted that different
kinds of statistics are distinguished by the maximum number. We show that the
maximum occupation number is not sufficient to distinguish different kinds of
generalized quantum statistics. As examples, we discuss a series of generalized
quantum statistics in the unified framework, giving the corresponding canonical
partition functions, maximum occupation numbers, and the permutation phase of
wave functions. Especially, we propose three new kinds of generalized quantum
statistics which seem to be the missing pieces in the puzzle. The mathematical
basis of the scheme are the mathematical theory of the invariant matrix, the
Schur-Weyl duality, the symmetric function, and the representation theory of
the permutation group and the unitary group. The result in this paper builds a
bridge between the statistical mechanics and such mathematical theories.
