The theoretic calculation and analysis of the temperature dependence of Hall electron density of a sample AlGaN/GaN heterostructure has been carried out in the temperature range from 77 to 300K. The densities of the twodimensional electron gas and the bulk electrons are solved by self-consistent calculation of one-dimensional Schrodinger and Poisson equations at different temperatures, which allow for the variation of energy gap and structure strain, and are used for evaluation of the temperature dependence of Hall electron density. The calculated Hall electron density agrees with the measured one quite well with the appropriate bulk mobility data. Analysis revealed that for the temper ature range considered, even in the heterostructures with a small bulk conductance the factors that determine the Hall mobility and electron density could be of different sources, and not just the two-dimensional electron gas as generally supposed.