  The Mallows model on $S_n$ is a probability distribution on permutations,
$q^{d(\pi,e)}/P_n(q)$, where $d(\pi,e)$ is the distance between $\pi$ and the
identity element, relative to the Coxeter generators. Equivalently, it is the
number of inversions: pairs $(i,j)$ where $1\leq i<j\leq n$, but $\pi_i>\pi_j$.
Analyzing the normalization $P_n(q)$, Diaconis and Ram calculated the mean and
variance of $d(\pi,e)$ in the Mallows model, which suggests the appropriate $n
\to \infty$ limit has $q_n$ scaling as $1-\beta/n$. We calculate the
distribution of the empirical measure in this limit, $u(x,y) dx dy = \lim_{n
\to \infty} \frac{1}{n} \sum_{i=1}^{n} \delta_{(i,\pi_i)}$. Treating it as a
mean-field problem, analogous to the Curie-Weiss model, the self-consistent
mean-field equations are $\frac{\partial^2}{\partial x \partial y} \ln u(x,y) =
2 \beta u(x,y)$, which is an integrable PDE, known as the hyperbolic Liouville
equation. The explicit solution also gives a new proof of formulas for the
blocking measures in the weakly asymmetric exclusion process, and the ground
state of the $\mathcal{U}_q(\mathfrak{sl}_2)$-symmetric XXZ ferromagnet.
