  Hooley conjectured that the variance V(x;q) of the distribution of primes up
to x in the arithmetic progressions modulo q is asymptotically x log q, in some
unspecified range of q\leq x. On average over 1\leq q \leq Q, this conjecture
is known unconditionally in the range x/(log x)^A \leq Q \leq x; this last
range can be improved to x^{\frac 12+\epsilon} \leq Q \leq x under the
Generalized Riemann Hypothesis (GRH). We argue that Hooley's conjecture should
hold down to (loglog x)^{1+o(1)} \leq q \leq x for all values of q, and that
this range is best possible. We show under GRH and a linear independence
hypothesis on the zeros of Dirichlet L-functions that for moderate values of q,
\phi(q)e^{-y}V(e^y;q) has the same distribution as that of a certain random
variable of mean asymptotically \phi(q) log q and of variance asymptotically
2\phi(q)(log q)^2. Our estimates on the large deviations of this random
variable allow us to predict the range of validity of Hooley's Conjecture.
