cap S sub x x end-sub equals sum of x squared minus the fraction with numerator open paren sum of x close paren squared and denominator n end-fraction This allows you to keep a running total of the squares ( sum of x squared ) and the sum of the values ( ) simultaneously, which is much faster for large datasets. cap S sub x x end-sub vs. Variance ( sigma squared It is common to confuse cap S sub x x end-sub
❌ Using ( n ) instead of ( n-1 ) when calculating sample variance from Sxx. ❌ Forgetting that Sxx only involves ( x ), not ( y ). ❌ Mixing up Sxx with Sxy (cross-product). ❌ Using the computational formula without checking for large rounding errors when subtracting two large numbers. Sxx Variance Formula
: ( \sum x_i = 30 ), ( \sum x_i^2 = 4+16+36+64+100 = 220 ). ( S_xx = 220 - (30^2)/5 = 220 - 900/5 = 220 - 180 = 40 ). Matches. cap S sub x x end-sub equals sum
This version is the most intuitive because it shows exactly what variance is : the average of the squared deviations. ❌ Forgetting that Sxx only involves ( x ), not ( y )