We resolve a function field version of two conjectures concerning the
variance of the number of primes in short intervals (Goldston and Montgomery)
and in arithmetic progressions (Hooley). A crucial ingredient in our work are
recent equidistribution results of N. Katz.Comment: Revised according to referees' comment