  In this paper we present a new approach to counting the proportion of
hyperelliptic curves of genus $g$ defined over a finite field $\mathbb{F}_q$
with a given $a$-number. In characteristic three this method gives exact
probabilities for curves of the form $Y^2=f(X)$ with $f(X)\in\mathbb{F}_q[X]$
monic and cubefree, probabilities that match the data presented by Cais et al.
in previous work. These results are sufficient to derive precise estimates (in
terms of $q$) for these probabilities when restricting to squarefree $f$. As a
consequence, for positive integers $a$ and $g$ we show that the nonempty strata
of the moduli space of hyperelliptic curves of genus $g$ consisting of those
curves with $a$-number $a$ are of codimension $2a-1$. This contrasts with the
analogous result for the moduli space of abelian varieties in which the
codimensions of the strata are $a(a+1)/2$. Finally, our results allow for an
alternative heuristic conjecture to that of Cais et al.; one that matches the
available data.
