For τ∈S3, let Sn(τ) denote the set of permutations in Sn which avoid the pattern τ, and let Enτ denote the expectation with respect to the uniformly random probability measure on Sn(τ). Let In(σ) denote the number of inversions in σ∈Sn. We study EnτIn for τ∈{231,132,213,312}⊂S3. We prove that En231In=En312In=21(2n)!n!(n+1)!4n−21(3n+1), and that En132In=En213In=21(n−1)n−En231In. From the first equation it follows that En231In=En312In∼2πn23. We also show that the variance VarPnτ(In) of In under Pnτ satisfies VarPnτ(In)∼(65−4π)n3≈0.048n3,forτ∈{231,132,213,312}.