  We prove the first Fixed-depth Size-hierarchy Theorem for uniform
AC$^0[\oplus]$ circuits; in particular, for fixed $d$, the class
$\mathcal{C}_{d,k}$ of uniform AC$^0[\oplus]$ formulas of depth $d$ and size
$n^k$ form an infinite hierarchy. For this, we find the first class of explicit
functions giving (up to polynomial factor) matching upper and lower bounds for
AC$^0[\oplus]$ formulas, derived from the $\delta$-Coin Problem, the
computational problem of distinguishing between coins that are heads with
probability $(1+\delta)/2$ or $(1-\delta)/2,$ where $\delta$ is a parameter
going to $0$. We study this problem's complexity and make progress on both
upper bounds and lower bounds.
  Upper bounds. We find explicit monotone AC$^0$ formulas solving the
$\delta$-coin problem, having depth $d$, size $\exp(O(d(1/\delta)^{1/(d-1)}))$,
and sample complexity poly$(1/\delta)$, for constant $d\ge2$. This matches
previous upper bounds of O'Donnell and Wimmer (ICALP 2007) and Amano (ICALP
2009) in terms of size and improves the sample complexity.
  Lower bounds. The upper bounds are nearly tight even for the stronger model
of AC$^0[\oplus]$ formulas (which allow NOT and Parity gates): any
AC$^0[\oplus]$ formula solving the $\delta$-coin problem must have size
$\exp(\Omega(d(1/\delta)^{1/(d-1)})).$ This strengthens a result of Cohen,
Ganor and Raz (APPROX-RANDOM 2014), who prove a similar result for AC$^0$, and
a result of Shaltiel and Viola (SICOMP 2010), who give a superpolynomially
weaker (still exponential) lower bound.
  The upper bound is a derandomization involving a use of Janson's inequality
(as far as we know, the first such use of the inequality) and classical
combinatorial designs. For the lower bound, we prove an optimal (up to constant
factor) degree lower bound for multivariate polynomials over $\mathbb{F}_2$
solving the $\delta$-coin problem, which may be of independent interest.
