I am trying to prove $$\frac{1}{{n \choose 2}} \sum_j {\lambda_j \choose 2} - {\lambda_j'\choose 2}=\frac{1}{n(n-1)}\sum_j \lambda_j^2 - (2j-1)\lambda_j.$$ Here $\lambda$ is a partition of $n$, i.e. $\lambda_j \geq \lambda_{j+1}\geq 0$ and $\sum_j \lambda_j = n$ and $\lambda'$ is the conjugate partition of $\lambda$, also called the transpose of $\lambda$. This is best explained in the Ferrers diagram, which I cannot typeset at the moment, but you simply reflect along the diagonal to obtain the transpose. (Note we pad the partitions with zeros to get them to be the same length). For reference this is formula (D-2) on p. 40 of Diaconis.
This is for homework, so please only hints and allow me to write out my ideas/attempt.
Attempt I first looked for a necessary condition. We note the following simplifications of the LHS: $$\frac{1}{{n \choose 2}} \sum_j {\lambda_j \choose 2} - {\lambda_j'\choose 2}=\frac{1}{n(n-1)}\sum_j \lambda_j^2 - \lambda_j -(\lambda_j')^2+\lambda_j'$$ $$=\frac{1}{n(n-1)} \sum_j \lambda_j^2 - (\lambda_j')^2,$$ since $\sum_j \lambda_j = \sum_j \lambda_j' = n$ being partitions of $n$. Thus, for the equation to hold we need $(\lambda_j')^2=(2j-1)\lambda_j$ for all $j$ or $\sum_j (\lambda_j')^2 = \sum_j (2j-1)\lambda_j$. Neither condition I can make out to be sufficient, so I am somewhat at a loss as to how to proceed.