Let $\mathcal X$ be either a subset of $\mathbb R$ equipped with Lebesgue measure or a countable set with counting measure. The Gibbs' principle in statistical physics asserts that if $(X_1 , \dots, X_n) \in \mathcal X^n$ is distributed uniformly on $$ \left\{ (x_1,\dots,x_n)\in \mathcal X^n: \frac{1}{n}\sum_{i=1}^n f_a(x_i) \in [m_a, m_a+\delta], \quad a=1,\dots,k \right\} $$ where $m_1,\dots, m_k$ are fixed, then as $n \rightarrow \infty$ and then $\delta \rightarrow 0$ , $X_1, \dots, X_n $ are asymptotically i.i.d. with the marginal law $$ P_X(x) \propto e^{\sum_{a=1}^k \lambda_a m_a(x)} \tag{1} $$ where $(\lambda_a)$ are such that $$ \mathbb E[f_a(X)] = m_a \tag{2} $$ Note that $P_X$ is also the probability law with maximum entropy subjected to the constraints (2).
This is not a mathematical theorem, it works for a lot of cases in physics and there are cases where it fails. For the physicists, asymptotically i.i.d. means that they can do the calculations with the easy i.i.d. distribution instead of the uniform distribution and get the same result.
One interesting example (https://arxiv.org/abs/1011.4043) in which this prniciple fails is when $\mathcal X = (0, \infty)$, with $k=2$,$f_1(x) = x$, $f_2(x) = x^2$, $m_1=1, m_2 > 2$, then as $n \rightarrow \infty$, for any fixed $k$, $(X_1,\dots,X_k)$ converges in law to $(Z_1, \dots, Z_k)$, where $Z_i \stackrel{i.i.d.}{\sim} \text{Exp}(1)$.
Now take $\mathcal X = \mathbb R$, $k=2, f_1(x) = x^2, f_2(x)=x^3$, then Gibbs' principle fails since there is no real-valued random variable with density $P_X(x) \propto e^{ax^2+bx^3}$. Which result can be obtained in this case? Does the uniform law behave like a more simple law as $n \rightarrow \infty$?