The background of this question is how a random variable $X$ on the orthogonal group $O(n)$ whose distribution is the normalized Haar measure $\mu$, i.e., $\mu( O(n) ) = 1$, can be realized on a computer that has access to a number of "simpler" random variables, like:

- a perfect coin
- the uniform probability measure on $[0,1]$ or $S^1$
- Gaussian variables on $\mathbb R$ with arbitrary standard deviation.

An algorithm needs to use the random variable $X$, but I am not aware of an explicit formula that would allow for such a reduction.