It is shown that statistical mechanics is applicable to isolated quantum systems with finite numbers of particles, such as complex atoms, atomic clusters, or quantum dots in solids, where the residual two-body interaction is sufficiently strong. This interaction mixes the unperturbed shell-model (Hartree-Fock) basis states and produces chaotic many-body eigenstates. As a result, an interaction-induced statistical equilibrium emerges in the system. This equilibrium is due to the off-diagonal matrix elements of the Hamiltonian. We show that it can be described by means of temperature introduced through the canonical-type distribution. However, the interaction between the particles can lead to prominent deviations of the equilibrium distribution of the occupation numbers from the Fermi-Dirac shape. Besides that, the off-diagonal part of the Hamiltonian gives rise to an increase of the effective temperature of the system (statistical effect of the interaction). For example, this takes place in the cerium atom, which has four valence electrons and which is used in our work to compare the theory with realistic numerical calculations.