# [Tex/LaTex] How to place the subscript under two summation signs in a fraction

equationsmath-modesubscripts

I would like to place a subscript under two summation signs in a fraction, in an equation. The code showed works when it is not in a fraction, but as soon as I use it in a fraction the subscript is placed after the two summation signs, instead of under the two summation signs.

$$\frac{{\sum\sum\limits}_{i \neq j} \sum\limits_{x}\sum\limits_{y}[\pi_{x(i),y(j)} - \pi_{x(i)}\pi_{y(j)}]} {\sigma^2_X}$$


Does anyone know how to solve this?

You need to enclose the two summation symbols in \mathop{} and then place \limits after that.
\documentclass{article}
$$\frac{\mathop{\sum\sum}\limits_{i \neq j} \sum\limits_{x}\sum\limits_{y}[\pi_{x(i),y(j)} - \pi_{x(i)}\pi_{y(j)}]}{\sigma^2_X}$$