In this work, polarized photoluminescence caused by quasi-equilibrium spin orientation of excitons at Zeeman sublevels in an ensemble of quantum dots of different sizes is studied theoretically. The following unexpected results are found: (i) the splitting of photoluminescence bands in a magnetic field in an ensemble of quantum dots is much larger than the Zeeman splitting of exciton levels in a single dot, (ii) contrary to the Boltzmann distribution the low-energy luminescence band has a lower intensity than the high-energy band, (iii) the sign of the circular polarization of photoluminescence changes along the contour of the bands, (iv) a universal formula for the dependence of the exciton g-factor on the quantum dot size is obtained. All of the above features of the polarized luminescence spectra are explained by variations of the exciton g-factor when its quantization energy changes. The results obtained are applicable not only to ensembles of quantum dots, but also to any ensemble of localized states: excitons in quantum wells under conditions of well-width fluctuations, impurity states in quantum wells, etc.