  Since the early work of Richard Stanley, it has been observed that several
permutation statistics have a remarkable property with respect to shuffles of
permutations. We formalize this notion of a shuffle-compatible permutation
statistic and introduce the shuffle algebra of a shuffle-compatible permutation
statistic, which encodes the distribution of the statistic over shuffles of
permutations. This paper develops a theory of shuffle-compatibility for descent
statistics (statistics that depend only on the descent set and length) which
has close connections to the theory of $P$-partitions, quasisymmetric
functions, and noncommutative symmetric functions. We use our framework to
prove that many descent statistics are shuffle-compatible and to give explicit
descriptions of their shuffle algebras, thus unifying past results of Stanley,
Gessel, Stembridge, Aguiar-Bergeron-Nyman, and Petersen.
