# Math Help - \sum + fractions

1. ## \sum + fractions

I take it the reason the \sum operator gives different "vertical" formats in the fractions than outside is to save space or something?
That is
$r = \sqrt{1 - \frac{ \sum_{i = 1}^n ( y_i - yf_i )^2 }{ \sum_{i = 1}^n (y_i - \bar{y} )^2 }}$

vs
$\sum_{i = 1}^n$

-Dan

2. ## Re: \sum + fractions

Hey Dan,

I recently learned (at MHB) to use the \limits command to force the limits of sums and products to display where I want. The code:

r = \sqrt{1 - \frac{ \sum\limits_{i = 1}^n ( y_i - yf_i )^2 }{ \sum\limits_{i = 1}^n (y_i - \bar{y} )^2 }}

produces:

$r = \sqrt{1 - \frac{ \sum\limits_{i = 1}^n ( y_i - yf_i )^2 }{ \sum\limits_{i = 1}^n (y_i - \bar{y} )^2 }}$