  Let $\Theta^{(n)}$ be a random vector uniformly distributed on the unit
sphere $\mathbb S^{n-1}$ in $\mathbb R^n$. Consider the projection of the
uniform distribution on the cube $[-1,1]^n$ to the line spanned by
$\Theta^{(n)}$. The projected distribution is the random probability measure
$\mu_{\Theta^{(n)}}$ on $\mathbb R$ given by \[ \mu_{\Theta^{(n)}}(A) := \frac
1 {2^n} \int_{[-1,1]^n} \mathbb 1\{\langle u, \Theta^{(n)} \rangle \in A\} du,
\] for Borel subets $A$ of $\mathbb{R}$. It is well known that, with
probability $1$, the sequence of random probability measures
$\mu_{\Theta^{(n)}}$ converges weakly to the centered Gaussian distribution
with variance $1/3$. We prove a large deviation principle for the sequence
$\mu_{\Theta^{(n)}}$ on the space of probability measures on $\mathbb R$ with
speed $n$. The (good) rate function is explicitly given by $I(\nu(\alpha)) := -
\frac{1}{2} \log ( 1 - \|\alpha\|_2^2)$ whenever $\nu(\alpha)$ is the law of a
random variable of the form \begin{align*} \sqrt{1 - \|\alpha\|_2^2 }
\frac{Z}{\sqrt 3} + \sum_{ k = 1}^\infty \alpha_k U_k, \end{align*} where $Z$
is standard Gaussian independent of $U_1,U_2,\ldots$ which are i.i.d.
$\text{Unif}[-1,1]$, and $\alpha_1 \geq \alpha_2 \geq \ldots $ is a
non-increasing sequence of non-negative reals with $\|\alpha\|_2<1$. We obtain
a similar result for random projections of the uniform distribution on the
discrete cube $\{-1,+1\}^n$.
