what is the sum of squares 
the term sum of squares is a statistical measure used in regression analysis to determine the dispersion of data points the sum of squares can be used to find the function that best fits by varying the least from the data in a regression analysis the goal is to determine how well a data series can be fitted to a function that might help to explain how the data series was generated the sum of squares can be used in the financial world to determine the variance in asset values understanding the sum of squaresthe sum of squares measures how widely a set of datapoints is spread out from the mean it is also known as variation it is calculated by adding together the squared differences of each data point to determine the sum of squares square the distance between each data point and the line of best fit then add them together the line of best fit will minimize this value a low sum of squares indicates little variation between data sets while a higher one indicates more variation variation refers to the difference of each data set from the mean you can visualize this in a chart if the line doesn t pass through all the data points then there is some unexplained variability we go into a little more detail about this in the next section below in statistics the sum of squares is used to calculate the variance and standard deviations of a data set which are in turn used in regression analysis analysts and investors can use these techniques to make better decisions about their investments keep in mind though that using it means you re making assumptions about using past performance for instance this measure can help you determine the level of volatility in a stock s price or how the share prices of two companies compare let s say an analyst wants to know if microsoft msft share prices tend to move in tandem with those of apple aapl the analyst can list out the daily prices for both stocks for a certain period say one two or 10 years and create a linear model or a chart if the relationship between both variables i e the price of aapl and msft is not a straight line then there are variations in the data set that must be scrutinized sum of squares formulathe following is the formula for the total sum of squares for a set x of n items sum of squares i 0 n x i x 2 where x i the i t h item in the set x the mean of all items in the set x i x the deviation of each item from the mean begin aligned text for a set x text of n text items text sum of squares sum i 0 n left x i overline x right 2 textbf where x i text the i th text item in the set overline x text the mean of all items in the set left x i overline x right text the deviation of each item from the mean end aligned for a set x of n items sum of squares i 0 n xi x 2where xi the ith item in the setx the mean of all items in the set xi x the deviation of each item from the mean variation is a statistical measure that is calculated or measured by using squared differences 