  In this paper, we investigate the large deviations of sums of weighted random
variables that are approximately independent, generalizing and improving some
of the results of Montgomery and Odlyzko. We are motivated by examples arising
from number theory, including the sequences $p^{it}$, $\chi(p)$, $\chi_d(p)$,
$\lambda_f(p)$, and $\text{Kl}_q(a-n, b)$; where $p$ ranges over the primes,
$t$ varies in a large interval, $\chi$ varies among all characters modulo $q$,
$\chi_d$ varies over quadratic characters attached to fundamental discriminants
$|d|\leq x$, $\lambda_f(n)$ are the Fourier coefficients of holomorphic cusp
forms $f$ of (a large) weight $k$ for the full modular group, and
$\text{Kl}_q(a, b)$ are the normalized Kloosterman sums modulo a large prime
$q$, where $a, b$ vary in $(\mathbb{F}_q)^{\times}$.
