DescriptionThis thesis consists of two parts: In part I we apply the statistical mechanics techniques to a generalization of the prescribed $Q$-curvature problem, especially on the $mbox{sc d}$-dim sphere $mathbb S^{smallmbox{sc d}}$. We introduce a coupling constant $c$ on top of the configurational canonical ensemble and study the weak convergence of this new canonical ensemble. In this part, the $Q$-curvature does not change sign. In part II the statistical mechanics technique is generalized to the prescribed $Q$-curvature problem with sign-change, while the mechanical interpretation will be lost. We decompose a single differential equation into a system of two differential equations, and the statistical mechanics technique can be applied to each equation.