  For a permutation $\pi$ the major index of $\pi$ is the sum of all indices
$i$ such that $\pi_i > \pi_{i+1}$. It is well known that the major index is
equidistributed with the number of inversions over all permutations of length
$n$. In this paper, we study the distribution of the major index over
pattern-avoiding permutations of length $n$. We focus on the number
$M_n^m(\Pi)$ of permutations of length $n$ with major index $m$ and avoiding
the set of patterns $\Pi$.
  First we are able to show that for a singleton set $\Pi = \{\sigma\}$ other
than some trivial cases, the values $M_n^m(\Pi)$ are monotonic in the sense
that $M_n^m(\Pi) \leq M_{n+1}^m(\Pi)$. Our main result is a study of the
asymptotic behaviour of $M_n^m(\Pi)$ as $n$ goes to infinity. We prove that for
every fixed $m$ and $\Pi$ and $n$ large enough, $M_n^m(\Pi)$ is equal to a
polynomial in $n$ and moreover, we are able to determine the degrees of these
polynomials for many sets of patterns.
