[Tex/LaTex] Problems while displaying sum limits below

math-operatorsmathtools

I'm having some trouble when trying to correctly display a summation using LaTeX.

I'm using the package mathtools, and the formula:

Cov(O) = \frac{ \sum_{\forall c_i \in C} exists(O, c_i)}{n}

My problem is the \forall c_i \in C text appears as a sub index of the \sum element instead of appearing below it.

Best Answer

This is standard because the arguments of \frac are in textmode math. Try \frac{\displaystyle ... or \frac{\sum\limits_{....

BTW: One usually never write \forall in the limits of the sum, one would usually just write \sum_{c_i \in C}, the for all is implied