In [18], Mendes and Remmel showed how Gessel’s generating function for the distributions of the number of descents, the major index, and the number of inversions of permutations in the symmetric group could be derived by applying a ring homomorphism defined on the ring of symmetric functions to a simple symmetric function identity. We show how similar methods may be used to prove analogues of that generating function for compositions.