How to estimate the Haar measure on $G_2$ I have a sequence of real numbers. I want to know whether this sequence looks like the traces in the standard representation of a random sequence of elements of $G_2$. (Here random is according to the Haar measure on the compact form.)
So I want to compare my sequence with the measure on $\mathbb R$ that is the pushforward of the Haar measure along the trace map. Thus I want some description of this measure.
It seems difficult to find an explicit formula for this measure. However, I'd still like a way to estimate it.
For $U_n, SU_n$, $USP_n$, and $O_n$, this paper describes how to generate a random element, and hence how to estimate the Haar measure using Monte Carlo.
One could also compute the moments of the distribution using representation theory, and try to estimate the measure from that, but this seems like a bad idea.
 A: Here's a method that should work...
Step 0:  Consider the octonions with basis $1, i,j, ij, \ell, \ell i, \ell j, \ell i j$, where $i,j,\ell$ are imaginary unit octonions, with $ij = - ji$, and $\ell$ orthogonal to $H = R + Ri + Rj + Rij$.
Step 1:  Choose a random imaginary unit octonion, i.e. a random point $i'$ on the 6-sphere.  The easiest way is probably to sample normal distributions in each of 7 variables then normalize the resulting vector.
(The set of $g \in G_2$ which send $i$ to $i'$ forms an $SU(3)$-torsor.)
Step 2:  Now choose a random imaginary unit octonion $j'$ which is orthogonal to $i'$ (with respect to the form $T(x,y) = Tr(xy)$).  This requires sampling from the 5-sphere.  The space $H' = R + Ri' + Rj' + Ri'j'$ is isomorphic to the usual quaternions as an $R$-algebra. 
(The set of $g \in G_2$ which send $i$ to $i'$ and $j$ to $j'$ forms an $SU(2)$-torsor.)
Step 3:  Now choose a random imaginary unit octonion $\ell'$ which is orthogonal to the subspace $H'$.  This requires sampling from the 3-sphere.
($SU(2)$ acts simply transitively on this set of choices)
(For a sanity check, 6+5+3 = 14 = $dim(G_2)$)
There is a unique element $g \in G_2$ which sends $i$ to $i'$ and $j$ to $j'$ and $\ell$ to $\ell'$.  Even better, the trace of $g$ under the standard representation should now be pretty easy to compute. 
A: How about doing Monte Carlo integration to compute the pushforward of the Weyl measure on the torus? Write a maximal torus for $G_2$ as $(\mathbb{R}/2 \pi \mathbb{Z})^2$ with coordinates $\alpha$ and $\beta$ corresponding to the long and short simple roots respectively. (Conveniently, in $G_2$ the root lattice and the weight lattice are the same.)  Generate $10^4$ (say) points on this torus uniformly at random. For each of them, compute the trace of your $7$ dim rep:
$$t:=2 \cos (\alpha+\beta) + 2 \cos(\alpha+2 \beta) +  2 \cos \beta +1.$$
(Check before using!)
Divide $[-5,7]$ into $10^2$ buckets (say) according to the value of $t$ and sort your pairs $(\alpha, \beta)$ into these buckets.
According to the Weyl integration formula, the volume of conjugacy class $(\alpha, \beta)$ is proportional to
$$\mu := \sin^2 \left( \frac{\alpha}{2} \right) \sin^2 \left( \frac{\alpha+\beta}{2} \right) \sin^2 \left( \frac{\alpha+2\beta}{2} \right) \sin^2 \left( \frac{\alpha+3\beta}{2} \right) \sin^2 \left( \frac{2\alpha+3\beta}{2} \right) \sin^2 \left( \frac{\beta}{2} \right) d \alpha d \beta.$$
(Definitely check before using!) So sum up the values of $\mu$ in each bucket and plot the results.
