Let $(S,g)$ be a Riemannian surface. Then the curvature function $\kappa: S\to \mathbb{R}$ can be counted as a random variable. So it produces a probability density function $f_g:\mathbb{R}\to \mathbb{R}$. Similarly every Riemannian manifold $(M,g)$ introduces a probability density function $f_g$ associated with the scalar curvature $R:M\to \mathbb{R}$ as a random variable.
Question: Can one equip a compact surface $S$ with a Riemannian metric $g$ such that the resulting probability distribution be a uniform distribution, i.e the density function $f_g$ be a constant function ? What about the case of Riemannian manifolds, namely dimension greater than 2 ? If the answer is yes, can we choose an analytic Riemannian metric with the above mentioned property ? (The distribution associated to the curvature function be uniform.)