In this case, suppose you are working with some medical data and you have a list of the body temperatures of ten patients. The normal body temperature expected is 98. 6 degrees. The temperatures of ten patients are measured and give the values 99. 0, 98. 6, 98. 5, 101. 1, 98. 3, 98. 6, 97. 9, 98. 4, 99. 2, and 99. 1. Write these values in the first column.

Recall that the mean of any data set is the sum of the values, divided by the number of values in the set. This can be represented symbolically, with the variable μ{\displaystyle \mu } representing the mean, as: μ=Σxn{\displaystyle \mu ={\frac {\Sigma x}{n}}} For this data, the mean is calculated as: μ=99. 0+98. 6+98. 5+101. 1+98. 3+98. 6+97. 9+98. 4+99. 2+99. 110{\displaystyle \mu ={\frac {99. 0+98. 6+98. 5+101. 1+98. 3+98. 6+97. 9+98. 4+99. 2+99. 1}{10}}} μ=988. 710{\displaystyle \mu ={\frac {988. 7}{10}}} μ=98. 87{\displaystyle \mu =98. 87}

For the given data set, subtract the mean, 98. 87, from each measured value, and fill in the second column with the results. These ten calculations are as follows: 99. 0−98. 87=0. 13{\displaystyle 99. 0-98. 87=0. 13} 98. 6−98. 87=−0. 27{\displaystyle 98. 6-98. 87=-0. 27} 98. 5−98. 87=−0. 37{\displaystyle 98. 5-98. 87=-0. 37} 101. 1−98. 87=2. 23{\displaystyle 101. 1-98. 87=2. 23} 98. 3−98. 87=−0. 57{\displaystyle 98. 3-98. 87=-0. 57} 98. 6−98. 87=−0. 27{\displaystyle 98. 6-98. 87=-0. 27} 97. 9−98. 87=−0. 97{\displaystyle 97. 9-98. 87=-0. 97} 98. 4−98. 87=−0. 47{\displaystyle 98. 4-98. 87=-0. 47} 99. 2−98. 87=0. 33{\displaystyle 99. 2-98. 87=0. 33} 99. 1−98. 87=0. 23{\displaystyle 99. 1-98. 87=0. 23}

For each value in the middle column, use your calculator and find the square. Record the results in the third column, as follows: 0. 132=0. 0169{\displaystyle 0. 13^{2}=0. 0169} (−0. 27)2=0. 0729{\displaystyle (-0. 27)^{2}=0. 0729} (−0. 37)2=0. 1369{\displaystyle (-0. 37)^{2}=0. 1369} 2. 232=4. 9729{\displaystyle 2. 23^{2}=4. 9729} (−0. 57)2=0. 3249{\displaystyle (-0. 57)^{2}=0. 3249} (−0. 27)2=0. 0729{\displaystyle (-0. 27)^{2}=0. 0729} (−0. 97)2=0. 9409{\displaystyle (-0. 97)^{2}=0. 9409} (−0. 47)2=0. 2209{\displaystyle (-0. 47)^{2}=0. 2209} 0. 332=0. 1089{\displaystyle 0. 33^{2}=0. 1089} 0. 232=0. 0529{\displaystyle 0. 23^{2}=0. 0529}

For this data set, the SSE is calculated by adding together the ten values in the third column: SSE=6. 921{\displaystyle SSE=6. 921}

In cell A1, type in the heading “Value. ” In cell B1, enter the heading “Deviation. " In cell C1, enter the heading “Deviation squared. ”

=Average(A2:___) Do not actually type a blank space. Fill in that blank with the cell name of your last data point. For example, if you have 100 points of data, you will use the function: =Average(A2:A101) This function includes data from A2 through A101 because the top row contains the headings of the columns. When you press Enter or when you click away to any other cell on the table, the mean of your data values will automatically fill the cell that you just programmed.

The function for the error calculation, which you enter into cell B2, will be: =A2-$A$104. The dollar signs are necessary to make sure that you lock in cell A104 for each calculation.

In cell C2, enter the function =B2^2

If we are assuming that you have 100 data points in your table, you will drag your mouse down to cells B101 and C101. When you then release the mouse button, the formulas will be copied into all the cells of the table. The table should be automatically populated with the calculated values.

In a cell below the table, probably C102 for this example, enter the function: =Sum(C2:C101) When you click Enter or click away into any other cell of the table, you should have the SSE value for your data.

Because the SSE is the sum of the squared errors, you can find the average (which is the variance), just by dividing by the number of values. However, if you are calculating the variance of a sample set, rather than a full population, you will divide by (n-1) instead of n. Thus: Variance = SSE/n, if you are calculating the variance of a full population. Variance = SSE/(n-1), if you are calculating the variance of a sample set of data. For the sample problem of the patients’ temperatures, we can assume that 10 patients represent only a sample set. Therefore, the variance would be calculated as: Variance=SSE(n−1){\displaystyle {\text{Variance}}={\frac {\text{SSE}}{(n-1)}}} Variance=6. 9219{\displaystyle {\text{Variance}}={\frac {6. 921}{9}}} Variance=0. 769{\displaystyle {\text{Variance}}=0. 769}

Therefore, after you calculate the SSE, you can find the standard deviation as follows: Standard Deviation=SSEn−1{\displaystyle {\text{Standard Deviation}}={\sqrt {\frac {\text{SSE}}{n-1}}}} For the data sample of the temperature measurements, you can find the standard deviation as follows: Standard Deviation=SSEn−1{\displaystyle {\text{Standard Deviation}}={\sqrt {\frac {\text{SSE}}{n-1}}}} Standard Deviation=6. 9219{\displaystyle {\text{Standard Deviation}}={\sqrt {\frac {\text{6. 921}}{9}}}} Standard Deviation=. 769{\displaystyle {\text{Standard Deviation}}={\sqrt {. 769}}} Standard Deviation=0. 877{\displaystyle {\text{Standard Deviation}}=0. 877}

The calculations for covariance are too involved to detail here, other than to note that you will use the SSE for each data type and then compare them. For a more detailed description of covariance and the calculations involved, see Calculate Covariance. As an example of the use of covariance, you might want to compare the ages of the patients in a medical study to the effectiveness of a drug in lowering fever temperatures. Then you would have one data set of ages and a second data set of temperatures. You would find the SSE for each data set, and then from there find the variance, standard deviations and covariance.